
:root {
    --bg: #0b1120;
    --sidebar: #0f172a;
    --panel: #111827;
    --panel-border: #243044;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --primary: #38bdf8;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--panel-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--panel-border);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: #07111f;
    font-weight: 800;
}

.brand-title {
    font-weight: 700;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.navigation {
    padding: 18px 12px;
}

.nav-section {
    margin: 18px 10px 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}

.nav-item {
    display: block;
    padding: 11px 12px;
    margin: 3px 0;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
    background: #172033;
    color: #fff;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 78px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(11, 17, 32, .96);
}

.page-title {
    font-size: 22px;
    font-weight: 700;
}

.page-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
}

.status-dot.online {
    background: var(--success);
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.offline {
    background: var(--danger);
}

.refresh-button {
    margin-left: 12px;
    padding: 7px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #172033;
    color: var(--text);
    cursor: pointer;
}

.refresh-button:hover {
    border-color: #3b4c67;
}

.content {
    padding: 28px;
}

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

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.stat-card {
    padding: 18px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

.stat-value {
    margin-top: 8px;
    font-size: 25px;
    font-weight: 700;
}

.stat-detail {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.panel-header {
    padding: 17px 18px;
    border-bottom: 1px solid var(--panel-border);
}

.panel-title {
    font-weight: 650;
}

.panel-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.panel-body {
    padding: 7px 18px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(36, 48, 68, .7);
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {
    color: var(--muted);
}

.info-row strong {
    text-align: right;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 8px;
}

.error-alert {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #fca5a5;
}

.hidden {
    display: none;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    color: #64748b;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .sidebar {
        display: none;
    }

    .topbar {
        padding: 15px 18px;
    }

    .content {
        padding: 18px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
    }
}


/* ============================================================
   GUI04 - WhatsApp Panel
   ============================================================ */

.page-section {
    display: block;
}

.hidden-page {
    display: none !important;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.page-heading-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.page-heading-subtitle {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13px;
}

.whatsapp-grid {
    margin-bottom: 22px;
}

.version-value {
    font-size: 18px !important;
}

.session-state {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.session-note {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.nav-item {
    cursor: pointer;
}

.nav-item.active {
    cursor: default;
}


/* ============================================================
   GUI04-D - Page Separation
   ============================================================ */

.page-section[hidden] {
    display: none !important;
}

/* ============================================================
   WhatsApp - Connection / Device equal columns
   ============================================================ */

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


/* ============================================================
   PANEL AUTH - LOGIN
   ============================================================ */

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: #0b1120;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 32px;

    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 14px;

    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 32px;
}

.login-brand-mark {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #2563eb;
    color: #ffffff;

    font-size: 20px;
    font-weight: 700;
}

.login-brand-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.login-brand-subtitle {
    margin-top: 2px;

    color: #9ca3af;
    font-size: 13px;
}

.login-heading {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.login-description {
    margin-top: 6px;
    margin-bottom: 24px;

    color: #9ca3af;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.login-field label {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 600;
}

.login-field input {
    width: 100%;
    box-sizing: border-box;

    padding: 11px 12px;

    border: 1px solid #374151;
    border-radius: 8px;

    outline: none;

    background: #0f172a;
    color: #ffffff;

    font-size: 14px;
}

.login-field input:focus {
    border-color: #2563eb;
}

.login-button {
    width: 100%;

    padding: 11px 14px;

    border: 0;
    border-radius: 8px;

    background: #2563eb;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.login-button:hover {
    background: #1d4ed8;
}

.login-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.login-error {
    padding: 10px 12px;

    border: 1px solid #7f1d1d;
    border-radius: 8px;

    background: #450a0a;
    color: #fecaca;

    font-size: 13px;
}

.login-screen.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }
}


/* =========================================================
   MakeSender PHP Panel Shell
   ========================================================= */

.app-shell {
    min-height: 100vh;
    display: flex;
    background: #0b1120;
    color: #e5e7eb;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    min-height: 100vh;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    min-height: 72px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
}

.sidebar-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d4ed8;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-brand-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
}

.sidebar-section-title {
    margin: 12px 8px 7px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.nav-item {
    min-height: 40px;
    margin: 2px 0;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 7px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s ease, color .15s ease;
}

.nav-item:hover {
    background: #172033;
    color: #e2e8f0;
}

.nav-item.active {
    background: #1e293b;
    color: #ffffff;
}

.nav-item-icon {
    width: 18px;
    text-align: center;
    color: inherit;
    font-size: 13px;
}

.nav-item-label {
    white-space: nowrap;
}

.main-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0b1120;
}

.topbar {
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #1e293b;
    background: #0b1120;
}

.topbar-page {
    min-width: 0;
}

.topbar-title {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.topbar-subtitle {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #cbd5e1;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .10);
}

.refresh-button {
    padding: 7px 11px;
    border: 1px solid #334155;
    border-radius: 7px;
    background: #172033;
    color: #e2e8f0;
    font-size: 12px;
    cursor: pointer;
}

.refresh-button:hover {
    background: #1e293b;
}

.page-content {
    flex: 1;
    padding: 24px;
}

.page-section {
    width: 100%;
}

.page-heading {
    margin-bottom: 20px;
}

.page-heading-title {
    margin: 0;
    color: #f8fafc;
    font-size: 20px;
    font-weight: 600;
}

.page-heading-subtitle {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.panel {
    overflow: hidden;
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 10px;
}

.panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid #1e293b;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
}

.panel-body {
    padding: 18px;
    color: #94a3b8;
    font-size: 13px;
}

@media (max-width: 900px) {

    .sidebar {
        width: 210px;
        min-width: 210px;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px;
    }

}

@media (max-width: 700px) {

    .sidebar {
        width: 190px;
        min-width: 190px;
    }

    .topbar-subtitle {
        display: none;
    }

    .connection-status {
        display: none;
    }

}

.sidebar-section-account {
    margin-top: 24px;
}

.nav-item-logout {
    color: #f87171;
}

.nav-item-logout:hover {
    background: rgba(239, 68, 68, .08);
    color: #fca5a5;
}



/* =========================================================
   Messages Page
   ========================================================= */

.messages-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.messages-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.messages-tab {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.70);
    border-radius: 7px;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.messages-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.messages-tab.active {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.messages-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.messages-search-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    outline: none;
    font-size: 13px;
}

.messages-search-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.messages-search-input:focus {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.messages-send-input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    outline: none;
    font-size: 13px;
    line-height: 1.45;
    box-sizing: border-box;
}

.messages-send-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.messages-send-input:focus {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.messages-send-input option {
    background: #1b2233;
    color: #ffffff;
}

.messages-send-textarea {
    min-height: 110px;
    resize: vertical;
}

.messages-send-help {
    margin-bottom: 12px;
}

.messages-send-actions {
    margin-top: 12px;
}

.messages-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.messages-summary-card {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.messages-panel {
    min-height: 360px;
}

.messages-table-wrapper {
    min-height: 300px;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
}

.messages-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.messages-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
}

.messages-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #111827;
    white-space: nowrap;
}

.messages-table th,
.messages-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.messages-table th:nth-child(1),
.messages-table td:nth-child(1) {
    width: 90px;
}

.messages-table th:nth-child(2),
.messages-table td:nth-child(2) {
    width: 180px;
}

.messages-table th:nth-child(3),
.messages-table td:nth-child(3) {
    width: auto;
}

.messages-table th:nth-child(4),
.messages-table td:nth-child(4) {
    width: 70px;
}

.messages-table th:nth-child(5),
.messages-table td:nth-child(5) {
    width: 80px;
}

.messages-table th:nth-child(6),
.messages-table td:nth-child(6) {
    width: 120px;
    white-space: nowrap;
}

.messages-table .message-content {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.5;
}

.messages-table .message-contact,
.messages-table .message-number {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.messages-empty {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.messages-empty-title {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-weight: 600;
}

.messages-empty-text {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .messages-summary {
        grid-template-columns: 1fr;
    }

    .messages-search {
        width: 100%;
        min-width: 0;
    }
}

/* GUI-1B — WhatsApp QR Pairing */

.whatsapp-qr-panel {
    margin-top: 20px;
}

.whatsapp-qr-panel .panel-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.qr-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
}

.qr-status-badge.available {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
}

.qr-status-badge.unavailable {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
}

.qr-status-badge.connected {
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
}

.whatsapp-qr-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.whatsapp-qr-preview {
    display: flex;
    justify-content: center;
}

.whatsapp-qr-frame {
    width: 320px;
    min-height: 320px;
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.whatsapp-qr-image {
    display: block;
    width: 288px;
    height: 288px;
    object-fit: contain;
}

.whatsapp-qr-placeholder {
    width: 288px;
    min-height: 288px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

.whatsapp-qr-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #64748b;
    border-radius: 50%;
    animation: whatsappQrSpin 0.8s linear infinite;
}

@keyframes whatsappQrSpin {
    to {
        transform: rotate(360deg);
    }
}

.whatsapp-qr-info {
    max-width: 520px;
}

.whatsapp-qr-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.whatsapp-qr-message {
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.6;
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .whatsapp-qr-layout {
        grid-template-columns: 1fr;
    }

    .whatsapp-qr-info {
        max-width: none;
    }
}


.whatsapp-qr-placeholder[hidden] {
    display: none !important;
}


/* GUI-2B — WhatsApp Rescan Confirmation Dialog */

.whatsapp-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.68);
}

.whatsapp-confirm-overlay[hidden] {
    display: none !important;
}

.whatsapp-confirm-dialog {
    width: min(480px, 100%);
    background: #111827;
    border: 1px solid #263248;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.whatsapp-confirm-dialog-header {
    padding: 18px 20px;
    border-bottom: 1px solid #263248;
}

.whatsapp-confirm-dialog-title {
    font-size: 16px;
    font-weight: 600;
    color: #f3f4f6;
}

.whatsapp-confirm-dialog-body {
    padding: 18px 20px;
    color: #aebbd0;
    font-size: 14px;
    line-height: 1.6;
}

.whatsapp-confirm-dialog-body p {
    margin: 0 0 8px;
    color: #d7e0ee;
}

.whatsapp-confirm-dialog-body ul {
    margin: 0;
    padding-left: 20px;
}

.whatsapp-confirm-dialog-body li {
    margin: 4px 0;
}

.whatsapp-confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid #263248;
}

@media (max-width: 600px) {
    .whatsapp-confirm-overlay {
        padding: 16px;
    }

    .whatsapp-confirm-dialog-actions {
        flex-direction: column-reverse;
    }

    .whatsapp-confirm-dialog-actions .btn {
        width: 100%;
    }
}


/* GUI-R1 — Mobile Sidebar Drawer */

.mobile-menu-button {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #263248;
    border-radius: 8px;
    background: #111827;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.mobile-sidebar-overlay {
    display: none;
}

@media (max-width: 760px) {

    .app-shell {
        position: relative;
        overflow-x: hidden;
    }

    .sidebar {
        display: flex;
        position: fixed;
        z-index: 1100;
        top: 0;
        left: 0;
        width: min(280px, 82vw);
        min-width: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 18px 0 40px rgba(0, 0, 0, 0.35);
    }

    .app-shell.mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .mobile-sidebar-overlay {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.55);
    }

    .mobile-sidebar-overlay[hidden] {
        display: none !important;
    }

    .main-content {
        width: 100%;
        min-width: 0;
    }

    .topbar {
        gap: 12px;
        padding: 12px 14px;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-page {
        min-width: 0;
        flex: 1;
    }

    .topbar-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-actions {
        flex: 0 0 auto;
    }

    .refresh-button {
        padding: 8px 10px;
    }

    .page-content {
        width: 100%;
        min-width: 0;
        padding: 14px;
        box-sizing: border-box;
    }

}


/* GUI-R1-JS — Prevent page scroll while mobile sidebar is open */

@media (max-width: 760px) {
    body.mobile-sidebar-active {
        overflow: hidden;
    }
}


/* GUI-2B — QR Pairing Connected State Centering */
.whatsapp-qr-frame {
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-qr-placeholder {
    width: 100%;
    height: 100%;
    min-height: 288px;
    margin: 0;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.whatsapp-qr-placeholder > div {
    text-align: center;
}

.whatsapp-qr-placeholder[hidden] {
    display: none !important;
}

/* Saat Connected, QR image tidak boleh menyisakan alt/broken-image text. */
#whatsapp-qr-placeholder:not([hidden]) ~ #whatsapp-qr-image {
    display: none !important;
}


/* AUTO REPLY TABLE LAYOUT */

#auto-reply-page .cards-grid {
    margin-bottom: 16px;
}

#auto-reply-page #auto-reply-list .messages-table {
    width: 100%;
    table-layout: fixed;
}

#auto-reply-page #auto-reply-list .messages-table th,
#auto-reply-page #auto-reply-list .messages-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#auto-reply-page #auto-reply-list .messages-table th:nth-child(1),
#auto-reply-page #auto-reply-list .messages-table td:nth-child(1) {
    width: 18%;
}

#auto-reply-page #auto-reply-list .messages-table th:nth-child(2),
#auto-reply-page #auto-reply-list .messages-table td:nth-child(2) {
    width: 14%;
}

