/* ============================================================================
   IQDev WASender Cloud — design system
   A professional, modern SaaS theme layered over Bootstrap 5.3.
   ============================================================================ */

:root {
    /* Brand palette */
    --wa-primary: #0f8a76;       /* deep teal-green */
    --wa-primary-600: #0c7765;
    --wa-primary-700: #0a6555;
    --wa-accent: #25d366;        /* whatsapp green */
    --wa-accent-600: #1eb558;

    --wa-ink: #0f172a;           /* slate-900 */
    --wa-ink-soft: #1e293b;      /* slate-800 */
    --wa-muted: #64748b;         /* slate-500 */
    --wa-border: #e6eaf0;
    --wa-surface: #ffffff;
    --wa-bg: #f4f7fb;
    --wa-bg-2: #eef2f8;

    --wa-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --wa-shadow: 0 4px 14px rgba(15, 23, 42, .07);
    --wa-shadow-lg: 0 18px 48px rgba(15, 23, 42, .16);
    --wa-radius: 14px;

    /* Bootstrap variable overrides → everything inherits the brand */
    --bs-primary: var(--wa-primary);
    --bs-primary-rgb: 15, 138, 118;
    --bs-success: var(--wa-accent-600);
    --bs-link-color: var(--wa-primary-600);
    --bs-link-hover-color: var(--wa-primary-700);
    --bs-body-color: var(--wa-ink-soft);
    --bs-body-bg: var(--wa-bg);
    --bs-border-color: var(--wa-border);
    --bs-font-sans-serif: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { position: relative; min-height: 100%; }

body {
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(37, 211, 102, .06), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(15, 138, 118, .06), transparent 55%),
        var(--wa-bg);
    color: var(--wa-ink-soft);
    font-family: var(--bs-font-sans-serif);
    letter-spacing: .1px;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .5rem 1rem; transition: all .15s ease; }
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(15, 138, 118, .18);
}
.btn-success, .btn-wa {
    background: linear-gradient(135deg, var(--wa-accent) 0%, var(--wa-primary) 100%);
    border: none; color: #fff;
}
.btn-success:hover, .btn-wa:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(15, 138, 118, .28); color: #fff;
}
.btn-primary { background: var(--wa-primary); border-color: var(--wa-primary); }
.btn-primary:hover { background: var(--wa-primary-700); border-color: var(--wa-primary-700); }
.btn-outline-primary { color: var(--wa-primary-600); border-color: var(--wa-primary-600); }
.btn-outline-primary:hover { background: var(--wa-primary-600); border-color: var(--wa-primary-600); }
.btn-sm { border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    box-shadow: var(--wa-shadow-sm);
    background: var(--wa-surface);
}
.card-header {
    background: var(--wa-surface);
    border-bottom: 1px solid var(--wa-border);
    font-weight: 600;
    border-top-left-radius: var(--wa-radius) !important;
    border-top-right-radius: var(--wa-radius) !important;
}
.stat-card, .dash-card {
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    box-shadow: var(--wa-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover, .dash-card:hover { transform: translateY(-2px); box-shadow: var(--wa-shadow); }
.stat-card .value, .dash-card .v { color: var(--wa-ink); font-weight: 700; }

/* Accent strip on metric cards */
.metric-card { position: relative; overflow: hidden; }
.metric-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--wa-accent), var(--wa-primary));
}

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; color: var(--wa-ink-soft); }
.table thead th {
    text-transform: uppercase; font-size: 11px; letter-spacing: .6px;
    color: var(--wa-muted); font-weight: 700; border-bottom: 1px solid var(--wa-border);
}
.table tbody td { border-color: #eef1f6; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; letter-spacing: .2px; padding: .4em .65em; border-radius: 8px; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: 10px; border-color: var(--wa-border); padding: .55rem .8rem;
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--wa-ink-soft); }

