@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0c0406;
    --bg-deep: #1a0508;
    --burgundy: #5c0a12;
    --burgundy-soft: #8b1a24;
    --gold: #d4af37;
    --gold-soft: #f0d78c;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-strong: rgba(255, 255, 255, 0.12);
    --text: #f7f2ea;
    --muted: rgba(247, 242, 234, 0.65);
    --danger: #ff6b7a;
    --success: #5ddea8;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 70% 10%, rgba(120, 20, 35, 0.55), transparent 55%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(80, 10, 20, 0.4), transparent 50%),
        linear-gradient(180deg, #1a0508 0%, #0c0406 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 75% 20%, rgba(212, 175, 55, 0.08), transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(139, 26, 36, 0.2), transparent 45%);
    z-index: 0;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

.hero-card {
    width: min(440px, 100%);
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    object-fit: cover;
}

.glass-form {
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(80, 10, 20, 0.35) 100%
    );
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 22px 18px 24px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.glass-form[hidden] {
    display: none;
}

.hero-img.is-rounded {
    border-radius: var(--radius);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label,
.label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--gold-soft);
    letter-spacing: -0.01em;
}

input[type="text"],
input[type="tel"],
input[type="password"],
textarea {
    width: 100%;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: rgba(247, 242, 234, 0.35);
}

input:focus,
textarea:focus {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.type-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.25);
    color: var(--muted);
    border-radius: 14px;
    padding: 14px 12px;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.type-btn:active {
    transform: scale(0.97);
}

.type-btn.active {
    color: #1a0a0c;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.submit-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-top: 4px;
    appearance: none;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    font: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #a31828 0%, #6b0d18 45%, #8b1a24 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 12px 32px rgba(139, 26, 36, 0.55),
        0 0 40px rgba(212, 175, 55, 0.15);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    animation: pulse-cta 2.4s ease-in-out infinite;
}

.submit-btn:hover {
    filter: brightness(1.08);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18) inset,
        0 16px 40px rgba(139, 26, 36, 0.65),
        0 0 50px rgba(212, 175, 55, 0.25);
}

.submit-btn:active {
    transform: scale(0.98);
    animation: none;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    animation: none;
}

.submit-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 65%
    );
    transform: translateX(-120%);
    animation: shine 2.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.submit-text {
    position: relative;
    z-index: 1;
}

.form-msg {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 12px;
}

.form-msg.ok {
    color: var(--success);
    background: rgba(93, 222, 168, 0.12);
    border: 1px solid rgba(93, 222, 168, 0.25);
}

.form-msg.err {
    color: var(--danger);
    background: rgba(255, 107, 122, 0.12);
    border: 1px solid rgba(255, 107, 122, 0.25);
}

.success-panel {
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(80, 10, 20, 0.35) 100%
    );
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 36px 22px 40px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.success-panel[hidden] {
    display: none;
}

.success-panel.show {
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-icon {
    margin-bottom: 6px;
}

.success-circle {
    stroke: var(--success);
    stroke-width: 2.5;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke-draw 0.55s ease-out 0.1s forwards;
}

.success-check {
    stroke: var(--success);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke-draw 0.35s ease-out 0.45s forwards;
}

.success-panel h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--success);
}

.success-panel p {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes stroke-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shine {
    0%, 40% { transform: translateX(-120%); }
    60%, 100% { transform: translateX(120%); }
}

@keyframes pulse-cta {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.12) inset,
            0 12px 32px rgba(139, 26, 36, 0.55),
            0 0 40px rgba(212, 175, 55, 0.15);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.18) inset,
            0 14px 36px rgba(139, 26, 36, 0.7),
            0 0 56px rgba(212, 175, 55, 0.32);
        transform: translateY(-1px);
    }
}

/* ===== Admin ===== */
.admin-body {
    padding: 20px 14px calc(40px + env(safe-area-inset-bottom));
    min-height: 100dvh;
}