#auto-reply-page #auto-reply-list .messages-table th:nth-child(3),
#auto-reply-page #auto-reply-list .messages-table td:nth-child(3) {
    width: 43%;
}

#auto-reply-page #auto-reply-list .messages-table th:nth-child(4),
#auto-reply-page #auto-reply-list .messages-table td:nth-child(4) {
    width: 10%;
}

#auto-reply-page #auto-reply-list .messages-table th:nth-child(5),
#auto-reply-page #auto-reply-list .messages-table td:nth-child(5) {
    width: 15%;
}

#auto-reply-page #auto-reply-list .message-content {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.5;
}

#auto-reply-page #auto-reply-list .messages-table td:nth-child(5) > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ============================================================
   API CLIENT MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(2, 6, 23, .72);
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border-bottom: 1px solid var(--panel-border);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.modal-subtitle {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.modal-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #172033;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    border-color: #3b4c67;
    color: var(--text);
}

#api-client-create-form {
    padding: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group > label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="datetime-local"],
.form-group textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    outline: none;
    background: #0f1728;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.form-group input[type="text"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group textarea:focus {
    border-color: #3b4c67;
    box-shadow: 0 0 0 2px rgba(59, 76, 103, .18);
}

.form-group textarea {
    min-height: 82px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-item {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    padding: 8px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #0f1728;
    color: var(--text);
    font-size: 13px;
    font-weight: 400 !important;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #3b82f6;
}

.checkbox-item span {
    line-height: 1.2;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 18px;
    border-top: 1px solid var(--panel-border);
}

.modal-footer button {
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #172033;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.modal-footer button:hover {
    border-color: #3b4c67;
}

.modal-footer button[type="submit"] {
    background: #1d4ed8;
    border-color: #2563eb;
    color: #fff;
}

.modal-footer button[type="submit"]:hover {
    background: #2563eb;
}

.api-client-create-error {
    margin: 0 18px 18px;
    padding: 10px 12px;
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 7px;
    background: rgba(127, 29, 29, .18);
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 14px;
    }

    .modal-card {
        max-height: calc(100vh - 28px);
        border-radius: 10px;
    }

    .modal-header {
        padding: 16px;
    }

    #api-client-create-form {
        padding: 16px;
    }

    .modal-footer {
        padding: 14px 16px;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .checkbox-item {
        width: 100%;
        box-sizing: border-box;
    }
}


