* { box-sizing: border-box; }
[hidden] {
    display: none !important;
}
:root {
    --bg: #edf3ff;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-strong: #ffffff;
    --text: #16233f;
    --muted: #8592ad;
    --line: #e5ecf7;
    --primary: #4f74ff;
    --primary-2: #6d8fff;
    --teal: #0e5e72;
    --teal-2: #14cfc0;
    --green: #33c889;
    --orange: #ffad33;
    --danger: #ff6467;
    --sidebar: #0d152c;
    --sidebar-soft: #122140;
    --shadow: 0 24px 60px rgba(39, 58, 94, 0.10);
    --radius: 24px;
}
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(89, 129, 255, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(20, 207, 192, 0.10), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #edf3ff 100%);
}
.wa-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e8edf3;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    min-width: 280px;
    transition: all 0.25s ease;
}

/* HOVER */
.wa-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

/* LEFT SIDE */
.wa-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ICON */
.wa-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f3f6f9;
}

/* TEXT */
.wa-text {
    display: flex;
    flex-direction: column;
}

.wa-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2d3d;
}

.wa-sub {
    font-size: 12px;
    color: #6b7a90;
}

/* RIGHT DOT */
.wa-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

/* CONNECTED */
.connected .wa-icon {
    background: rgba(37, 211, 102, 0.12);
    color: #25D366;
}

.connected .wa-indicator {
    background: #25D366;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.6);
}

/* subtle pulse */
.connected .wa-indicator::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    animation: pulse 1.6s infinite;
    opacity: 0.5;
}

/* DISCONNECTED */
.disconnected .wa-icon {
    background: rgba(255, 80, 80, 0.12);
    color: #ff4d4d;
}

.disconnected .wa-indicator {
    background: #ff4d4d;
}

/* ANIMATION */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.2); opacity: 0; }
}
.login-page {
    min-height: 100vh;
    overflow: hidden;
}
.login-shell {
    min-height: 100vh;
    padding: 20px;
    display: grid;
    place-items: center;
}
.login-stage {
    width: min(1180px, 100%);
    padding: 22px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(89, 129, 255, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(20, 207, 192, 0.12), transparent 24%),
        rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(220, 230, 245, 0.95);
    box-shadow: 0 30px 80px rgba(39, 58, 94, 0.14);
    backdrop-filter: blur(16px);
}
.login-brandbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.login-secure-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f1fff6, #e7fff1);
    color: #24a167;
    font-size: 13px;
    font-weight: 700;
}
.login-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
}
.login-showcase {
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.10), transparent 22%),
        linear-gradient(135deg, #0f4251 0%, #0f6e79 56%, #19cdbd 100%);
    color: #fff;
    box-shadow: 0 30px 70px rgba(7, 116, 118, 0.22);
    position: relative;
    overflow: hidden;
}
.login-showcase h1 {
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: -.04em;
    max-width: 720px;
    margin: 14px 0 16px;
}
.login-showcase p {
    color: rgba(255,255,255,0.84);
    max-width: 620px;
    line-height: 1.7;
    font-size: 15px;
}
.login-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}
.login-feature-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.login-feature-card strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}
.login-feature-card span {
    color: rgba(233, 247, 255, 0.82);
    font-size: 14px;
    line-height: 1.6;
}
.login-footer-note {
    margin-top: 28px;
    color: rgba(234, 247, 255, 0.82);
    font-size: 13px;
    line-height: 1.6;
}
.login-footer-note a {
    color: #ffffff;
    font-weight: 700;
}
.login-panel {
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.96));
    border: 1px solid rgba(229, 236, 247, 0.95);
    box-shadow: var(--shadow);
}
.login-panel-head h2 {
    font-size: 34px;
    letter-spacing: -.03em;
    margin: 10px 0 8px;
}
.login-panel-head p {
    color: var(--muted);
    line-height: 1.6;
}
.login-field {
    display: grid;
    gap: 8px;
}
.login-field > span {
    font-size: 13px;
    font-weight: 700;
    color: #506285;
}
.login-input-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    min-height: 56px;
    border-radius: 16px;
    background: #f7f9fe;
    border: 1px solid var(--line);
}
.login-input-wrap input {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.login-input-icon {
    color: #8fa0bf;
    font-size: 16px;
}
.login-password-toggle {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #eef3ff;
    color: #536686;
}
.login-submit {
    min-height: 54px;
    width: 100%;
    margin-top: 6px;
}
.login-meta-strip {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.login-meta-strip strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1b2741;
}
.login-meta-strip span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; color: var(--muted); }
input, select, textarea, button { font: inherit; }
button { border: 0; cursor: pointer; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0d152c 0%, #10192f 100%);
    color: #fff;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 30;
    box-shadow: 18px 0 40px rgba(10, 18, 35, 0.08);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(83, 216, 206, 0.45) rgba(255, 255, 255, 0.06);
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(83, 216, 206, 0.86), rgba(79, 116, 255, 0.72));
    border-radius: 999px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 16px;
}
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #93e275, #f4c85b);
    color: #0d1730;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; font-size: 12px; color: #90a0c4; margin-top: 2px; }
