/* ============================================================
   Dentostack Partner Portal — Global Styles
   Matches ds_website palette: #092D4D / #074B7B / #A5B039
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: "Poppins", sans-serif;
    color: #092D4D;
    background: #f5f8fb;
    margin: 0;
}

/* ── Login Page ── */
.pp-login-page {
    display: flex;
    min-height: 100vh;
}

/* Left panel */
.pp-left {
    flex: 1;
    background: linear-gradient(135deg, #092D4D 0%, #074B7B 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

.pp-left::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.pp-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.pp-left-logo { display: block; margin-bottom: 40px; }
.pp-left-logo img { height: 52px; width: auto; }

.pp-left-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 28px;
    width: fit-content;
    backdrop-filter: blur(4px);
}

.pp-left-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
}

.pp-left-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 440px;
}

.pp-benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.pp-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.pp-benefit-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(165, 176, 57, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pp-benefit-icon svg {
    width: 16px;
    height: 16px;
    color: #A5B039;
}

/* Right panel */
.pp-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 60px 56px;
    max-width: 540px;
}

.pp-form-wrap {
    width: 100%;
    max-width: 400px;
}

.pp-mobile-logo { display: none; margin-bottom: 28px; }
.pp-mobile-logo img { height: 36px; width: auto; }

.pp-form-title {
    font-size: 26px;
    font-weight: 700;
    color: #092D4D;
    margin-bottom: 6px;
    line-height: 1.3;
}

.pp-form-subtitle {
    font-size: 14px;
    color: #7C8B9D;
    margin-bottom: 32px;
    line-height: 1.6;
}

.pp-field { margin-bottom: 20px; }

.pp-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #3a4a5c;
    margin-bottom: 6px;
}

.pp-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #d0dbe6;
    border-radius: 10px;
    font-size: 15px;
    font-family: "Poppins", sans-serif;
    color: #092D4D;
    background: #fafcfe;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.pp-field input:focus {
    border-color: #074B7B;
    box-shadow: 0 0 0 3px rgba(7, 75, 123, 0.1);
    background: #fff;
}

.pp-field input::placeholder { color: #9aa8b8; }

.pp-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #074B7B, #092D4D);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

.pp-error-banner {
    background: #fdf0ef;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 20px;
}

.pp-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(7, 75, 123, 0.3);
}

/* Animations */
@keyframes ppFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ppFadeInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pp-left-badge   { animation: ppFadeInLeft 0.5s ease forwards; }
.pp-left-title   { animation: ppFadeInLeft 0.5s ease 0.1s forwards; opacity: 0; }
.pp-left-subtitle{ animation: ppFadeInLeft 0.5s ease 0.2s forwards; opacity: 0; }
.pp-benefits     { animation: ppFadeInLeft 0.5s ease 0.3s forwards; opacity: 0; }
.pp-form-wrap    { animation: ppFadeIn 0.5s ease forwards; }

/* ── Dashboard Navbar ── */
.pp-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid rgba(9, 45, 77, 0.08);
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
}

.pp-navbar-logo img { height: 44px; width: auto; }

.pp-navbar-title {
    font-size: 14px;
    font-weight: 500;
    color: #7C8B9D;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #d0dbe6;
}

.pp-navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pp-partner-name {
    font-size: 14px;
    font-weight: 500;
    color: #3a4a5c;
}

.pp-logout-btn {
    font-size: 13px;
    font-weight: 600;
    color: #074B7B;
    border: 1.5px solid #074B7B;
    border-radius: 8px;
    padding: 6px 16px;
    background: transparent;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: "Poppins", sans-serif;
}

.pp-logout-btn:hover {
    background: #074B7B;
    color: #fff;
}

/* ── Dashboard Content ── */
.pp-content { padding: 40px 32px; max-width: 1200px; margin: 0 auto; }

.pp-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #092D4D;
    margin-bottom: 8px;
}

.pp-page-subtitle {
    font-size: 14px;
    color: #7C8B9D;
    margin-bottom: 32px;
}