/* ============================================================
   API CLIENT TABLE
   ============================================================ */

.api-clients-table {
    min-width: 900px;
}

.api-clients-table th:nth-child(1),
.api-clients-table td:nth-child(1) {
    width: 140px;
}

.api-clients-table th:nth-child(2),
.api-clients-table td:nth-child(2) {
    width: 300px;
}

.api-clients-table th:nth-child(3),
.api-clients-table td:nth-child(3) {
    width: 150px;
}

.api-clients-table th:nth-child(4),
.api-clients-table td:nth-child(4) {
    width: 90px;
}

.api-clients-table th:nth-child(5),
.api-clients-table td:nth-child(5) {
    width: 110px;
}

.api-clients-table td:nth-child(2),
.api-clients-table td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.api-clients-table td:nth-child(2) code,
.api-clients-table td:nth-child(3) code {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* ============================================================
   API CLIENT TABLE VIEW
   ============================================================ */


.api-client-block {
    margin-top: 24px;
}



.api-client-table {
    width: 100%;
    border-collapse: collapse;
}



.api-client-table tr {
    border-bottom: 1px solid var(--panel-border);
}



.api-client-table tr:last-child {
    border-bottom: none;
}



.api-client-table td {
    padding: 14px 8px;
    vertical-align: middle;
}



.api-client-table td:first-child {
    width: 180px;
    color: var(--muted);
    font-size: 13px;
}



.api-client-table td:nth-child(2) {
    color: var(--text);
}



.api-client-table code {
    display: inline-block;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
    overflow-wrap: anywhere;
}



#api-client-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}



#api-client-actions .refresh-button {
    margin-left: 0;
}