.sidebar-group-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7687ac;
    padding: 0 10px;
}
.nav-stack { display: grid; gap: 8px; }
.nav-stack a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d8e2ff;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    transition: all .18s ease;
}
.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #c9dafd;
    font-size: 15px;
    flex: 0 0 auto;
}
.nav-stack a:hover,
.nav-stack a.active {
    background: linear-gradient(90deg, #15364a, #103345);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(83, 216, 206, 0.10);
}
.nav-stack a:hover .nav-icon,
.nav-stack a.active .nav-icon {
    background: linear-gradient(135deg, rgba(83, 216, 206, 0.22), rgba(79, 116, 255, 0.28));
    color: #ffffff;
}
.sidebar-promo {
    margin-top: auto;
    background: linear-gradient(180deg, rgba(26, 44, 78, 0.96), rgba(19, 34, 58, 0.96));
    border: 1px solid rgba(144, 160, 196, 0.16);
    border-radius: 20px;
    padding: 16px;
}
.sidebar-promo strong {
    display: block;
    margin: 8px 0;
    font-size: 16px;
}
.sidebar-promo p {
    color: #9fb1d6;
    font-size: 13px;
    line-height: 1.5;
}

.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 20;
}
.mobile-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.main-panel {
    padding: 20px;
    min-width: 0;
    overflow-x: clip;
}