html[data-theme="light"] body.admin-body {
    background:
        radial-gradient(ellipse 80% 50% at 70% 10%, rgba(180, 60, 80, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(212, 175, 55, 0.1), transparent 50%),
        linear-gradient(180deg, #f7f1ea 0%, #efe4d8 100%);
    color: #1a0a0c;
}

html[data-theme="light"] .admin-body .bg-glow {
    background:
        radial-gradient(circle at 75% 20%, rgba(212, 175, 55, 0.12), transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(139, 26, 36, 0.06), transparent 45%);
}

html[data-theme="light"] {
    --text: #1a0a0c;
    --muted: rgba(26, 10, 12, 0.55);
    --glass-border: rgba(26, 10, 12, 0.1);
    --gold-soft: #9a7a1a;
    --danger: #c62840;
    --success: #1f8a5a;
    --shadow: 0 16px 40px rgba(80, 30, 40, 0.1);
}

html[data-theme="light"] .glass-panel {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.65) 100%
    );
    border-color: rgba(26, 10, 12, 0.1);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .admin-body input,
html[data-theme="light"] .admin-body textarea {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(26, 10, 12, 0.14);
    color: #1a0a0c;
}

html[data-theme="light"] .admin-body input:focus,
html[data-theme="light"] .admin-body textarea:focus {
    background: #fff;
}

html[data-theme="light"] .btn-link,
html[data-theme="light"] .btn-sm:not(.btn-gold):not(.btn-danger),
html[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(26, 10, 12, 0.12);
    color: #1a0a0c;
}

html[data-theme="light"] .badge-package {
    background: rgba(139, 26, 36, 0.1);
    color: #8b1a24;
    border-color: rgba(139, 26, 36, 0.2);
}

html[data-theme="light"] .lead-mobile {
    color: #8b1a24;
    background: rgba(139, 26, 36, 0.08);
}

.admin-wrap {
    width: min(720px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.glass-panel {
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-header-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
}

.admin-header-text p {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 2px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 14px 10px;
    min-height: 88px;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--text);
}

.stat-consult .stat-value {
    color: var(--gold-soft);
}

.stat-package .stat-value {
    color: #ff8a96;
}

html[data-theme="light"] .stat-package .stat-value {
    color: #8b1a24;
}

.theme-toggle {
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: rgba(212, 175, 55, 0.45);
}

html[data-theme="dark"] .theme-toggle .icon-moon,
html[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

.btn-link,
.btn-sm {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.btn-link:hover,
.btn-sm:hover:not(.btn-gold):not(.btn-danger) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.btn-gold {
    background: linear-gradient(135deg, #2ecf8a 0%, #1a9e68 100%);
    color: #042016;
    border: none;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(46, 207, 138, 0.28);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #3adb98 0%, #1fb574 100%);
    color: #042016;
    border: none;
    box-shadow: 0 10px 24px rgba(46, 207, 138, 0.4);
    filter: none;
}

.btn-danger {
    background: rgba(255, 107, 122, 0.18);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 122, 0.35);
    font-weight: 700;
}

.btn-danger:hover {
    background: rgba(255, 107, 122, 0.28);
    border-color: rgba(255, 107, 122, 0.5);
}

.login-form {
    width: min(380px, 100%);
    margin: 12vh auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.login-top h1 {
    font-size: 1.35rem;
    text-align: center;
    margin: 0;
}

.login-top .theme-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.login-form .hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.leads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    transition: box-shadow 0.2s;
}

.lead-card-removing {
    animation: lead-remove 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    border-color: rgba(255, 107, 122, 0.45) !important;
    background: rgba(255, 107, 122, 0.12) !important;
}

@keyframes lead-remove {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 600px;
        margin-bottom: 0;
        padding-top: 16px;
        padding-bottom: 16px;
    }
    55% {
        opacity: 0.35;
        transform: translateX(28px) scale(0.97);
    }
    100% {
        opacity: 0;
        transform: translateX(56px) scale(0.92);
        max-height: 0;
        margin-bottom: -12px;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
    }
}

.lead-card-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lead-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lead-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}

.lead-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    direction: ltr;
    color: var(--gold-soft);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: background 0.2s, border-color 0.2s;
}

.lead-mobile:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
}

.mobile-ltr {
    direction: ltr;
    unicode-bidi: embed;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    color: inherit;
}

.lead-datetime {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: fit-content;
}

html[data-theme="light"] .lead-datetime {
    background: rgba(26, 10, 12, 0.04);
    border-color: rgba(26, 10, 12, 0.08);
}

.dt-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dt-item svg {
    flex-shrink: 0;
    color: var(--gold-soft);
    opacity: 0.9;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-consult {
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-package {
    background: rgba(139, 26, 36, 0.35);
    color: #ffb4bc;
    border: 1px solid rgba(255, 107, 122, 0.3);
}

.lead-footer {
    width: 100%;
}

.notes-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-soft);
}

.notes-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notes-form textarea {
    min-height: 72px;
    resize: vertical;
    font-size: 0.9rem;
    padding: 12px;
    width: 100%;
}

.notes-status {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0;
}

.notes-status.ok {
    color: var(--success);
}

.notes-status.err {
    color: var(--danger);
}

.notes-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.lead-card-actions .btn-sm {
    min-height: 42px;
    width: 100%;
}

.delete-form-hidden {
    display: none;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.flash.ok {
    color: var(--success);
    background: rgba(93, 222, 168, 0.12);
    border: 1px solid rgba(93, 222, 168, 0.25);
}

.flash.err {
    color: var(--danger);
    background: rgba(255, 107, 122, 0.12);
    border: 1px solid rgba(255, 107, 122, 0.25);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.page-btn,
.page-num {
    appearance: none;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.page-btn:hover,
.page-num:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.page-num.active,
a.page-num.active,
span.page-num.active {
    background: linear-gradient(135deg, #f0d78c, #d4af37) !important;
    color: #1a0a0c !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
    pointer-events: none;
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

html[data-theme="light"] .page-btn,
html[data-theme="light"] .page-num:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(26, 10, 12, 0.12);
}

html[data-theme="light"] .flash.ok {
    background: rgba(31, 138, 90, 0.1);
    border-color: rgba(31, 138, 90, 0.22);
}

html[data-theme="light"] .flash.err {
    background: rgba(198, 40, 64, 0.08);
    border-color: rgba(198, 40, 64, 0.2);
}

@media (max-width: 640px) {
    .admin-body {
        padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions .btn-link {
        flex: 1;
        min-height: 42px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-box {
        padding: 12px 6px;
        min-height: 78px;
        border-radius: 16px;
    }

    .stat-label {
        font-size: 0.68rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .glass-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .lead-card {
        padding: 14px;
        gap: 12px;
    }

    .lead-name {
        font-size: 1rem;
    }

    .lead-mobile {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .login-form {
        margin-top: 8vh;
        padding: 18px 16px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-btn {
        flex: 1;
        min-width: 80px;
    }
}

@media (min-width: 641px) {
    .lead-card-top {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 0.9fr);
        align-items: center;
        gap: 16px;
    }

    .lead-identity {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
    }

    .lead-datetime {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 14px;
        width: max-content;
        justify-self: center;
    }

    .lead-mobile {
        justify-self: end;
        align-self: center;
        width: auto;
    }

    .notes-row {
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
    }

    .notes-row textarea {
        flex: 1;
        min-height: 88px;
    }

    .lead-card-actions {
        width: 150px;
        grid-template-columns: 1fr;
        flex-shrink: 0;
    }

    .lead-card-actions .btn-sm {
        min-width: 0;
    }
}