@media (max-width: 760px) {

    .api-client-table td:first-child {
        width: 120px;
    }


    .api-client-table td {
        padding: 12px 5px;
    }

}




/* ============================================================
   API CLIENT ACTION BUTTON THEME
   ============================================================ */


#api-client-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/*
   Renew API Key
*/

#api-client-actions .api-action-renew {

    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
    color: #60a5fa;

}


#api-client-actions .api-action-renew:hover {

    background: rgba(59, 130, 246, 0.30);

}



/*
   Disable
*/

#api-client-actions .api-action-disable {

    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;

}


#api-client-actions .api-action-disable:hover {

    background: rgba(245, 158, 11, 0.30);

}



/*
   Activate
*/

#api-client-actions .api-action-activate {

    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
    color: #4ade80;

}


#api-client-actions .api-action-activate:hover {

    background: rgba(34, 197, 94, 0.30);

}



/*
   Delete
*/

#api-client-actions .api-action-delete {

    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;

}


#api-client-actions .api-action-delete:hover {

    background: rgba(239, 68, 68, 0.30);

}



/*
   Processing state
*/

#api-client-actions button:disabled {

    opacity: 0.55;
    cursor: not-allowed;

}




/* ============================================================
   API CLIENT FEEDBACK UI
   ============================================================ */


