:root {
    --ink: #0b1424;
    --slate: #2a3a52;
    --glow: #22d1b2;
    --accent: #ffb347;
    --mint: #dff8f2;
    --fog: #eef3fb;
    --paper: #ffffff;
    --shadow: 0 24px 60px rgba(11, 20, 36, 0.15);
    --ring: 0 0 0 6px rgba(34, 209, 178, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 20% 15%, #e3f3ff 0%, #f8fafc 30%, #eef3fb 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(34, 209, 178, 0.12), transparent 35%),
        radial-gradient(circle at 85% 10%, rgba(255, 179, 71, 0.15), transparent 35%),
        linear-gradient(rgba(12, 22, 36, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 22, 36, 0.03) 1px, transparent 1px);
    background-size: auto, auto, 64px 64px, 64px 64px;
    background-position: 0 0, 0 0, -1px -1px, -1px -1px;
    pointer-events: none;
    z-index: -1;
}

.page-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 243, 251, 0.7) 100%);
    border-radius: 32px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 96px 0 64px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: -120px;
    background: radial-gradient(circle, rgba(34, 209, 178, 0.25) 0%, rgba(34, 209, 178, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: -220px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.2) 0%, rgba(255, 179, 71, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-card {
    background: var(--paper);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(36, 50, 70, 0.08);
}

.section-title {
    font-family: "IBM Plex Serif", "Georgia", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem);
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--slate);
}

.service-tile {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid rgba(36, 50, 70, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(12, 22, 36, 0.14);
}

.badge-soft {
    background: rgba(34, 209, 178, 0.15);
    color: #0b5d52;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.header-top {
    backdrop-filter: blur(12px);
    background: linear-gradient(100deg, #1b0d3a 0%, #2c115b 35%, #0f406b 70%, #0c5a4f 100%);
    color: #0b1424;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-top .text-secondary {
    color: #0b1424 !important;
}

.header-top i {
    color: #0b1424;
}

.header-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.header-social-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    color: #d6e6ff;
}

.header-main {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(36, 50, 70, 0.1);
    box-shadow: 0 14px 36px rgba(12, 22, 36, 0.12);
}

.navbar-nav .nav-link {
    position: relative;
    padding-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #7b5bff, #27d9c7, #ffb347);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
    transform: scaleX(1);
}

.header-social a {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-social a:hover,
.header-social a:focus {
    color: #0c1624;
    background: #ffffff;
    transform: translateY(-1px);
}

.pill {
    background: rgba(11, 20, 36, 0.08);
    color: var(--slate);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.cta-panel {
    background: linear-gradient(135deg, #0c1624, #0e4b57);
    color: #f5f9ff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 26px 60px rgba(12, 22, 36, 0.25);
}

.cta-panel .pill {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.footer {
    background: #0c1624;
    color: #c7d4e5;
    padding: 40px 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-logo {
    height: 38px;
    width: auto;
}

.footer-text {
    color: #c7d4e5;
    margin-bottom: 16px;
    max-width: 320px;
}

.footer-contact {
    color: #c7d4e5;
}

.footer-contact i {
    color: var(--glow);
    margin-right: 8px;
}

.footer-social {
    display: inline-flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #c7d4e5;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    color: #0c1624;
    background: #ffffff;
    transform: translateY(-1px);
}

.footer-title {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 16px;
}

.footer-links a {
    color: #c7d4e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #ffffff;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.form-card {
    background: var(--paper);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 18px 40px rgba(12, 22, 36, 0.1);
}

.form-card .form-control,
.form-card .form-select {
    border-radius: 12px;
    border-color: rgba(42, 58, 82, 0.15);
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    box-shadow: var(--ring);
    border-color: rgba(34, 209, 178, 0.6);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo img {
    height: 60px;
    width: auto;
}

.navbar {
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid rgba(36, 50, 70, 0.08);
}

.nav-link {
    font-weight: 500;
    color: var(--slate);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--ink);
}

.btn-dark {
    background: #0b1424;
    border: none;
    box-shadow: 0 12px 24px rgba(12, 22, 36, 0.18);
    color: #fff;
}

.btn-dark:hover {
    background: #0a111e;
}

.navbar .btn {
    padding: 0.55rem 1.2rem;
    line-height: 1.2;
}

.btn-outline-dark {
    border-width: 2px;
}

.nav-pill {
    border-radius: 999px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #1ad6c2, #14b7c3 55%, #ffb347 120%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(20, 183, 195, 0.28);
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-pill:hover,
.nav-pill:focus {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(20, 183, 195, 0.32);
    filter: saturate(1.08);
    color: #ffffff;
}

.icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: #0b5d52;
    font-size: 1.4rem;
    box-shadow: inset 0 0 0 1px rgba(11, 93, 82, 0.08);
}

.stat-card {
    background: var(--paper);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(36, 50, 70, 0.08);
}

.timeline {
    border-left: 2px dashed rgba(36, 50, 70, 0.18);
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    padding: 12px 0 12px 12px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 0 6px rgba(34, 209, 178, 0.2);
}

.list-check li {
    margin-bottom: 8px;
}

.list-check i {
    color: var(--glow);
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow);
    border-radius: 24px;
}

.section-surface {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(36, 50, 70, 0.08);
    border-radius: 28px;
    padding: 32px;
}

.live-help-status {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 209, 178, 0.18);
    color: #0b5d52;
    font-size: 0.85rem;
}

.live-help-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 20px;
}

.live-help-card {
    background: #0b1424;
    border-radius: 18px;
    padding: 12px;
    position: relative;
}

.live-help-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
    object-fit: cover;
}

.live-help-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.live-help-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.live-help-link {
    background: rgba(11, 20, 36, 0.08);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    word-break: break-all;
}

.fade-up {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.8s ease forwards;
}

.fade-up.delay-1 {
    animation-delay: 0.15s;
}

.fade-up.delay-2 {
    animation-delay: 0.3s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-sidebar {
    background: #101d2d;
    color: #dfe7f3;
    min-height: 100vh;
    min-width: 220px;
    max-width: 240px;
    transition: transform 0.3s ease;
    z-index: 1050;
}

.admin-sidebar a {
    color: #dfe7f3;
    text-decoration: none;
}

/* Sidebar hamburger toggle */
.admin-sidebar-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1060;
    background: #101d2d;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}
.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.admin-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Admin main content */
.admin-main {
    min-width: 0;
    overflow-x: hidden;
}

/* ── Admin Responsive ── */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        min-width: 260px;
        max-width: 280px;
        overflow-y: auto;
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        padding-top: 60px !important;
    }
    .admin-wrapper {
        flex-direction: column;
    }
}

@media (min-width: 992px) {
    .admin-sidebar-toggle { display: none !important; }
    .admin-sidebar-overlay { display: none !important; }
}

/* Admin tables — stack on small screens */
@media (max-width: 575.98px) {
    .admin-main .d-flex.justify-content-between {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
    }
    .admin-main .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    .admin-main .btn-sm {
        font-size: 0.78rem;
        padding: 4px 10px;
    }
    .admin-main .section-title {
        font-size: 1.3rem;
    }
    .admin-main .table th,
    .admin-main .table td {
        font-size: 0.8rem;
        padding: 8px 6px;
        white-space: nowrap;
    }
    .admin-main .card-body {
        padding: 12px;
    }
    .admin-main .p-4 {
        padding: 12px !important;
    }
    /* Invoice form fixes */
    .invoice-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }
    .invoice-total-box {
        padding: 12px;
    }
    .invoice-total-box .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    .invoice-total-box input[style*="width: 120px"] {
        width: 100% !important;
    }
    .signature-pad canvas {
        width: 100% !important;
        height: 160px;
    }
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(34, 211, 238, 0.08));
    border: 1px solid rgba(36, 50, 70, 0.08);
}