/* Title row with referral link */
.pp-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.pp-title-row .pp-page-title { margin-bottom: 4px; }
.pp-title-row .pp-page-subtitle { margin-bottom: 0; }

.pp-referral-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 280px;
}

.pp-referral-label {
    font-size: 11px;
    font-weight: 600;
    color: #7C8B9D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pp-referral-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #d0dbe6;
    border-radius: 10px;
    overflow: hidden;
    background: #fafcfe;
}

.pp-referral-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 12px;
    font-size: 12px;
    font-family: "Poppins", sans-serif;
    color: #3a4a5c;
    outline: none;
    min-width: 0;
}

.pp-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    background: linear-gradient(135deg, #074B7B, #092D4D);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.pp-copy-btn:hover { opacity: 0.9; }
.pp-copy-btn--copied { background: linear-gradient(135deg, #1e8449, #145a32); }

/* Stat cards */
.pp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.pp-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(9, 45, 77, 0.07);
    box-shadow: 0 1px 4px rgba(9, 45, 77, 0.05);
}

.pp-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #7C8B9D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.pp-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #092D4D;
    line-height: 1;
}

.pp-stat-card.sold .pp-stat-value  { color: #2ecc71; }
.pp-stat-card.lost .pp-stat-value  { color: #e74c3c; }

/* Leads table */
.pp-table-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(9, 45, 77, 0.07);
    box-shadow: 0 1px 4px rgba(9, 45, 77, 0.05);
    overflow: hidden;
}

.pp-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(9, 45, 77, 0.07);
}

.pp-table-title {
    font-size: 16px;
    font-weight: 600;
    color: #092D4D;
    margin: 0;
}

.pp-table { width: 100%; border-collapse: collapse; }

.pp-table thead th {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #7C8B9D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(9, 45, 77, 0.07);
    text-align: left;
    white-space: nowrap;
}

.pp-table tbody td {
    padding: 14px 20px;
    font-size: 14px;
    color: #3a4a5c;
    border-bottom: 1px solid rgba(9, 45, 77, 0.05);
}

.pp-table tbody tr:last-child td { border-bottom: none; }

.pp-table tbody tr:hover td { background: #f8fafc; }

.pp-empty-state {
    text-align: center;
    padding: 64px 24px;
}

.pp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #E2EEF9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pp-empty-icon svg { width: 28px; height: 28px; color: #074B7B; }

.pp-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: #092D4D;
    margin-bottom: 8px;
}

.pp-empty-text {
    font-size: 14px;
    color: #7C8B9D;
    line-height: 1.6;
}

/* Pagination */
.pp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(9, 45, 77, 0.07);
}

.pp-page-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #074B7B;
    border: 1.5px solid #d0dbe6;
    background: #fff;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pp-page-btn:hover { background: #074B7B; color: #fff; border-color: #074B7B; }
.pp-page-btn.disabled { color: #b0bec5; cursor: default; pointer-events: none; }

.pp-page-info { font-size: 13px; color: #7C8B9D; }

/* Status badge */
.pp-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pp-status-new        { background: #E2EEF9; color: #074B7B; }
.pp-status-contacted  { background: #fef9e7; color: #d4a017; }
.pp-status-sold       { background: #e9f7ef; color: #1e8449; }
.pp-status-lost       { background: #fdf0ef; color: #c0392b; }

/* ── Responsive ── */
@media (max-width: 992px) {
    .pp-left { display: none; }
    .pp-mobile-logo { display: block; }
    .pp-right { max-width: 100%; padding: 40px 28px; min-height: 100vh; }
    .pp-navbar-title { display: none; }
    .pp-stats { grid-template-columns: repeat(2, 1fr); }
    .pp-title-row { flex-direction: column; }
    .pp-referral-box { min-width: 0; width: 100%; }
}

@media (max-width: 600px) {
    .pp-right { padding: 32px 20px; }
    .pp-form-title { font-size: 22px; }
    .pp-navbar { padding: 0 20px; }
    .pp-content { padding: 28px 20px; }
    .pp-page-title { font-size: 22px; }
    .pp-partner-name { display: none; }
    .pp-table-wrap { overflow-x: auto; }
}
