:root {
    --bg: #f4f5ee;
    --surface: rgba(255, 254, 248, 0.96);
    --surface-strong: #fffef9;
    --ink: #17462e;
    --muted: #5f6d61;
    --line: rgba(21, 117, 62, 0.14);
    --accent: #ff6b26;
    --accent-dark: #d74e16;
    --accent-soft: #ffe7d9;
    --gold: #f5d06f;
    --green: #167d43;
    --green-dark: #0e5d31;
    --green-soft: #eef8ef;
    --success: #dff3e5;
    --error: #ffe1dc;
    --shadow: 0 22px 70px rgba(16, 71, 41, 0.12);
    --shadow-soft: 0 14px 36px rgba(16, 71, 41, 0.08);
    --radius: 24px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(22, 125, 67, 0.12), transparent 24%),
        radial-gradient(circle at right 10% top 12%, rgba(255, 107, 38, 0.1), transparent 22%),
        linear-gradient(180deg, #fbfcf7 0%, #edf3ea 100%);
}

a { color: inherit; text-decoration: none; }

.container { width: min(1140px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(20px);
    background: rgba(249, 252, 247, 0.84);
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
}

.app-topbar {
    background: linear-gradient(135deg, rgba(22, 125, 67, 0.94), rgba(15, 94, 50, 0.92));
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.app-topbar .brand,
.app-topbar .brand small,
.app-topbar .nav-links a {
    color: #fffef8;
}

.app-topbar .nav-links a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-wrap, .nav-links, .hero-actions, .stats, .card-grid, .split, .profile-actions, .dashboard-head, .footer-grid, .action-row {
    display: flex;
    gap: 16px;
}

.nav-wrap, .dashboard-head, .footer-grid {
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
}

.brand-logo-wrap {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--green), #2ca55d);
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.brand small, .eyebrow, .muted { color: var(--muted); }

.nav-links {
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.62);
}

.button, .button-link, button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent), #ff8a37);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 28px rgba(255, 107, 38, 0.24);
}

.button-link.danger { background: linear-gradient(135deg, #a53b30, #c35d44); }

.button.secondary, .button-link.secondary {
    background: rgba(255, 255, 255, 0.72);
    color: var(--green-dark);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button:hover, .button-link:hover, button:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);
}

.page-shell { padding: 36px 0 60px; }

.app-page-wrap {
    display: grid;
    gap: 22px;
}

.hero, .panel, .biodata, .table-card, .auth-card, .account-hero {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.glass-panel {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.62), rgba(250,255,248,0.88)),
        var(--surface);
}

.hero {
    padding: 44px;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 30px;
    align-items: center;
    overflow: hidden;
}

.hero h1, .panel h2, .biodata h1, .account-hero h1 {
    margin: 0 0 14px;
    line-height: 1.08;
}

.hero h1, .account-hero h1 {
    font-size: clamp(2rem, 3.6vw, 3.25rem);
}

.hero p, .account-hero p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.7;
}

.hero-rishta {
    background: linear-gradient(135deg, rgba(22, 125, 67, 0.98), rgba(15, 94, 50, 0.96));
    color: #fffef8;
    border-color: rgba(255, 255, 255, 0.12);
}

.hero-rishta p,
.hero-rishta .eyebrow,
.hero-rishta .muted {
    color: rgba(255, 251, 244, 0.88);
}

.hero-art {
    min-height: 360px;
    border-radius: calc(var(--radius) - 6px);
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 25%),
        linear-gradient(145deg, rgba(255, 107, 38, 0.88), rgba(245, 208, 111, 0.82));
    position: relative;
    overflow: hidden;
}

.hero-art::before,
.hero-art::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.28);
}

.hero-art::before {
    width: 240px;
    height: 240px;
    right: -20px;
    top: 26px;
}

.hero-art::after {
    width: 160px;
    height: 160px;
    left: 26px;
    bottom: 26px;
}

.hero-promo {
    display: flex;
    align-items: stretch;
}