.premium-topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(231, 237, 247, 0.85);
    box-shadow: var(--shadow);
    border-radius: 22px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 5;
    overflow: visible;
}
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-left {
    min-width: 0;
    flex: 1 1 auto;
}
.topbar-datetime {
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.03em;
    font-weight: 800;
    color: #1a2744;
    white-space: nowrap;
}
.sidebar-toggle {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #edf2ff;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 11px;
}
.sidebar-toggle span {
    display: block;
    height: 2px;
    background: #40527e;
    border-radius: 999px;
}
.eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #66a3a5;
    margin-bottom: 6px;
    font-weight: 700;
}
.topbar h1 {
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f9fe;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    min-width: 300px;
    height: 46px;
}
.topbar-search input {
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}
.topbar-search-icon { color: #8fa0bf; font-size: 16px; }
.wa-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 8px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fbfcff;
    min-width: 0;
}
.wa-status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.wa-status-copy {
    min-width: 0;
}
.wa-status-copy strong {
    display: block;
    font-size: 12px;
    line-height: 1.1;
}
.wa-status-copy span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.wa-status-pill.is-connected .wa-status-dot {
    background: #18b78c;
    box-shadow: 0 0 0 4px rgba(24, 183, 140, 0.14);
}
.wa-status-pill.is-disconnected .wa-status-dot {
    background: #ff6467;
    box-shadow: 0 0 0 4px rgba(255, 100, 103, 0.14);
}
.topbar-icon-row { display: flex; gap: 10px; }
.notification-menu {
    position: relative;
}
.topbar-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f7f9fe;
    border: 1px solid var(--line);
    color: #6d7ea0;
    position: relative;
}
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5d6c;
    box-shadow: 0 0 0 3px rgba(255, 93, 108, 0.18);
}
.notification-popover {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 320px;
    max-width: min(320px, calc(100vw - 42px));
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 236, 247, 0.95);
    box-shadow: var(--shadow);
    display: none;
    z-index: 45;
    overflow: hidden;
}
.notification-menu.is-open .notification-popover {
    display: block;
}
.notification-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--line);
}
.notification-header strong {
    display: block;
    font-size: 16px;
}
.notification-header span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.notification-list {
    max-height: 340px;
    overflow-y: auto;
}
.notification-item {
    padding: 14px 18px;
    border-bottom: 1px solid #eef3fa;
}
.notification-item:last-child {
    border-bottom: 0;
}
.notification-item strong {
    display: block;
    font-size: 14px;
    color: #1b2a49;
}
.notification-item p {
    margin: 5px 0 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #6c7f9f;
}
.notification-item span {
    font-size: 11px;
    color: #92a0b8;
}
.notification-item-empty {
    text-align: center;
}
.profile-chip {
    display: flex;
    align-items: left;
    gap: 10px;
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px 10px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.profile-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(70, 94, 138, 0.10);
}
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7aa6ff, #53d8ce);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.profile-meta strong { display: block; font-size: 14px; }
.profile-meta span { display: block; font-size: 12px; color: var(--muted); text-align:left; }
.profile-menu {
    position: relative;
}
.profile-popover {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 260px;
    max-width: min(260px, calc(100vw - 48px));
    padding: 18px 16px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff9b8, #fff3a0);
    border: 1px solid rgba(209, 189, 86, 0.45);
    box-shadow: 0 24px 40px rgba(77, 67, 19, 0.18);
    display: none;
    z-index: 40;
    transform: none;
    overflow: hidden;
}
.profile-menu.is-open .profile-popover {
    display: block;
}
.profile-note-pin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8e8e, #e14545);
    box-shadow: 0 6px 12px rgba(225, 69, 69, 0.28);
    position: absolute;
    top: 10px;
    right: 10px;
}
.profile-note {
    background: rgba(255, 255, 255, 0.32);
    border: 1px dashed rgba(143, 120, 23, 0.28);
    border-radius: 14px;
    padding: 12px 13px;
    margin-bottom: 10px;
}
.profile-note-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7b6a1f;
    margin-bottom: 6px;
}
.profile-note strong {
    display: block;
    color: #3f3716;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}
.profile-note-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    min-height: 44px;
    border-radius: 14px;
    background: #25314f;
    color: #fff;
    font-weight: 700;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}
