:root {
    --p-primary: #fd5056;
    --p-primary-dark: #e43d43;
    --p-primary-soft: rgba(253, 80, 86, 0.1);
    --p-primary-bg: #fff5f5;
    --p-ink: #0f1d2b;
    --p-soft: #637381;
    --p-line: #eef2f6;
    --p-bg: #f8fafc;
    --p-white: #ffffff;
    --p-shadow: 0 20px 40px rgba(15, 29, 43, 0.05);
    --p-shadow-sm: 0 4px 12px rgba(15, 29, 43, 0.03);
    --p-radius-lg: 32px;
    --p-radius-md: 20px;
    --p-radius-sm: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.p-card {
    background: var(--p-white);
    border-radius: var(--p-radius-md);
    box-shadow: var(--p-shadow-sm);
    padding: 30px;
}

.f-group {
    margin-bottom: 16px;
}

.f-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--p-ink);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.f-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #edf2f7;
    border-radius: var(--p-radius-sm);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fcfdfe;
    color: var(--p-ink);
}

.f-input:focus {
    border-color: var(--p-primary);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px var(--p-primary-soft);
}

.f-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.p-btn {
    width: 100%;
    background: var(--p-primary);
    color: #fff;
    padding: 16px 24px;
    border: none;
    border-radius: var(--p-radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.p-btn:hover {
    background: var(--p-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(253, 80, 86, 0.2);
}

.p-btn:active {
    transform: translateY(0);
}

/* =========================================
   REGISTRATION PAGE
   ========================================= */
.partner-reg {
    background: linear-gradient(135deg, rgba(15, 29, 43, 0.8) 0%, rgba(26, 42, 58, 0.6) 100%), url('../images/special-pages/referral/adi-kailash-view.jpeg');
    background-size: cover;
    background-position: center;
    padding: 40px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    background: var(--p-white);
    border-radius: var(--p-radius-lg);
    overflow: hidden;
    box-shadow: var(--p-shadow);
}

.reg-form-shell {
    padding: 60px;
}

.reg-form-head {
    margin-bottom: 40px;
}

.reg-info {
    display: flex;
    background: linear-gradient(135deg, rgba(15, 29, 43, 0.95) 0%, rgba(26, 42, 58, 0.8) 100%), url('../images/special-pages/referral/adi-kailash-view.jpeg');
    background-size: cover;
    background-position: center;
    padding: 60px;
    color: #fff;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.reg-info p {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 40px;
}

.reg-benefits {
    list-style: none;
    padding: 0;
}

.reg-benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.reg-benefit-item i {
    color: var(--p-primary);
    background: rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}

.reg-form-shell {
    padding: 60px;
}

.reg-form-head {
    margin-bottom: 40px;
}

.reg-form-head h2 {
    font-size: 2.2rem;
    color: var(--p-ink);
    margin-bottom: 12px;
    font-weight: 800;
}

.reg-form-head p {
    color: var(--p-soft);
    font-size: 1.1rem;
}

/* =========================================
   LOGIN PAGE
   ========================================= */
.partner-login {
    background: linear-gradient(135deg, rgba(15, 29, 43, 0.8) 0%, rgba(26, 42, 58, 0.6) 100%), url('../images/special-pages/referral/adi-kailash-view.jpeg');
    background-size: cover;
    background-position: center;
    padding: 40px 15px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.login-box {
    width: 100%;
    max-width: 480px;
    background: var(--p-white);
    padding: 50px;
    border-radius: var(--p-radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.login-head {
    text-align: center;
    margin-bottom: 40px;
}

.login-head h1 {
    font-size: 2.2rem;
    color: var(--p-ink);
    font-weight: 800;
    margin-bottom: 12px;
}

/* =========================================
   DASHBOARD PAGE
   ========================================= */
.p-dash {
    background: var(--p-bg);
    min-height: 100vh;
    display: flex;
}

.p-side {
    width: 280px;
    background: var(--p-white);
    border-right: 1px solid var(--p-line);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.p-side-logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--p-ink);
    padding: 0 15px;
    margin-bottom: 50px;
}

.p-side-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.p-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    color: var(--p-soft);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--p-radius-sm);
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.p-menu-item.active a, .p-menu-item a:hover {
    background: var(--p-primary-bg);
    color: var(--p-primary);
}

.p-main {
    flex-grow: 1;
    padding: 40px 60px;
}

.p-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 30px;
}

.p-greet h1 { font-size: 2rem; color: var(--p-ink); margin-bottom: 5px; font-weight: 800; }
.p-greet p { color: var(--p-soft); font-size: 1.05rem; }

.p-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.p-stat-card {
    background: var(--p-white);
    padding: 24px;
    border-radius: var(--p-radius-md);
    box-shadow: var(--p-shadow-sm);
    display: flex;
    flex-direction: column;
}

.p-stat-card span {
    font-size: 0.95rem;
    color: var(--p-soft);
    font-weight: 600;
    margin-bottom: 12px;
}

.p-stat-card strong {
    font-size: 1.8rem;
    color: var(--p-ink);
    font-weight: 800;
}

.p-stat-card.featured {
    background: linear-gradient(135deg, var(--p-primary) 0%, #ff787d 100%);
    color: #fff;
}

.p-stat-card.featured span, .p-stat-card.featured strong { color: #fff; }

/* Dashboard Tables */
.p-table-wrap {
    overflow-x: auto;
}

.p-table {
    width: 100%;
    border-collapse: collapse;
}

.p-table th {
    text-align: left;
    padding: 18px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--p-soft);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--p-line);
    font-weight: 700;
}

.p-table td {
    padding: 20px 15px;
    font-size: 0.95rem;
    color: var(--p-ink);
    border-bottom: 1px solid var(--p-line);
}

/* =========================================
   RESPONSIVENESS OVERRIDES
   ========================================= */

/* =========================================
   RESPONSIVENESS OVERRIDES & IMPROVEMENTS
   ========================================= */

@media (max-width: 1400px) {
    .p-main { padding: 40px; }
}

@media (max-width: 1100px) {
    .p-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .reg-shell {
        grid-template-columns: 1fr;
        max-width: 640px;
        border-radius: var(--p-radius-md);
        margin: 0 auto;
    }
    
    .reg-form-shell {
        order: 1;
        padding: 40px 30px;
    }

    .reg-info {
        order: 2;
        padding: 40px 30px;
        text-align: left;
        align-items: flex-start;
        min-height: auto;
    }

    .reg-info h1 { font-size: 2.2rem; }
    
    .reg-benefits {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }

    .reg-benefit-item {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .p-dash { flex-direction: column; }
    
    .p-side { 
        position: fixed;
        left: -100%;
        top: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        z-index: 2000;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 20px 0 60px rgba(0,0,0,0.15);
        border: none;
    }

    .p-side.active {
        left: 0;
    }

    .p-main { 
        padding: 24px 20px; 
        width: 100%;
    }

    .p-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .p-greet h1 { font-size: 1.6rem; }
    .p-greet p { font-size: 0.95rem; }

    .p-id-badge {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }

    .p-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .p-stat-card strong { font-size: 1.5rem; }

    .p-card {
        padding: 20px;
        border-radius: var(--p-radius-sm);
    }
}

@media (max-width: 480px) {
    .partner-reg { padding: 15px; }
    .reg-form-shell { padding: 30px 20px; }
    .reg-info { padding: 30px 20px; }
    
    .reg-benefits {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 35px 25px;
    }

    .login-head h1 { font-size: 1.8rem; }

    .p-side { width: 85%; }

    .f-row { grid-template-columns: 1fr; gap: 0; }
}

/* Base Utility Classes */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-info { background: #e0f2fe; color: #075985; }