.promo-panel {
    width: 100%;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.promo-panel h3 {
    margin: 12px 0 10px;
    font-size: 1.8rem;
}

.promo-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.promo-totals div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.promo-totals strong {
    display: block;
    font-size: 1.55rem;
}

.stats { flex-wrap: wrap; margin-top: 26px; }
.compact-stats { margin-top: 0; }

.stat {
    flex: 1 1 150px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
}

.stat strong {
    display: block;
    font-size: 1.8rem;
}

.section-title { margin: 32px 0 18px; }

.home-section {
    margin-top: 24px;
}

.light-band {
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, #fffef8, #f3f8ef);
    border: 1px solid rgba(23, 126, 68, 0.08);
}

.lined-title {
    position: relative;
    text-align: center;
    color: var(--green-dark);
}

.lined-title::before,
.lined-title::after {
    content: "";
    display: inline-block;
    width: 80px;
    height: 2px;
    vertical-align: middle;
    margin: 0 12px;
    background: linear-gradient(90deg, transparent, #5cbc7b);
}

.card-grid, .split { flex-wrap: wrap; }

.three-grid > *,
.four-grid > * {
    flex: 1 1 220px;
}

.card, .feature-card {
    flex: 1 1 280px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: var(--shadow-soft);
}

.app-card-frame {
    position: relative;
    overflow: hidden;
}

.app-card-frame::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--green), var(--accent));
}

.profile-card {
    overflow: hidden;
    padding: 0;
}

.card-body {
    padding: 20px;
    display: grid;
    gap: 12px;
}

.card-photo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.hero-photo {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.lightbox-trigger { cursor: zoom-in; }

.feature-card h3, .card h3 { margin-top: 0; }

.soft-card {
    background: linear-gradient(180deg, #f2faf1, #ffffff);
}

.step-badge {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #2da55d);
    color: white;
    font-weight: 700;
    margin-bottom: 12px;
}

.earning-card {
    text-align: center;
    background: linear-gradient(180deg, #fffef8, #f4f9ef);
}

.earning-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 2.15rem;
}

.mini-card {
    min-height: 160px;
}

.green-strip {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green), #2ba85d);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.finder-bar {
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #f7fcf5, #ffffff);
    box-shadow: var(--shadow-soft);
}

.finder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.directory-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
    align-items: start;
}

.directory-sidebar,
.directory-results {
    padding: 24px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel, .auth-card, .table-card, .biodata, .account-hero { padding: 30px; }

.split > * { flex: 1 1 320px; }

.account-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    margin-top: 22px;
}

.app-section-stack {
    align-items: start;
}

.app-auth-shell {
    display: grid;
    gap: 18px;
}

.app-auth-hero {
    padding: 28px 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(22, 125, 67, 0.98), rgba(15, 94, 50, 0.95));
    color: #fffef8;
    box-shadow: var(--shadow);
}

.app-auth-hero .eyebrow,
.app-auth-hero .muted,
.app-auth-hero p {
    color: rgba(255, 250, 243, 0.88);
}

.app-auth-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.12;
}

.account-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.account-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 280px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(255,255,255,0.7);
}

.agent-avatar-large {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    object-fit: cover;
}

form { display: grid; gap: 16px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--ink);
    font: inherit;
}

