:root {
    /* ── Surfaces ── */
    --bg-dark: #eef0f3;              /* Page background: cool light silver */
    --card-bg: #ffffff;              /* Card / panel: pure white */
    --card-border: #d4d8de;          /* Card border: light aluminium edge */

    /* ── Text ── */
    --text-light: #1a1d24;           /* Primary text: near-black */
    --text-muted: #5c6370;           /* Secondary text: medium grey */
    --border: #e2e5e9;               /* Divider lines: light silver */

    /* ── Buttons & Actions (Dark Aluminium) ── */
    --primary: #2d333f;              /* Button fill: dark anodised aluminium */
    --primary-hover: #3e4757;        /* Button hover: lighter slate */
    --primary-text: #f3f4f6;         /* Button text: light grey */

    --outline-border: #b0b7c3;       /* Outline btn border: medium silver */
    --outline-hover: rgba(45, 51, 63, 0.06); /* Outline btn hover bg */

    /* ── Status States ── */
    --success-bg: rgba(22, 163, 74, 0.07);
    --success-border: rgba(22, 163, 74, 0.25);
    --success-text: #15803d;

    --warning-bg: rgba(217, 119, 6, 0.08);
    --warning-border: rgba(217, 119, 6, 0.25);
    --warning-text: #b45309;

    --danger-bg: rgba(220, 38, 38, 0.06);
    --danger-border: rgba(220, 38, 38, 0.2);
    --danger-text: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Glassmorphism Blobs */
.background-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.25;
    animation: float 12s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #c8cdd6;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: #d8dbe2;
    bottom: -50px;
    right: -50px;
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    background: #f4f6f8;
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.2s ease-in-out;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #8d9299;
    box-shadow: 0 0 0 4px rgba(45, 51, 63, 0.08);
}

button {
    width: 100%;
    background: var(--primary);
    color: var(--primary-text);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1.5px);
}

button:active {
    transform: scale(0.97) translateY(0) !important;
}

.outline-btn {
    width: auto;
    margin-top: 0;
    background: transparent;
    border: 1.5px solid var(--outline-border);
    color: var(--text-light);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.outline-btn:hover {
    background: var(--outline-hover) !important;
    border-color: var(--outline-border) !important;
    color: var(--text-light) !important;
}

.switch-auth {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
}

.switch-auth a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.switch-auth a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-layout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-dark);
    z-index: 10;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
}

.profile-menu {
    position: relative;
}

.profile-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.profile-btn:hover {
    background: rgba(45, 51, 63, 0.06);
    border-color: var(--outline-border);
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 45px;
    background: var(--card-bg);
    min-width: 250px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    z-index: 101;
    overflow: hidden;
}

.dropdown-header {
    padding: 10px 15px;
    background: #f4f6f8;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.dropdown-form {
    padding: 15px;
}

.dropdown-form label {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.dropdown-form input {
    margin-bottom: 10px;
    padding: 8px;
    font-size: 0.9rem;
}

.dropdown-form button {
    padding: 8px;
    font-size: 0.9rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 28px 32px 120px 32px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 18px 120px 18px;
    }
}

.upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f4f6f8;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upcoming-item .icon {
    margin-right: 8px;
}

.upcoming-item .badge {
    background: #eef0f3;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* Deployments Grid */
.deployments-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.deployment-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deployment-item:hover {
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--outline-border);
}

.deployment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.deployment-domain {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
}

.delete-btn {
    width: auto;
    margin-top: 0;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
}

.cred-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 0.95rem;
    background: #f4f6f8;
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.cred-row:hover {
    border-color: var(--outline-border);
    background: #eef0f3;
}

.cred-label {
    color: var(--text-muted);
    width: 160px;
}

.cred-val {
    flex: 1;
    color: var(--text-light);
}

.cred-val.masked {
    letter-spacing: 2px;
}

.copy-btn {
    width: auto;
    margin-top: 0;
    background: transparent;
    border: 1px solid var(--outline-border);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--outline-hover);
    border-color: var(--outline-border);
}