#api-client-feedback {

    margin-bottom: 18px;

    padding: 12px 16px;

    border-radius: 10px;

    font-size: 14px;

    font-weight: 500;

    border: 1px solid transparent;

    transition:
        opacity .2s ease,
        transform .2s ease;

}



#api-client-feedback[data-type="success"] {

    background:
        rgba(34, 197, 94, .14);

    border-color:
        rgba(34, 197, 94, .35);

    color:
        #4ade80;

}



#api-client-feedback[data-type="error"] {

    background:
        rgba(239, 68, 68, .14);

    border-color:
        rgba(239, 68, 68, .35);

    color:
        #f87171;

}



#api-client-feedback[data-type="processing"] {

    background:
        rgba(59, 130, 246, .14);

    border-color:
        rgba(59, 130, 246, .35);

    color:
        #60a5fa;

}



#api-client-feedback[hidden] {

    display: none;

}




/* ============================================================
   API CLIENT RESPONSIVE POLISH
   ============================================================ */


.api-client-table {

    table-layout: fixed;

}


.api-client-table td:nth-child(2) {

    word-break: break-word;

}


.api-client-table code {

    white-space: normal;

}


@media (max-width: 760px) {


    .api-client-table td {

        display: block;

        width: 100%;

    }


    .api-client-table td:first-child {

        padding-bottom: 4px;

        font-weight: 600;

    }


    .api-client-table tr {

        display: block;

        padding: 12px 0;

    }


    #api-client-actions {

        gap: 8px;

    }


    #api-client-actions button {

        width: 100%;

    }


}




/* ============================================================
   API KEY RENEW MODAL
   ============================================================ */


.api-key-modal {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(0,0,0,.65);

    z-index: 9999;

    padding: 20px;

}



.api-key-modal-box {

    width: 100%;

    max-width: 520px;

    background:
        var(--panel-bg);

    border:
        1px solid var(--panel-border);

    border-radius: 14px;

    padding: 24px;

}



.api-key-modal-title {

    font-size: 18px;

    font-weight: 600;

    margin-bottom: 12px;

}



.api-key-modal-warning {

    margin-bottom: 18px;

    padding: 12px;

    border-radius: 8px;

    background:
        rgba(245,158,11,.15);

    border:
        1px solid rgba(245,158,11,.35);

    color:
        #fbbf24;

    font-size: 14px;

}



#api-key-renew-value {

    display: block;

    width: 100%;

    box-sizing: border-box;

    padding: 14px;

    border-radius: 8px;

    background:
        rgba(255,255,255,.06);

    white-space: nowrap;

    overflow-x: auto;

    overflow-y: hidden;

    margin-bottom: 18px;

    font-family: monospace;

    line-height: 1.5;

}



.api-key-modal-actions {

    display: flex;

    gap: 10px;

    justify-content: flex-end;

}