.alert-success { background: #e8fff3; color: #0f7b4b; }
.alert-danger { background: #fff0f1; color: #c13e4b; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    background: var(--panel);
    border: 1px solid rgba(229, 236, 247, 0.95);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 18px;
    min-width: 0;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 66px rgba(39, 58, 94, 0.13);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 700;
}
.btn-primary { background: linear-gradient(90deg, #0e9188, #15bca8); color: #fff; }
.btn-secondary { background: #eef3ff; color: #536686; }
.stack {
    display: grid;
    gap: 16px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-grid label {
    display: grid;
    gap: 8px;
}
.form-grid label span {
    font-size: 13px;
    font-weight: 700;
    color: #506285;
}
.full-span {
    grid-column: 1 / -1;
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th {
    font-size: 12px;
    color: #8b9ab5;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.datatable-shell {
    display: grid;
    gap: 14px;
}
.datatable-controls,
.datatable-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.datatable-search-wrap {
    flex: 1 1 260px;
}
.datatable-search {
    background: #f8fbff;
}
.datatable-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.datatable-pagesize-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
.datatable-pagesize {
    width: auto;
    min-width: 82px;
    padding: 10px 12px;
}
.datatable-info {
    color: var(--muted);
    font-size: 13px;
}
.datatable-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.datatable-page-btn,
.datatable-page-number {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
}
.datatable-page-btn:disabled {
    opacity: .45;
    cursor: default;
}
.datatable-page-number.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    color: #fff;
    border-color: transparent;
}
.datatable-dots {
    color: var(--muted);
    padding: 0 2px;
}
.datatable-sortable {
    padding: 14px 12px;
}
.datatable-sort-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}
.datatable-sort-indicator {
    color: #9aa7bf;
    font-size: 11px;
}
.sorted .datatable-sort-indicator {
    color: var(--primary);
}
.muted { color: var(--muted); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-info { background: #eef3ff; color: #4f74ff; }
.badge-success { background: #e9fff1; color: #34a86f; }
.badge-warning { background: #fff5da; color: #d18a0f; }
.badge-danger { background: #fff0f1; color: #d15263; }

.dashboard-page { display: grid; gap: 18px; }

.hero-panel {
    display: grid;
    grid-template-columns: 1.55fr .95fr;
    gap: 18px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.10), transparent 22%),
        linear-gradient(135deg, #0f4251 0%, #0f6e79 56%, #19cdbd 100%);
    color: #fff;
    border-radius: 26px;
    box-shadow: 0 30px 70px rgba(7, 116, 118, 0.24);
    position: relative;
    overflow: hidden;
}
.hero-panel::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.15), rgba(255,255,255,0));
}
.hero-copy {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.hero-copy h2 {
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -.04em;
    max-width: 680px;
}
.hero-copy p {
    color: rgba(255,255,255,0.82);
    max-width: 620px;
    line-height: 1.7;
    font-size: 15px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn-secondary {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.hero-metrics {
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.hero-metric {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-metric span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(220,255,250,0.82);
    margin-bottom: 10px;
    font-weight: 700;
}
.hero-metric strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 8px;
}
.hero-metric small { color: rgba(255,255,255,0.80); }

.overview-card {
    position: relative;
    overflow: hidden;
    min-height: 146px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.96));
}
.overview-card::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -18px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(244, 200, 91, 0.22), rgba(117, 213, 191, 0.18));
}
.overview-title {
    color: #8d9ab4;
    font-size: 14px;
    margin-bottom: 12px;
}
.overview-value {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1b2741;
    letter-spacing: -.03em;
}
.overview-note {
    color: #31a76e;
    font-weight: 700;
    font-size: 14px;
    max-width: 190px;
    line-height: 1.5;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.section-title h2 {
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.section-title span {
    color: var(--muted);
    font-size: 14px;
    max-width: 210px;
}

.chart-card-large { min-height: 390px; }
.chart-card-medium { min-height: 286px; }
.chart-canvas {
    width: 100%;
    display: block;
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    border-radius: 18px;
    cursor: pointer;
}
.chart-detail {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #f1f6ff);
    border: 1px solid #e5edf8;
    color: #617596;
    font-size: 13px;
    line-height: 1.5;
    min-height: 48px;
}
.employee-shell {
    display: grid;
    gap: 18px;
}
.employee-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.employee-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.muted-text {
    color: var(--muted);
    font-size: 13px;
}
.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.role-badge.role-admin {
    background: #eef3ff;
    color: #4f74ff;
}
.role-badge.role-doctor {
    background: #e9fff8;
    color: #18b78c;
}
.role-badge.role-receptionist {
    background: #fff7eb;
    color: #ef9c21;
}
.role-badge.role-manager {
    background: #f6f0ff;
    color: #8756e7;
}
.status-badge.success {
    background: #e9fff8;
    color: #18b78c;
}
.status-badge.warning {
    background: #fff6e8;
    color: #eb9a1b;
}
.slot-summary {
    color: #3d5478;
    font-size: 13px;
    line-height: 1.5;
}
.modal-open {
    overflow: hidden;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 80;
}
.modal-card {
    width: min(100%, 960px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.98));
    border: 1px solid rgba(229, 236, 247, 0.95);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(26, 39, 68, 0.20);
    padding: 22px;
}
.modal-card-small {
    width: min(100%, 720px);
}
.modal-card-large {
    width: min(100%, 1080px);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.modal-head h3 {
    font-size: 24px;
    margin-bottom: 6px;
}
.modal-head p {
    max-width: 520px;
}
.modal-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef3ff;
    color: #4b5e83;
    font-size: 26px;
    line-height: 1;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.user-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.user-type-card {
    text-align: left;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #e5ecf7;
    box-shadow: 0 14px 28px rgba(39, 58, 94, 0.08);
}
.user-type-card strong {
    display: block;
    font-size: 17px;
    margin-bottom: 8px;
}
.user-type-card span {
    display: block;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}
.doctor-slot-panel {
    border: 1px solid #e5ecf7;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-radius: 22px;
    padding: 18px;
}
.doctor-slot-grid {
    display: grid;
    gap: 12px;
}
.doctor-slot-row {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-radius: 18px;
    background: #fbfcff;
    border: 1px solid #e8eef8;
}
.doctor-slot-day {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    font-weight: 700;
}
.doctor-slot-day input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.priority-list, .schedule-list, .performer-list {
    display: grid;
    gap: 12px;
}
.priority-item, .schedule-item, .performer-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    border-radius: 18px;
}
.priority-meta {
    text-align: right;
    display: grid;
    gap: 8px;
    min-width: 120px;
}

.metric-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f1fff6, #e7fff1);
    color: #34a86f;
    font-size: 12px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(52, 168, 111, 0.08);
}
.metric-chip.negative {
    background: linear-gradient(180deg, #fff5f6, #fff0f1);
    color: #d15263;
}

.mini-chart-wrap { margin-top: 8px; }
.mini-chart-legend {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}
.mini-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.kanban-column {
    background: linear-gradient(180deg, #f6f9ff, #f2f7ff);
    border: 1px solid #e7edf7;
    border-radius: 18px;
    padding: 14px;
    min-width: 220px;
}
.kanban-column h3 {
    font-size: 15px;
    margin-bottom: 10px;
}
.kanban-dropzone { display: grid; gap: 10px; min-height: 190px; }
.kanban-card {
    background: #fff;
    border: 1px solid #e7edf7;
    border-left: 4px solid #17b5a7;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(42, 62, 94, 0.06);
    transition: transform .16s ease, box-shadow .16s ease;
}
.kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(42, 62, 94, 0.10);
}
.kanban-card small { display: block; color: var(--muted); margin-top: 4px; }

.timeline { display: grid; gap: 14px; }
.timeline-item {
    padding-left: 16px;
    border-left: 2px solid #dfe7f5;
}

.panel-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.panel-tab {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef3ff;
    color: #4f74ff;
    font-size: 13px;
    font-weight: 700;
}
.footer-note {
    color: #8ea0bc;
    font-size: 13px;
    text-align: center;
    padding: 10px 0 4px;
}
.global-footer-credit {
    text-align: center;
    padding: 18px 16px 26px;
    color: #6f80a0;
    font-size: 13px;
}
.global-footer-credit a {
    color: #3f65d7;
    font-weight: 700;
}
.calendar-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(20, 207, 192, 0.18), transparent 28%),
        linear-gradient(135deg, #17364a, #119f98);
    color: #fff;
    margin-bottom: 16px;
}
.calendar-hero-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(223, 250, 245, 0.82);
    margin-bottom: 8px;
}
.calendar-hero h3 {
    font-size: 28px;
    margin-bottom: 8px;
}
.calendar-hero p {
    color: rgba(237, 247, 255, 0.82);
    max-width: 420px;
    line-height: 1.6;
}
.audit-hero {
    margin-top: 14px;
}
.calendar-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 12px;
    align-self: stretch;
}
.calendar-stat-card,
.metric-soft-card {
    border-radius: 18px;
    border: 1px solid rgba(229, 236, 247, 0.95);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 16px;
}
.calendar-stat-card span,
.metric-soft-card span {
    display: block;
    font-size: 12px;
    color: rgba(240, 249, 255, 0.84);
    margin-bottom: 6px;
}
.calendar-stat-card strong,
.metric-soft-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}
.calendar-action-card {
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease;
}
.calendar-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 167, 157, 0.18);
}
.calendar-shell {
    border-radius: 24px;
    padding: 16px;
    background: linear-gradient(180deg, #f9fbff, #f2f7ff);
    border: 1px solid #e5edf8;
}
.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 0;
}
.calendar-nav-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.calendar-view-switch {
    background: #eef3ff;
    padding: 6px;
    border-radius: 999px;
}
.calendar-view-pill {
    padding: 10px 14px;
    border-radius: 999px;
    color: #607397;
    font-weight: 700;
    text-decoration: none;
}
.calendar-view-pill.active {
    background: linear-gradient(90deg, #15364a, #14aca3);
    color: #fff;
    box-shadow: 0 10px 24px rgba(20, 172, 163, 0.22);
}
.calendar-date-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.calendar-date-form input[type="date"] {
    width: auto;
    min-width: 180px;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.calendar-weekdays div {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #7d8fae;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 6px 0;
}
.premium-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}
.calendar-day {
    min-height: 128px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e6edf7;
    padding: 12px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    box-shadow: 0 14px 28px rgba(52, 72, 105, 0.05);
}
.calendar-day-empty {
    background: transparent;
    border: 1px dashed rgba(210, 221, 240, 0.7);
    box-shadow: none;
}
.calendar-day.is-today {
    background: linear-gradient(180deg, #eef8ff, #e8fff8);
    border-color: rgba(17, 160, 151, 0.45);
    box-shadow: 0 18px 34px rgba(17, 160, 151, 0.12);
}
.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.calendar-day-head strong {
    font-size: 16px;
}
.calendar-day-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f2ff;
    color: #4f74ff;
    font-size: 12px;
    font-weight: 800;
}
.calendar-day-events {
    display: grid;
    align-content: start;
    gap: 8px;
}
.calendar-event-pill {
    display: block;
    border-radius: 14px;
    padding: 10px 11px;
    background: linear-gradient(180deg, #edf8ff, #eff6ff);
    border-left: 4px solid #4f74ff;
    box-shadow: 0 10px 18px rgba(79, 116, 255, 0.08);
    transition: transform .16s ease, box-shadow .16s ease;
    text-decoration: none;
}
.calendar-event-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(79, 116, 255, 0.14);
}
.calendar-event-pill span {
    display: block;
    color: #6880a8;
    font-size: 11px;
    margin-bottom: 4px;
}
.calendar-event-pill strong {
    display: block;
    font-size: 13px;
    color: #1f2f4e;
}
.calendar-event-pill.status-confirmed {
    border-left-color: #1dbf91;
    background: linear-gradient(180deg, #e9fff8, #f1fffb);
}
.calendar-event-pill.status-completed {
    border-left-color: #17a87f;
    background: linear-gradient(180deg, #e8fff2, #effff6);
}
.calendar-event-pill.status-pending {
    border-left-color: #ffb341;
    background: linear-gradient(180deg, #fff8e8, #fffdf3);
}
.calendar-event-pill.status-cancelled,
.calendar-event-pill.status-no_show {
    border-left-color: #ff6d6f;
    background: linear-gradient(180deg, #fff0f2, #fff8f8);
}
.calendar-more {
    color: #6a7f9f;
    font-size: 12px;
    font-weight: 700;
}
.calendar-weekly-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}
.calendar-week-column {
    min-height: 260px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e6edf7;
    padding: 14px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
}
.calendar-week-column.is-today {
    background: linear-gradient(180deg, #eef8ff, #e8fff8);
    border-color: rgba(17, 160, 151, 0.45);
}
.calendar-week-head span {
    display: block;
    font-size: 11px;
    color: #7c8ea9;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
}
.calendar-week-head strong {
    font-size: 16px;
}
.calendar-daily-list {
    display: grid;
    gap: 14px;
}
.calendar-daily-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-left: 4px solid #4f74ff;
    border: 1px solid #e6edf7;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(52, 72, 105, 0.06);
}
.calendar-daily-card.status-confirmed,
.calendar-daily-card.status-completed {
    border-left-color: #18b78c;
}
.calendar-daily-card.status-cancelled,
.calendar-daily-card.status-no_show {
    border-left-color: #ff6d6f;
}
.calendar-daily-card span {
    display: block;
    color: #6880a8;
    font-size: 12px;
    margin-bottom: 6px;
}
.calendar-daily-card strong {
    display: block;
    color: #182948;
    font-size: 16px;
}
.calendar-daily-card p {
    margin-top: 4px;
}
.calendar-daily-meta {
    text-align: right;
    min-width: 180px;
}
.calendar-empty-state {
    min-height: 140px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    border: 1px dashed #cfdcf0;
    color: #7b8da8;
    background: rgba(255,255,255,0.6);
    text-align: center;
    padding: 16px;
}
.metric-soft-card {
    background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}
.metric-soft-card span {
    color: #7d8fae;
}
.metric-soft-card strong {
    color: #182948;
}
.appointment-editor-card {
    border: 1px solid rgba(20, 207, 192, 0.18);
    box-shadow: 0 20px 40px rgba(18, 159, 152, 0.10);
}
.permission-grid {
    display: grid;
    gap: 18px;
}
.permission-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.permission-role-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.permission-role-tab {
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef3ff;
    color: #536686;
    font-weight: 700;
}
.permission-role-tab.active {
    background: linear-gradient(90deg, #15364a, #13a79d);
    color: #fff;
}
.permission-help {
    color: var(--muted);
    font-size: 13px;
}
.permission-table th,
.permission-table td {
    vertical-align: middle;
}
.permission-feature {
    min-width: 180px;
}
.permission-feature strong {
    display: block;
}
.permission-feature span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}
.permission-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.permission-check input {
    width: 18px;
    height: 18px;
}

.wa-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    min-height: calc(100vh - 190px);
    height: calc(100vh - 190px);
    align-items: start;
}
.wa-list-panel,
.wa-thread-panel {
    background: var(--panel);
    border: 1px solid rgba(229, 236, 247, 0.95);
    box-shadow: var(--shadow);
    border-radius: 24px;
    min-width: 0;
    height: 100%;
}
.wa-list-panel {
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr;
}
.wa-thread-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}
.wa-panel-header {
    padding: 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.wa-panel-title strong {
    display: block;
    font-size: 18px;
}
.wa-panel-title span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.wa-filter-row {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
}
.wa-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wa-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef3ff;
    color: #536686;
    font-size: 12px;
    font-weight: 700;
}
.wa-list {
    display: grid;
    gap: 2px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.wa-chat-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px 18px;
    cursor: pointer;
    transition: background .16s ease;
}
.wa-chat-item:hover,
.wa-chat-item.active {
    background: #f4f8ff;
}
.wa-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6fa6ff, #53d8ce);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.wa-chat-item h3 {
    font-size: 15px;
    margin: 0 0 4px;
}
.wa-chat-item p {
    font-size: 13px;
    line-height: 1.45;
}
.wa-chat-meta {
    text-align: right;
    font-size: 12px;
    color: var(--muted);
}
.wa-unread {
    margin-top: 8px;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #19cdbd;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    margin-left: auto;
}
.wa-thread-topbar {
    padding: 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.wa-thread-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wa-thread-actions {
    display: flex;
    gap: 8px;
}
.wa-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f8ff;
    color: #526684;
    border: 1px solid var(--line);
}
.wa-thread-body {
    padding: 18px;
    background:
        radial-gradient(circle at top right, rgba(20, 207, 192, 0.06), transparent 22%),
        linear-gradient(180deg, #f9fcff, #f2f7ff);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: 12px;
    align-content: start;
}
.wa-bubble {
    max-width: min(72%, 540px);
    background: #fff;
    border: 1px solid #e6edf7;
    box-shadow: 0 10px 24px rgba(42, 62, 94, 0.05);
    border-radius: 18px 18px 18px 6px;
    padding: 12px 14px 10px;
}
.wa-bubble.self {
    margin-left: auto;
    background: linear-gradient(180deg, #dffaf2, #d4f6ed);
    border-color: #c9eee3;
    border-radius: 18px 18px 6px 18px;
}
.wa-bubble span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #7a8baa;
}
.wa-thread-input {
    border-top: 1px solid var(--line);
    padding: 14px 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}
.wa-input-addon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f4f8ff;
    color: #526684;
    border: 1px solid var(--line);
}
.wa-thread-input textarea {
    min-height: 48px;
    max-height: 120px;
    padding-top: 12px;
}
.wa-send-btn {
    padding: 12px 18px;
    border-radius: 14px;
    background: linear-gradient(90deg, #0e9188, #15bca8);
    color: #fff;
    font-weight: 800;
}
.wa-mobile-list-toggle {
    display: none;
}

@media (max-width: 1320px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .login-grid {
        grid-template-columns: 1fr;
    }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(calc(-100% - 24px));
        transition: transform .22s ease;
        width: 260px;
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        visibility: hidden;
    }
    .sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }
    .sidebar-toggle { display: flex; }
    .topbar-search { min-width: 200px; }
    .hero-panel, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .calendar-hero,
    .calendar-stat-row {
        grid-template-columns: 1fr;
    }
    .calendar-toolbar {
        align-items: stretch;
    }
    .calendar-hero {
        display: grid;
    }
    .premium-calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .calendar-weekly-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wa-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .wa-list-panel,
    .wa-thread-panel {
        height: auto;
    }
    .wa-list {
        max-height: 320px;
    }
    .doctor-slot-row {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .login-shell {
        padding: 14px;
    }
    .login-stage,
    .login-showcase,
    .login-panel {
        padding: 18px;
        border-radius: 24px;
    }
    .login-brandbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .login-showcase h1 {
        font-size: 30px;
    }
    body {
        overflow-x: hidden;
    }
    .main-panel { padding: 12px; }
    .premium-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .topbar-left, .topbar-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .topbar-datetime {
        font-size: 18px;
    }
    .wa-status-pill {
        flex: 1 1 100%;
    }
    .topbar-search {
        order: 3;
        min-width: 100%;
    }
    .nav-stack a {
        padding: 12px;
    }
    .employee-toolbar-actions,
    .modal-actions {
        width: 100%;
        justify-content: stretch;
    }
    .employee-toolbar-actions .btn,
    .modal-actions .btn {
        width: 100%;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .user-type-grid {
        grid-template-columns: 1fr;
    }
    .modal-backdrop {
        padding: 12px;
    }
    .modal-card {
        padding: 18px;
        border-radius: 22px;
    }
    .calendar-shell {
        padding: 12px;
    }
    .calendar-date-form input[type="date"] {
        width: 100%;
        min-width: 0;
    }
    .calendar-weekdays {
        display: none;
    }
    .premium-calendar-grid {
        grid-template-columns: 1fr;
    }
    .calendar-weekly-grid {
        grid-template-columns: 1fr;
    }
    .calendar-day {
        min-height: 0;
    }
    .calendar-daily-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .calendar-daily-meta {
        text-align: left;
        min-width: 0;
    }
    .profile-menu {
        flex: 1 1 auto;
    }
    .notification-popover {
        right: -54px;
    }
    .profile-chip {
        width: 100%;
    }
    .topbar-datetime {
        font-size: 15px;
    }
    .wa-status-copy span {
        max-width: 140px;
    }
    .profile-popover {
        left: 0;
        right: auto;
        width: min(100%, 280px);
    }
    .permission-table {
        min-width: 720px;
    }
    .hero-copy h2 { font-size: 24px; }
    .priority-item, .schedule-item, .performer-item {
        flex-direction: column;
    }
    .priority-meta { text-align: left; min-width: 0; }
    .overview-value { font-size: 28px; }
    .kanban-board {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
    .kanban-column {
        min-width: 0;
        width: 100%;
    }
    .datatable-controls,
    .datatable-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .datatable-pagination {
        justify-content: flex-start;
    }
    .wa-mobile-list-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 12px;
        background: #eef3ff;
        color: #536686;
        font-weight: 700;
    }
    .wa-list-panel {
        display: none;
    }
    .wa-list-panel.is-open {
        display: block;
    }
    .wa-thread-topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }
    .wa-thread-user {
        width: 100%;
        min-width: 0;
    }
    .wa-thread-actions {
        justify-content: flex-end;
    }
    .wa-thread-body {
        padding: 14px;
        min-height: 360px;
    }
    .wa-thread-input {
        grid-template-columns: 1fr;
        padding: 12px 14px 14px;
    }
    .wa-thread-input textarea {
        min-height: 88px;
    }
    .wa-send-btn,
    .wa-input-addon {
        width: 100%;
        border-radius: 14px;
    }
    .wa-bubble {
        max-width: 100%;
    }
    .global-footer-credit {
        padding-bottom: 34px;
    }
}