/* Modals */
.background-elements {
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 13, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 1001;
    color: var(--text-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    width: auto;
    margin-top: 0;
    transition: color 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.close-modal:hover {
    color: var(--text-light);
    transform: scale(1.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    margin: 0;
    width: auto;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.db-select {
    width: 100%;
    padding: 12px;
    background: #f4f6f8;
    border: 1.5px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

#loadingState {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(45, 51, 63, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.terminal-logs {
    background: #1e2230;
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-top: 20px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #4ADE80;
    text-align: left;
    overflow-y: auto;
    border: 1px solid var(--card-border);
}

/* Success State */
#successState {
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success-bg);
    color: var(--success-text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.credentials-box {
    background: #f4f6f8;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    border: 1px solid var(--card-border);
}

.credentials-box h4 {
    color: var(--text-light);
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
}

.credentials-box h4:first-child {
    margin-top: 0;
}

.credentials-box p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.credentials-box a {
    color: var(--text-light);
    text-decoration: underline;
}

.secret-text {
    font-family: monospace;
    background: var(--card-border);
    padding: 2px 6px;
    border-radius: 4px;
}

.logo {
    position: fixed;
    bottom: 16px;
    left: 16px;
    height: 100px;
    width: auto;
    z-index: 1050;
    pointer-events: none;
    opacity: 0.85;
}

/* Tap-away backdrop behind the Account bottom-sheet on mobile */
.profile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.profile-backdrop:not(.hidden) {
    display: block;
}

/* On desktop the backdrop should never be visible */
@media (min-width: 601px) {
    .profile-backdrop {
        display: none !important;
    }
}

.floating-profile {
    /* Now inside top-nav — no longer needs absolute positioning */
    position: relative;
    top: auto;
    right: auto;
    z-index: 100;
}


.tab-btn {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(45, 51, 63, 0.06) !important;
}

.tab-btn.active:hover {
    background: var(--primary) !important;
}

/* File Manager custom styles */
.fm-file-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}
.fm-file-row:hover {
    background: rgba(45, 51, 63, 0.04);
}
.fm-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light) !important;
}
.fm-item-name:hover {
    color: var(--text-light) !important;
}
.fm-action-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}
.fm-action-btn:hover {
    background: rgba(45, 51, 63, 0.06);
}
.fm-action-btn.delete {
    color: var(--danger-text);
}
.fm-action-btn.delete:hover {
    background: var(--danger-bg);
}

/* ===================================================
   MOBILE RESPONSIVE — Dashboard (style.css)
   =================================================== */

/* Tablets and large phones */
@media (max-width: 900px) {
    .top-nav {
        padding: 12px 20px;
    }
    .floating-profile {
        top: 14px;
        right: 16px;
    }
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px 16px 120px 16px; /* keep bottom clearance for logo */
    }
}

/* Mobile phones */
@media (max-width: 600px) {
    /* Nav bar */
    .top-nav {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .nav-brand {
        font-size: 1rem;
    }
    /* profile-menu is now inline in top-nav — no override needed */
    .profile-btn {
        width: 100%;
        text-align: left;
    }
    .dropdown-content {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
        min-width: unset;
    }

    /* Dashboard cards */
    .dashboard-card {
        padding: 18px;
    }
    .dashboard-content {
        padding: 12px 12px 120px 12px; /* keep bottom clearance for logo */
        gap: 14px;
    }

    /* Deployment cards */
    .deployment-item {
        padding: 16px;
    }
    .deployment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .deployment-domain {
        font-size: 1rem;
        word-break: break-all;
    }
    .delete-btn {
        align-self: flex-end;
    }

    /* Credential rows — stack vertically */
    .cred-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.85rem;
    }
    .cred-label {
        width: auto;
        font-size: 0.8rem;
    }
    .cred-val {
        word-break: break-all;
        font-size: 0.82rem;
    }
    .copy-btn {
        align-self: flex-end;
        padding: 4px 10px;
    }

    /* File manager table horizontal scroll */
    .modal-content {
        width: 95vw !important;
        max-width: unset !important;
        padding: 16px !important;
        border-radius: 10px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    #fileManagerModal table,
    #fileManagerModal thead,
    #fileManagerModal tbody,
    #fileManagerModal th,
    #fileManagerModal td,
    #fileManagerModal tr {
        display: block;
    }
    #fileManagerModal thead tr {
        display: none; /* hide header on tiny screens */
    }
    #fileManagerModal .fm-file-row td {
        border: none;
        padding: 4px 0;
        font-size: 0.82rem;
        word-break: break-all;
    }
    #fileManagerModal .fm-file-row td:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    /* Logo in dashboard */
    .logo {
        height: 100px;
        bottom: 10px;
        left: 10px;
    }

    /* Modals base */
    .modal-overlay {
        align-items: flex-end;
    }

    /* Tab bar wrapping */
    .tab-btn {
        font-size: 0.8rem;
        padding: 6px 10px !important;
    }

    /* Backups Modal Mobile Adjustments */
    .backups-left-col,
    .backups-right-col {
        min-width: unset !important;
        width: 100% !important;
    }

    #backupsListContainer table,
    #backupsListContainer thead,
    #backupsListContainer tbody,
    #backupsListContainer th,
    #backupsListContainer td,
    #backupsListContainer tr {
        display: block;
    }
    #backupsListContainer thead tr {
        display: none; /* Hide header on mobile */
    }
    #backupsListContainer tr {
        border-bottom: 1px solid var(--border);
        padding: 10px 0;
    }
    #backupsListContainer td {
        display: block;
        width: 100% !important;
        padding: 4px 12px !important;
        box-sizing: border-box;
    }
    #backupsListContainer td:last-child {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
    }
}