input:disabled, textarea:disabled {
    background: #edf2e8;
    color: #70816f;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.alert {
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success { background: var(--success); border-color: #b9dec4; }
.alert-error { background: var(--error); border-color: #efb3a8; }

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

.nested-table {
    background: rgba(255,255,255,0.7);
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th { color: var(--muted); font-size: 0.92rem; }

.biodata {
    max-width: 1000px;
    margin: 0 auto;
}

.biodata-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 700;
}

.bio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bio-item {
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
}

.bio-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.profile-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 24px;
}

.status-pill {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.status-active {
    background: #dff4e5;
    color: #1f6a39;
}

.status-suspended {
    background: #fde5de;
    color: #983829;
}

.status-pending {
    background: #fff0cf;
    color: #8a5d12;
}

.pricing-box {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.plan-showcase {
    padding: 24px;
    border-radius: 22px;
    color: white;
    box-shadow: var(--shadow-soft);
}

.basic-plan {
    background: linear-gradient(180deg, #198546, #0f6335);
}

.pro-plan {
    background: linear-gradient(180deg, #ff6f28, #db4d15);
}

.plan-card {
    display: flex;
    gap: 12px;
    align-items: start;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
}

.agent-inline, .agent-detail, .preview-row, .gallery-strip, .action-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.agent-inline { align-items: center; }

.agent-mini {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-photo {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    object-fit: cover;
}

.thumb {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.gallery-strip {
    flex-wrap: wrap;
    margin-top: 16px;
}

.full-profile-layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 24px;
}

.empty-state {
    padding: 24px;
    text-align: center;
    border-radius: 18px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: rgba(255,255,255,0.5);
}

.site-footer {
    padding: 24px 0 36px;
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(18, 10, 6, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.lightbox.is-open { display: flex; }

.lightbox-image {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.agent-app-shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 32px;
}

.agent-app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    box-shadow: var(--shadow);
}

.agent-app-shell > .agent-panel,
.agent-app-shell > .agent-profile-card,
.agent-app-shell > .agent-search-bar,
.agent-app-shell > .earnings-strip,
.agent-app-shell > .section-link {
    width: 100%;
}

.app-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.app-profile-link,
.app-subtitle {
    color: rgba(255, 255, 255, 0.82);
}

.agent-profile-card,
.agent-panel {
    margin-top: 18px;
    padding: 22px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.75);
}

.agent-profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
}

.agent-profile-card h2 {
    margin: 0 0 6px;
}

.agent-profile-card p {
    margin: 0;
    color: var(--muted);
}

.agent-search-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 16px;
    padding: 8px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.agent-search-bar input {
    border: 0;
    background: transparent;
}

.agent-search-bar button {
    padding-inline: 18px;
}

.earnings-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.earning-box {
    padding: 18px;
    border-radius: 18px;
    color: white;
    box-shadow: var(--shadow-soft);
}

.earning-box strong {
    display: block;
    font-size: 1.9rem;
    margin-bottom: 6px;
}

.earning-green { background: linear-gradient(135deg, var(--green), #2a9b57); }
.earning-orange { background: linear-gradient(135deg, var(--accent), #ff8b37); }
.earning-blue { background: linear-gradient(135deg, #4e8fb5, #33739d); }
.earning-gold { background: linear-gradient(135deg, #c69014, #e7b837); }

.section-link {
    display: block;
    margin: 14px 0 8px;
    text-align: center;
    color: var(--green-dark);
    font-weight: 700;
}

.summary-grid,
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card,
.quick-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f6fbf5, #ffffff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.summary-card strong,
.quick-card strong {
    display: block;
    font-size: 1.8rem;
    color: var(--green-dark);
}

.summary-card span,
.quick-card span {
    color: var(--muted);
}

.quick-card strong {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.action-wide {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
}

.payments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-agent-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.mobile-agent-nav a {
    text-align: center;
    color: var(--green-dark);
    font-weight: 700;
    padding: 10px 8px;
    border-radius: 999px;
}

.mobile-agent-nav .active {
    background: rgba(22, 125, 67, 0.12);
}

.mobile-agent-nav .nav-add {
    background: linear-gradient(135deg, var(--green), #2da85d);
    color: white;
}

.admin-app-shell {
    max-width: 1240px;
}

.admin-earnings-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-agent-list {
    display: grid;
    gap: 18px;
}

.admin-agent-card {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fcf6, #ffffff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.admin-agent-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 16px;
}

.admin-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-proof-grid {
    margin-bottom: 16px;
}

.admin-action-row {
    margin-bottom: 18px;
}

.admin-profile-stack h4 {
    margin: 0 0 12px;
}

.admin-profile-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-profile-card strong {
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .hero, .bio-grid, .form-grid, .full-profile-layout, .account-grid, .plan-grid, .promo-totals {
        grid-template-columns: 1fr;
    }

    .hero, .account-hero, .light-band {
        padding: 28px;
    }

    .biodata-top, .dashboard-head, .nav-wrap, .footer-grid, .account-hero {
        flex-direction: column;
        align-items: start;
    }

    .account-badge {
        min-width: 100%;
    }

    .lined-title::before,
    .lined-title::after {
        width: 36px;
    }

    .earnings-strip,
    .summary-grid,
    .quick-grid,
    .payments-grid,
    .admin-earnings-strip,
    .admin-meta-grid,
    .admin-profile-list,
    .finder-grid,
    .directory-layout {
        grid-template-columns: 1fr;
    }

    .section-row {
        flex-direction: column;
        align-items: start;
    }

    .admin-agent-top {
        flex-direction: column;
        align-items: start;
    }

    .mobile-agent-nav {
        position: sticky;
        bottom: 14px;
        border-radius: 999px;
    }
}