@media (max-width:760px) {


    .api-key-modal-box {

        padding: 18px;

    }


    .api-key-modal-actions {

        flex-direction: column;

    }


    .api-key-modal-actions button {

        width:100%;

    }

}




/* ============================================================
   API BASE URL READONLY INPUT
   ============================================================ */


.readonly-field {

    width: 100%;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid var(--panel-border);

    border-radius:
        6px;

    padding:
        8px 10px;

    color:
        var(--text);

    font-family:
        monospace;

    font-size:
        13px;

}



/* ============================================================
   API CLIENT ACTION ONLY
   ============================================================ */


.api-client-actions-only {

    margin-top: 16px;

    display:flex;

    gap:10px;

}




/* ============================================================
   API CLIENT INPUT ALIGNMENT
   ============================================================ */


.info-row {

    display: grid;

    grid-template-columns: 120px 1fr;

    align-items: center;

    gap: 18px;

}


.info-row > span {

    color:
        #8ea0c0;

    font-size:
        13px;

}


.readonly-field {

    box-sizing:
        border-box;

    width:
        100%;

}


@media(max-width:760px){

    .info-row {

        grid-template-columns:
            1fr;

        gap:
            8px;

    }

}



/* ============================================================
   API KEY CONTROL BUTTONS
   ============================================================ */


.api-key-wrapper {

    display:flex;

    gap:8px;

    align-items:center;

}


.api-key-wrapper input {

    flex:1;

}


@media(max-width:760px){

    .api-key-wrapper {

        flex-direction:column;

    }


    .api-key-wrapper button {

        width:100%;

    }

}


/* ============================================================
   LICENSE - SUMMARY / INFORMATION SPACING
   ============================================================ */

#license-page .license-information-panel {
    margin-top: 24px;
}


/* ============================================================
   LICENSE - SUMMARY CARDS
   3 COLUMNS / COL-4
   ============================================================ */

#license-page .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* ============================================================
   LICENSE - ACTION BUTTON
   ============================================================ */

#license-page .license-action-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#license-page .license-action-row[hidden] {
    display: none;
}

#license-page #license-action-button {
    min-width: 170px;
}


/* ============================================================
   LICENSE-UPGRADE-MODAL-V1
   ============================================================ */

.license-upgrade-card {
    width: min(520px, calc(100vw - 32px));
    max-width: 520px;
    border-radius: 12px;
    overflow: hidden;
}

.license-upgrade-card .modal-header {
    padding: 20px 22px 18px;
}

.license-upgrade-card .panel-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.license-upgrade-card .panel-subtitle {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
}

.license-upgrade-card .modal-body {
    padding: 22px;
}

.license-upgrade-card .form-group {
    margin: 0 0 20px;
}

.license-upgrade-card .form-group:last-child {
    margin-bottom: 0;
}

.license-upgrade-card .form-group > label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.license-upgrade-card .form-group input[type="text"] {
    display: block;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.4;
}

.license-upgrade-card .modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 22px 20px;
}

.license-upgrade-card .modal-footer button {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.license-upgrade-card #license-upgrade-message {
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    .license-upgrade-card {
        width: calc(100vw - 24px);
    }

    .license-upgrade-card .modal-header,
    .license-upgrade-card .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .license-upgrade-card .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .license-upgrade-card .modal-footer button {
        flex: 1;
    }
}


/* Runtime layout */
#runtime-page .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#runtime-page .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    #runtime-page .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #runtime-page .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    #runtime-page .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   EVENTS / LOGS
   ============================================================ */

/* Statistics: 3 x col-4 */
#events-page .cards-grid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

/* Jarak antara statistics dan Gateway Events */
#events-page > .panel {
    margin-top: 20px;
}

/* Event list */
#events-page #events-list {
    max-height: 660px; /* ±15 event rows */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Satu event */
#events-page .event-row {
    min-height: 44px;
    padding: 7px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    box-sizing: border-box;
    overflow: hidden;
}

/* Metadata event */
#events-page .event-meta {
    font-size: 11px;
    line-height: 15px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pesan event */
#events-page .event-message {
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar Events */
#events-page #events-list::-webkit-scrollbar {
    width: 7px;
}

#events-page #events-list::-webkit-scrollbar-track {
    background: transparent;
}

#events-page #events-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 10px;
}