/* ---------- Progress ---------- */
.progress { border-radius: 999px; background: #e9eef5; }
.progress-bar { background: linear-gradient(90deg, var(--wa-accent), var(--wa-primary)); }

/* ---------- Alerts ---------- */
.alert { border: 0; border-radius: 12px; }
.alert-success { background: #e7f8ee; color: #0d6a3f; }
.alert-warning { background: #fff6e6; color: #92600b; }
.alert-danger { background: #fdeaea; color: #ad2222; }
.alert-info { background: #e8f3fb; color: #1763a5; }

/* ---------- Customer top navbar ---------- */
.app-navbar {
    background:
        linear-gradient(120deg, rgba(37, 211, 102, .14) 0%, rgba(15, 138, 118, .10) 55%, rgba(37, 211, 102, .06) 100%),
        rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(15, 138, 118, .14);
    box-shadow: 0 4px 18px rgba(15, 138, 118, .08);
    position: relative;
}
/* Thin brand-gradient accent under the bar. */
.app-navbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, .55), rgba(15, 138, 118, .55), transparent);
}
.app-navbar .navbar-brand { font-weight: 800; color: var(--wa-ink); letter-spacing: -.3px; font-size: 1.12rem; }
.app-navbar .navbar-brand .dot { color: var(--wa-accent); }
/* The logo SVG is already a gradient badge with a white mark — show it as-is, just add a soft shadow. */
.app-navbar .brand-logo {
    border-radius: 9px; flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 138, 118, .28);
    transition: transform .25s ease, box-shadow .25s ease;
}
.app-navbar .navbar-brand:hover .brand-logo { transform: translateY(-1px) rotate(-5deg); box-shadow: 0 10px 22px rgba(15, 138, 118, .36); }

.app-navbar .nav-link {
    font-weight: 600; color: var(--wa-muted) !important;
    border-radius: 10px; padding: .5rem .9rem !important;
    display: flex; align-items: center; gap: .45rem;
    transition: background .15s ease, color .15s ease;
}
.app-navbar .nav-link i { font-size: 1.02rem; }
.app-navbar .nav-link:hover { background: var(--wa-bg-2); color: var(--wa-ink) !important; }
.app-navbar .nav-link.active {
    color: var(--wa-primary-700) !important;
    background: linear-gradient(180deg, rgba(37, 211, 102, .12), rgba(15, 138, 118, .10));
    box-shadow: inset 0 0 0 1px rgba(15, 138, 118, .12);
}

/* User dropdown */
.app-navbar .nav-avatar {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    color: #fff; font-size: 12px; font-weight: 700;
    background: linear-gradient(135deg, var(--wa-accent), var(--wa-primary));
    box-shadow: 0 4px 10px rgba(15, 138, 118, .3);
}
.app-navbar .user-menu { color: var(--wa-ink-soft) !important; }
.app-navbar .user-menu::after { color: var(--wa-muted); }
.app-navbar .dropdown-menu { border-radius: 12px; padding: .35rem; min-width: 230px; }
.app-navbar .dropdown-item { border-radius: 8px; padding: .55rem .75rem; font-weight: 500; }
.app-navbar .dropdown-item:hover { background: var(--wa-bg-2); }
.app-navbar .dropdown-item.text-danger:hover { background: #fdeaea; }
@media (max-width: 991.98px) {
    .app-navbar .nav-link.active { box-shadow: none; }
    .app-navbar .dropdown-menu { box-shadow: none !important; border: 1px solid var(--wa-border) !important; }
}

/* ---------- Footer — small, fixed bar at the bottom ---------- */
.app-footer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1010; height: 38px;
    background:
        linear-gradient(120deg, rgba(37, 211, 102, .14) 0%, rgba(15, 138, 118, .10) 55%, rgba(37, 211, 102, .06) 100%),
        rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid rgba(15, 138, 118, .14);
    box-shadow: 0 -4px 16px rgba(15, 138, 118, .08);
}
.app-footer::before {
    content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, .55), rgba(15, 138, 118, .55), transparent);
}
.footer-row {
    height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    font-size: .8rem; color: var(--wa-muted);
}
.footer-copy .dot { color: var(--wa-accent); font-size: .65rem; vertical-align: middle; }
.footer-copy strong { color: var(--wa-ink-soft); font-weight: 700; }
.footer-support { display: inline-flex; align-items: center; gap: 16px; }
.footer-support a { color: var(--wa-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; transition: color .15s ease; }
.footer-support a i { color: var(--wa-primary); }
.footer-support a:hover { color: var(--wa-primary-700); }
/* Reserve space so page content never hides behind the fixed footer. */
body.has-fixed-footer { padding-bottom: 46px; }
@media (max-width: 575.98px) {
    .footer-row { font-size: .72rem; gap: 6px; }
    .footer-support { gap: 10px; }
}

/* ---------- Page heading ---------- */
.page-title { font-weight: 700; color: var(--wa-ink); }
.text-brand { color: var(--wa-primary) !important; }

/* ---------- Admin shell ---------- */
.admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 1030;
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #aeb9cc; display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.04);
    overflow-y: auto; overflow-x: hidden;            /* scroll when there are many links */
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 8px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); }
.admin-sidebar .brand {
    padding: 20px 22px; font-weight: 800; color: #fff; font-size: 18px; letter-spacing: -.2px;
    display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar .brand .logo {
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--wa-accent), var(--wa-primary)); color: #fff;
}
.admin-sidebar .nav-section { padding: 14px 22px 6px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #5b6b85; }
.admin-sidebar a {
    color: #aeb9cc; padding: 11px 22px; display: flex; align-items: center; gap: 12px; font-size: 14px;
    font-weight: 500; border-left: 3px solid transparent; transition: all .12s ease;
}
.admin-sidebar a i { font-size: 17px; width: 20px; text-align: center; }
.admin-sidebar a:hover { background: rgba(255,255,255,.04); color: #fff; }
.admin-sidebar a.active {
    background: linear-gradient(90deg, rgba(37,211,102,.16), transparent);
    color: #fff; border-left-color: var(--wa-accent);
}
.admin-main { margin-left: 248px; min-height: 100vh; }
.admin-topbar {
    background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--wa-border); padding: 14px 26px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1020;
}
.admin-topbar h5 { font-weight: 700; color: var(--wa-ink); }
.admin-content { padding: 26px; }
.avatar-chip {
    display: inline-flex; align-items: center; gap: 8px; background: var(--wa-bg-2);
    padding: 5px 12px 5px 6px; border-radius: 999px; font-size: 13px; color: var(--wa-ink-soft); font-weight: 600;
}
.avatar-chip .av {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px;
    background: linear-gradient(135deg, var(--wa-accent), var(--wa-primary));
}

@media (max-width: 820px) {
    .admin-sidebar { width: 68px; }
    .admin-sidebar .brand span, .admin-sidebar .label, .admin-sidebar .nav-section { display: none; }
    .admin-sidebar a { justify-content: center; padding: 13px 0; }
    .admin-main { margin-left: 68px; }
}

/* ============================================================================
   DataTables — advanced theme (applies to every DataTable in the app)
   ============================================================================ */
.dataTables_wrapper { padding-top: .25rem; }

/* Toolbar: page-length + search */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { margin-bottom: 1rem; }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: .8rem; font-weight: 600; color: var(--wa-muted);
    display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 0;
}
.dataTables_wrapper .dataTables_filter { text-align: right; }
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--wa-border); border-radius: 999px;
    padding: .5rem .95rem .5rem 2.25rem; min-width: 240px; font-size: .88rem; color: var(--wa-ink-soft);
    background-color: var(--wa-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.7 10.7L14 14'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: .85rem center; background-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dataTables_wrapper .dataTables_filter input::placeholder { color: var(--wa-muted); }
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    outline: none; border-color: var(--wa-primary); box-shadow: 0 0 0 3px rgba(15, 138, 118, .14);
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--wa-border); border-radius: 9px; padding: .4rem 1.6rem .4rem .7rem;
    font-size: .85rem; font-weight: 600; color: var(--wa-ink-soft); background-color: var(--wa-surface); cursor: pointer;
}