/* Custom Premium Toggle Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--outline-border);
    transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-light);
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
input:checked + .slider {
    background-color: var(--primary-hover);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* ===================================================
   Custom Site Dropdown
   =================================================== */
.site-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.site-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f6f8;
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.site-dropdown-btn:hover {
    border-color: var(--outline-border);
    box-shadow: 0 0 0 3px rgba(45, 51, 63, 0.06);
    background: #eef0f3;
    transform: none;
    color: var(--text-light);
}

.site-dropdown-btn:active {
    transform: none !important;
}

.site-dropdown.open .site-dropdown-btn {
    border-color: var(--outline-border);
    box-shadow: 0 0 0 3px rgba(45, 51, 63, 0.06);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.site-dropdown-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.site-dropdown-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-dropdown-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.site-dropdown.open .site-dropdown-chevron {
    transform: rotate(180deg);
}

.site-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1.5px solid var(--outline-border);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 200;
    max-height: 240px;
    overflow-y: auto;
    animation: dropdownIn 0.18s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.site-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.site-dropdown-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.site-dropdown-item:hover {
    background: var(--outline-hover);
    color: var(--text-light);
}

.site-dropdown-item.selected {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.site-dropdown-item .item-check {
    font-size: 0.75rem;
    color: var(--text-light);
    width: 14px;
    flex-shrink: 0;
}

.site-dropdown-item .item-domain {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-dropdown-empty {
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===================================================
   System Credentials Collapsible
   =================================================== */
.creds-notice {
    margin-bottom: 14px;
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: all 0.2s ease;
}

.creds-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1.5px solid var(--border);
}

.creds-summary::-webkit-details-marker { display: none; }

.creds-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.creds-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    flex: 1;
}

.creds-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.creds-notice[open] .creds-chevron {
    transform: rotate(180deg);
}

.creds-body {
    padding: 14px 16px 10px 16px;
}

/* ===================================================
   SMTP Notice Collapsible
   =================================================== */
.smtp-notice {
    margin-top: 14px;
    border: 1.5px solid var(--danger-border);
    border-radius: 10px;
    background: var(--danger-bg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.smtp-notice summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    list-style: none;
    user-select: none;
    flex-wrap: wrap;
}

.smtp-notice summary::-webkit-details-marker { display: none; }

.smtp-notice summary .smtp-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--danger-text);
    flex: 1;
}

.smtp-notice summary .smtp-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--danger-text);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.smtp-notice[open] summary .smtp-chevron {
    transform: rotate(180deg);
}

.smtp-notice summary:hover {
    background: var(--danger-bg);
}

.smtp-body {
    padding: 0 14px 14px 14px;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    border-top: 1px solid var(--danger-border);
}

.smtp-body p {
    margin-top: 10px;
    color: var(--text-light);
}

.smtp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.82rem;
}

.smtp-table th {
    text-align: left;
    padding: 6px 10px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-weight: 700;
    border-bottom: 1.5px solid var(--danger-border);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.75rem;
}

.smtp-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
    vertical-align: top;
}

.smtp-table tr:last-child td {
    border-bottom: none;
}

.smtp-table td:first-child {
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

/* ─── Node.js Control Console & PM2 Design System ────────────────────────────── */
.pm2-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    border: 1px solid transparent;
}

.pm2-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pm2-btn:active {
    transform: translateY(0);
}

.btn-start {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.btn-start:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
}

.btn-stop {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-stop:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: #ef4444;
}

.btn-restart {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.btn-restart:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: #3b82f6;
}

.btn-status {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.3);
    color: #a855f7;
}

.btn-status:hover {
    background: rgba(168, 85, 247, 0.22);
    border-color: #a855f7;
}

.btn-install {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.btn-install:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
}

.btn-build {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.3);
    color: #0ea5e9;
}

.btn-build:hover {
    background: rgba(14, 165, 233, 0.22);
    border-color: #0ea5e9;
}

.btn-migrate {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.3);
    color: #ec4899;
}

.btn-migrate:hover {
    background: rgba(236, 72, 153, 0.22);
    border-color: #ec4899;
}

.btn-logs {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.3);
    color: #cbd5e1;
}

.btn-logs:hover {
    background: rgba(100, 116, 139, 0.22);
    border-color: #cbd5e1;
}

.btn-livelogs {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.btn-livelogs:hover {
    background: rgba(239, 68, 68, 0.18);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.status-badge.stopped {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.errored {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}