/* Tablet */
@media (max-width: 1100px) {
    #events-page .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 760px) {
    #events-page .cards-grid {
        grid-template-columns: 1fr;
    }

    #events-page #events-list {
        max-height: 700px;
    }
}

/* ============================================================
   MANAGE PASSWORD
   ============================================================ */

#manage-password-page .manage-password-panel {
    max-width: 760px;
}

#manage-password-page .panel-body {
    padding: 24px;
}

#manage-password-page .form-group {
    margin-bottom: 20px;
}

#manage-password-page label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

#manage-password-page input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.65);
    color: #f8fafc;
    outline: none;
}

#manage-password-page input[type="password"]:focus {
    border-color: rgba(96, 165, 250, 0.65);
}

#manage-password-page .form-help {
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

#manage-password-page .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

#manage-password-page .primary-button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

#manage-password-page .primary-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#manage-password-page .success-alert,
#manage-password-page .error-alert {
    margin-bottom: 20px;
    padding: 11px 13px;
    border-radius: 7px;
    font-size: 12px;
}


/* ============================================================
   MANAGE PASSWORD - SUCCESS TOAST
   ============================================================ */

.password-success-toast {
    position: fixed;
    top: 78px;
    right: 24px;
    z-index: 9999;

    min-width: 300px;
    max-width: 420px;

    padding: 14px 18px;

    background: #162033;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 8px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);

    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.password-success-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.password-success-toast::before {
    content: "✓";
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    margin-right: 9px;

    border-radius: 50%;

    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;

    font-weight: 700;
}

@media (max-width: 760px) {
    .password-success-toast {
        left: 16px;
        right: 16px;
        top: 70px;
        min-width: auto;
    }
}


/* ============================================================
   LICENSE-LOGIN-NOTICE-V1
   ============================================================ */

.license-login-card {
    width: min(520px, calc(100vw - 32px));
    max-width: 520px;
    overflow: hidden;
}

.license-login-card .modal-header {
    padding: 22px 24px 18px;
}

.license-login-card .panel-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.license-login-card .panel-subtitle {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.license-login-card .modal-body {
    padding: 24px;
}

.license-login-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--panel-border);
    border-radius: 9px;
    background: #0f1728;
}

.license-login-status span {
    color: var(--muted);
    font-size: 13px;
}

.license-login-status strong {
    font-size: 16px;
    letter-spacing: .04em;
}

.license-login-expiration {
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.license-login-message {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.license-login-card .modal-footer {
    padding: 16px 24px 22px;
}

#license-login-upgrade {
    background: #1d4ed8;
    border-color: #2563eb;
    color: #fff;
}

#license-login-upgrade:hover {
    background: #2563eb;
}

@media (max-width: 600px) {
    .license-login-card {
        width: calc(100vw - 24px);
    }

    .license-login-card .modal-header,
    .license-login-card .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .license-login-card .modal-footer {
        flex-direction: column-reverse;
        padding-left: 18px;
        padding-right: 18px;
    }

    .license-login-card .modal-footer button {
        width: 100%;
    }
}

/* ============================================================
   LICENSE-LOGIN-NOTICE-V2
   Visual refinement
   ============================================================ */

.license-login-card {
    width: min(540px, calc(100vw - 32px));
    border-radius: 14px;
}

.license-login-card .modal-header {
    padding: 22px 26px 20px;
}

.license-login-card .panel-title {
    font-size: 18px;
    line-height: 1.35;
}

.license-login-card .panel-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.license-login-card .modal-body {
    padding: 24px 26px 26px;
}

.license-login-status {
    min-height: 48px;
    padding: 12px 15px;
    box-sizing: border-box;
}

.license-login-status span {
    font-size: 13px;
    font-weight: 500;
}

.license-login-status strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 28px;
    padding: 4px 12px;
    box-sizing: border-box;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 999px;
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .06em;
}

.license-login-expiration {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.license-login-message {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.license-login-card .modal-footer {
    gap: 10px;
    padding: 18px 26px 22px;
}

.license-login-card .modal-footer button {
    min-height: 40px;
    padding: 9px 16px;
    font-weight: 600;
}

#license-login-upgrade {
    min-width: 165px;
}

@media (max-width: 600px) {
    .license-login-card .modal-header,
    .license-login-card .modal-body,
    .license-login-card .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .license-login-status {
        gap: 12px;
    }
}