.invoice-total-box {
    background: #f8fafc;
    border: 1px solid rgba(36, 50, 70, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.signature-pad {
    border: 2px dashed rgba(36, 50, 70, 0.2);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.signature-pad canvas {
    width: 100%;
    height: 200px;
    display: block;
}

.chat-notification-badge {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) scale(1.1);
    }
}

.table thead {
    background: #0c1624;
    color: #fff;
}

.table tbody tr {
    border-color: rgba(36, 50, 70, 0.08);
}

.status-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(34, 209, 178, 0.18);
    color: #0b5d52;
}

.bg-soft {
    background: rgba(255, 255, 255, 0.7);
}

.border-soft {
    border: 1px solid rgba(36, 50, 70, 0.08);
}

@media (max-width: 768px) {
    .hero {
        padding: 72px 0 48px;
    }

    .cta-panel {
        padding: 24px;
    }

    .page-shell {
        padding: 24px;
        border-radius: 20px;
    }

    .section-surface {
        padding: 24px;
        border-radius: 22px;
    }

    .service-tile {
        padding: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 992px) {
    .header-top .container {
        row-gap: 8px;
    }

    .header-social-label {
        display: none;
    }

    .navbar-nav {
        gap: 0.5rem;
        padding-top: 12px;
    }

    .nav-pill {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }

    .brand-logo img {
        height: 42px;
    }
}

@media (max-width: 576px) {
    .header-top .container {
        justify-content: center;
        text-align: center;
    }

    .header-social {
        border-left: none;
        padding-left: 0;
    }

    .form-card {
        padding: 20px;
    }

    .hero::after,
    .hero::before {
        opacity: 0.6;
    }
}

/* ── Admin Footer ── */
.admin-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 0 0.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
}
.admin-footer-inner {
    padding: 0 1.5rem;
}
.admin-footer-brand {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a1a2e;
    margin-right: 10px;
}
.admin-footer-copy {
    font-size: 0.78rem;
    color: #6c757d;
}
.admin-footer-status {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}
.admin-footer-version {
    font-size: 0.7rem;
    color: #adb5bd;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .admin-footer-left, .admin-footer-right {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ── Print Styles ── */
@media print {
    .admin-sidebar, .admin-sidebar-toggle, .admin-sidebar-overlay,
    .admin-footer, .no-print, .btn, .alert { display: none !important; }
    .admin-main { padding: 0 !important; margin: 0 !important; }
    .admin-wrapper { display: block !important; }
    body { background: #fff !important; }
    .print-only { display: block !important; }
}