/* Header + rows */
table.dataTable thead th {
    background: var(--wa-bg-2); border-bottom: 1px solid var(--wa-border) !important;
    text-transform: uppercase; font-size: 11px; letter-spacing: .6px; color: var(--wa-muted); font-weight: 700;
    padding-top: .7rem; padding-bottom: .7rem;
}
table.dataTable tbody tr { transition: background-color .12s ease; }
table.dataTable.table-hover tbody tr:hover { background-color: #eef7f4 !important; }
table.dataTable tbody tr:nth-child(even) td { background-color: #fbfcfe; }
table.dataTable tbody td { vertical-align: middle; }

/* Sort indicators */
table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc { cursor: pointer; }
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:after { opacity: .3; }
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:after { opacity: 1; color: var(--wa-primary); }

/* Info + pagination */
.dataTables_wrapper .dataTables_info { font-size: .8rem; color: var(--wa-muted); padding-top: 1.1rem !important; }
.dataTables_wrapper .dataTables_paginate { padding-top: .85rem; }
.dataTables_wrapper .dataTables_paginate .pagination { gap: .3rem; margin-bottom: 0; }
.dataTables_wrapper .dataTables_paginate .page-link {
    border: 1px solid var(--wa-border); border-radius: 9px; color: var(--wa-ink-soft);
    min-width: 36px; text-align: center; font-size: .85rem; font-weight: 600; padding: .35rem .6rem;
    transition: all .12s ease;
}
.dataTables_wrapper .dataTables_paginate .page-link:hover { background: var(--wa-bg-2); color: var(--wa-ink); border-color: #d6deea; }
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background: var(--wa-primary); border-color: var(--wa-primary); color: #fff; box-shadow: 0 3px 10px rgba(15, 138, 118, .28);
}
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link { color: var(--wa-muted); opacity: .45; }

/* Processing indicator */
.dataTables_wrapper .dataTables_processing {
    border: 1px solid var(--wa-border) !important; border-radius: 12px; box-shadow: var(--wa-shadow);
    font-weight: 600; color: var(--wa-ink-soft); background: var(--wa-surface);
}

/* Small screens: stack the search full-width */
@media (max-width: 575.98px) {
    .dataTables_wrapper .dataTables_filter { text-align: left; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; min-width: 0; }
    .dataTables_wrapper .dataTables_paginate .page-link { min-width: 32px; }
}

/* ---------- Smooth page transitions ---------- */
/* Opacity-only fade — must NOT animate transform: a transform on <main> makes it the
   containing block for position:fixed modals, throwing their position off when scrolled. */
@keyframes iq-page-in { from { opacity: 0; } to { opacity: 1; } }
main, .admin-content { animation: iq-page-in .3s ease both; }
@media (prefers-reduced-motion: reduce) {
    main, .admin-content { animation: none; }
}

/* ---------- Global progress bar (non-blocking, top of the viewport) ---------- */
.iq-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 4000;
    pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.iq-progress.show { opacity: 1; }
.iq-progress.done { opacity: 0; }
.iq-progress-bar {
    height: 100%; width: 0%; border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, var(--wa-accent), var(--wa-primary));
    box-shadow: 0 0 10px rgba(37, 211, 102, .55), 0 0 4px rgba(15, 138, 118, .5);
    transition: width .25s ease;
}
@keyframes iq-spin { to { transform: rotate(360deg); } }

/* Standalone spinner (e.g. the QR panel placeholder) */
.iq-spinner {
    width: 52px; height: 52px; border-radius: 50%;
    border: 4px solid rgba(15, 138, 118, .18); border-top-color: var(--wa-primary);
    animation: iq-spin .8s linear infinite;
}

/* Inline button spinner */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
    content: ""; position: absolute; width: 16px; height: 16px;
    top: calc(50% - 8px); left: calc(50% - 8px);
    border: 2px solid rgba(255, 255, 255, .55); border-top-color: #fff; border-radius: 50%;
    animation: iq-spin .7s linear infinite;
}

/* ---------- Responsive helpers ---------- */
@media (max-width: 576px) {
    .admin-content { padding: 16px; }
    .display-5 { font-size: 2rem; }
    .stat-card .value, .dash-card .v { font-size: 20px; }
    .card-body { padding: 1rem; }
    .btn-lg { padding: .6rem 1rem; font-size: 1rem; }
}
@media (max-width: 767.98px) {
    .app-navbar .navbar-nav { padding: .5rem 0; gap: .25rem !important; }
}

/* ============================================================================
   WhatsApp-style message preview (Send Message + Campaign compose)
   ============================================================================ */
.wa-preview { position: sticky; top: 1rem; }
.wa-phone { border-radius: 16px; overflow: hidden; border: 1px solid var(--wa-border); box-shadow: var(--wa-shadow); }
.wa-phone-head { background: #075e54; color: #fff; padding: .55rem .85rem; display: flex; align-items: center; gap: .6rem; }
.wa-phone-head .wa-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 1.05rem; }
.wa-phone-head .wa-name { font-weight: 600; line-height: 1.1; }
.wa-phone-head .wa-sub { font-size: 11px; opacity: .8; }
.wa-chat {
    padding: 1rem .75rem; min-height: 230px; max-height: 480px; overflow-y: auto;
    background-color: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='%23d8cfc4' fill-opacity='.5'%3E%3Ccircle cx='10' cy='10' r='1.5'/%3E%3Ccircle cx='30' cy='26' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-bubble {
    position: relative; max-width: 88%; margin-left: auto; padding: .35rem .5rem .3rem;
    background: #d9fdd3; border-radius: 8px; border-top-right-radius: 2px;
    font-size: 14.2px; line-height: 1.36; color: #111b21; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); word-wrap: break-word;
}
.wa-bubble::after { content: ''; position: absolute; top: 0; right: -7px; border: 7px solid transparent; border-top-color: #d9fdd3; border-right-width: 0; }
.wa-bubble .wa-media { margin-bottom: .25rem; }
.wa-bubble .wa-media img, .wa-bubble .wa-media video { width: 100%; max-height: 260px; object-fit: cover; border-radius: 6px; display: block; background: #00000010; }
.wa-bubble .wa-text { white-space: pre-wrap; padding: 0 .15rem; }
.wa-bubble .wa-text:empty { display: none; }
.wa-meta { display: flex; justify-content: flex-end; align-items: center; gap: .25rem; font-size: 11px; color: #667781; margin-top: .05rem; padding-right: .1rem; }
.wa-tick { color: #53bdeb; font-size: 14px; line-height: 1; }
.wa-doc { display: flex; align-items: center; gap: .55rem; background: rgba(11, 20, 26, .06); border-radius: 6px; padding: .55rem .65rem; }
.wa-doc i { font-size: 1.7rem; color: #5e6b73; flex: 0 0 auto; }
.wa-doc .wa-doc-name { font-size: 13px; font-weight: 600; color: #111b21; word-break: break-word; }
.wa-doc .wa-doc-sub { font-size: 11px; color: #667781; text-transform: uppercase; }
.wa-audio { display: flex; align-items: center; gap: .55rem; padding: .3rem .15rem; min-width: 210px; }
.wa-audio .wa-play { width: 34px; height: 34px; border-radius: 50%; background: #00a884; color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.wa-audio .wa-wave { flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #00a884 35%, #adb6bb 35%); }
.wa-audio .wa-dur { font-size: 11px; color: #667781; }
.wa-media-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: rgba(11, 20, 26, .05); border: 1px dashed rgba(11, 20, 26, .2); border-radius: 6px; padding: 1.5rem 1rem; color: #5e6b73; }
.wa-media-ph i { font-size: 2.1rem; opacity: .85; }
.wa-media-ph span { font-size: 12px; font-weight: 600; }
.wa-empty { color: #667781; text-align: center; padding: 2.5rem 1rem; font-size: 13px; }

/* Modals: keep Bootstrap's default behavior (Esc + click-outside to close, background
   locked while open), but make the backdrop transparent so there's no dark dimming. */
.modal-backdrop.show { opacity: 0; }
.modal-body { background: #fff; }

/* ============================================================================
   Dashboard UI — shared by the Customer and Admin dashboards
   ============================================================================ */
.dash-hero {
    background: linear-gradient(120deg, var(--wa-primary) 0%, var(--wa-primary-700) 62%, #0b4f43 100%);
    color: #fff; border-radius: var(--wa-radius); padding: 24px 26px; box-shadow: var(--wa-shadow);
    position: relative; overflow: hidden;
}
.dash-hero::after { content: ""; position: absolute; right: -50px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(37,211,102,.40), transparent 70%); }
.dash-hero::before { content: ""; position: absolute; right: 90px; bottom: -80px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.dash-hero .greet { font-size: 1.55rem; font-weight: 800; letter-spacing: -.3px; }
.dash-hero .sub { color: rgba(255,255,255,.82); font-size: .9rem; margin-top: 2px; }
.dash-hero .btn-light { background: rgba(255,255,255,.95); border: none; color: var(--wa-primary-700); font-weight: 600; }
.dash-hero .btn-light:hover { background: #fff; }
.dash-hero .btn-ghost { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.30); color: #fff; }
.dash-hero .btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.hero-pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.hero-pill.clock { font-variant-numeric: tabular-nums; }
.pulse-ok { background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: pulseDot 1.8s infinite; }
.pulse-off { background: #fbbf24; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

.kpi { display: flex; gap: 14px; align-items: center; padding: 18px; }
.kpi-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; flex-shrink: 0; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px rgba(15,23,42,.14); }
.kpi-label { font-size: 11.5px; color: var(--wa-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.kpi-value { font-size: 25px; font-weight: 800; color: var(--wa-ink); line-height: 1.12; }
.kpi-sub { font-size: 12px; color: var(--wa-muted); }

.ring { --p: 0; --size: 116px; width: var(--size); height: var(--size); border-radius: 50%;
    background: conic-gradient(var(--wa-accent) calc(var(--p) * 1%), var(--wa-bg-2) 0);
    display: grid; place-items: center; position: relative; }
.ring.warn { background: conic-gradient(#ef4444 calc(var(--p) * 1%), var(--wa-bg-2) 0); }
.ring::before { content: ""; position: absolute; inset: 11px; background: var(--wa-surface); border-radius: 50%; }
.ring .ring-in { position: relative; text-align: center; line-height: 1.05; }
.ring .ring-in b { font-size: 22px; font-weight: 800; color: var(--wa-ink); }
.ring .ring-in span { font-size: 11px; color: var(--wa-muted); }

.mini-stat { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--wa-border); }
.mini-stat:last-child { border-bottom: none; }
.mini-stat .lbl { display: flex; align-items: center; gap: 8px; color: var(--wa-muted); font-size: .86rem; }
.av-num { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--wa-bg-2); color: var(--wa-primary-700); font-size: .85rem; flex-shrink: 0; }
.dash-card .card-header { background: transparent; }


