/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.logo span {
    color: #ffd700;
}

.login-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.login-box {
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.alert {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5eb;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
}

/* Dashboard Layout */
.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.sidebar .logo i {
    font-size: 1.8rem;
    color: #667eea;
}

.sidebar .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar .logo span {
    color: #ffd700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.avatar {
    font-size: 2.5rem;
    color: #667eea;
}

.user-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: #bdc3c7;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu li.active a {
    background: rgba(102, 126, 234, 0.2);
    color: white;
}

.nav-menu a i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: #e74c3c;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5eb;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #667eea;
    cursor: pointer;
    display: none;
}

.header h1 {
    font-size: 1.8rem;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.stat-icon.disk {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bandwidth {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.domains {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.databases {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: #e1e5eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
}

.stat-percent {
    font-size: 0.9rem;
    color: #666;
}

/* Sections */
.section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.3rem;
    color: #333;
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.1);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: white;
}

.action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 0.9rem;
    color: #666;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-icon.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.activity-icon.warning {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.activity-icon.info {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.activity-details {
    flex: 1;
}

.activity-details p {
    margin-bottom: 5px;
    color: #333;
}

.activity-time {
    font-size: 0.8rem;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        padding: 15px 10px;
    }
    
    .sidebar .logo h2,
    .sidebar .user-details,
    .nav-menu span,
    .logout-btn span {
        display: none;
    }
    
    .sidebar .logo {
        justify-content: center;
    }
    
    .user-info {
        justify-content: center;
        padding: 10px;
    }
    
    .avatar {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 15px;
    }
    
    .logo,
    .user-info,
    .nav-menu,
    .sidebar-footer {
        margin-bottom: 0;
    }
    
    .nav-menu {
        display: flex;
        gap: 10px;
    }
    
    .nav-menu li {
        margin-bottom: 0;
    }
    
    .nav-menu a span {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        padding: 20px;
    }
}
/* SSL badges (domains page) */
.ssl-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1}
.ssl-badge i{font-size:12px}
.ssl-ok{background:rgba(34,197,94,.12);color:#16a34a;border:1px solid rgba(34,197,94,.35)}
.ssl-warn{background:rgba(234,179,8,.12);color:#b45309;border:1px solid rgba(234,179,8,.35)}
.ssl-bad{background:rgba(239,68,68,.12);color:#b91c1c;border:1px solid rgba(239,68,68,.35)}
.ssl-none{background:rgba(148,163,184,.15);color:#475569;border:1px solid rgba(148,163,184,.4)}

/* ============== File Manager page helpers ============== */
/* Secondary / light / small button variants used on file-manager.html */
.btn-secondary {
    background: #eef0f5;
    color: #333;
    border: 1px solid #d8dde6;
}
.btn-secondary:hover {
    background: #e3e6ee;
    transform: translateY(-1px);
}
.btn-light {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #e1e5eb;
}
.btn-light:hover {
    background: #eef0f5;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.35);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    gap: 6px;
}

/* Data table used by file-manager.html (sites & apps lists) */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #eef0f5;
    background: #fff;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.data-table thead th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e1e5eb;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f7;
    color: #333;
    vertical-align: middle;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover {
    background: #fafbfd;
}
.data-table a {
    color: #667eea;
    text-decoration: none;
}
.data-table a:hover {
    text-decoration: underline;
}


/* ============================================================
   Database page (and shared widgets used on many pages)
   ============================================================ */

/* Header-right action grouping */
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-right .icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #f5f7fa; color: #555;
    border: 1px solid #e1e5eb;
    cursor: pointer; transition: all 0.2s;
}
.header-right .icon-btn:hover { background: #eef0f5; color: #333; }
.header-right .icon-btn .badge {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Stat-card extras */
.stat-details { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.stat-tag {
    font-size: 0.75rem; padding: 3px 10px;
    border-radius: 999px; font-weight: 600;
}
.stat-tag.success { background: rgba(34,197,94,.12); color: #16a34a; }
.stat-tag.info    { background: rgba(59,130,246,.12); color: #2563eb; }
.stat-tag.warning { background: rgba(234,179,8,.12);  color: #b45309; }
.stat-tag.error,
.stat-tag.danger  { background: rgba(239,68,68,.12);  color: #b91c1c; }

/* Search box (used in section headers) */
.search-box {
    position: relative;
    display: inline-flex; align-items: center;
}
.search-box i {
    position: absolute; left: 12px; color: #888; font-size: 0.9rem;
}
.search-box input {
    padding: 9px 12px 9px 34px;
    border: 1px solid #d8dde6; border-radius: 8px;
    font-size: 0.9rem; min-width: 240px;
    background: #fff; transition: border-color 0.2s;
}
.search-box input:focus { outline: none; border-color: #667eea; }

/* DB / Tool action card grids */
.db-actions,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.db-action-card,
.tool-card {
    background: #f8f9fa;
    border-radius: 12px; padding: 22px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.25s;
    display: flex; flex-direction: column; align-items: center;
}
.db-action-card:hover,
.tool-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(102,126,234,.1);
    background: #fff;
}
.db-action-card .action-icon,
.tool-card .tool-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.4rem;
    margin-bottom: 14px;
}
.db-action-card .action-content,
.tool-card .tool-content { width: 100%; }
.db-action-card h3,
.tool-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: #333; }
.db-action-card p,
.tool-card p { font-size: 0.85rem; color: #777; margin-bottom: 14px; min-height: 32px; }

/* Database list table - cells */
.db-name { display: flex; align-items: center; gap: 12px; }
.db-name i {
    width: 38px; height: 38px;
    background: rgba(102,126,234,.12); color: #667eea;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.db-name div { display: flex; flex-direction: column; line-height: 1.3; }
.db-name strong { color: #333; }
.db-name small { color: #888; font-size: 0.78rem; }
.text-primary { color: #667eea !important; }
.text-info    { color: #3498db !important; }

.db-type {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(102,126,234,.12); color: #667eea;
    font-size: 0.78rem; font-weight: 600;
    border-radius: 999px;
}

.db-size { min-width: 140px; }
.size-progress { display: flex; flex-direction: column; gap: 4px; }
.size-bar {
    width: 100%; height: 6px;
    background: #e1e5eb; border-radius: 3px; overflow: hidden;
}
.size-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}
.size-progress span { font-size: 0.8rem; color: #666; }

.db-users,
.user-databases,
.user-privileges {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.user-tag, .db-tag, .priv-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.72rem; font-weight: 600;
    border-radius: 6px;
}
.user-tag { background: rgba(59,130,246,.12); color: #2563eb; }
.db-tag   { background: rgba(102,126,234,.12); color: #667eea; }
.priv-tag { background: rgba(34,197,94,.12); color: #16a34a; }

.user-name { display: flex; align-items: center; gap: 10px; color: #333; }
.user-name i { color: #888; }

/* Row actions */
.action-buttons { display: flex; gap: 6px; }
.btn-icon {
    width: 32px; height: 32px;
    border: 1px solid #e1e5eb; background: #fff;
    border-radius: 6px; cursor: pointer;
    color: #555; transition: all 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: #f5f7fa; color: #333; border-color: #cbd0d9; }
.btn-icon.danger:hover { color: #b91c1c; border-color: #fca5a5; background: rgba(239,68,68,.06); }

/* Pagination */
.table-footer {
    display: flex; justify-content: flex-end;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid #eef0f5;
}
.pagination { display: inline-flex; align-items: center; gap: 10px; }
.pagination-btn {
    width: 32px; height: 32px;
    border: 1px solid #e1e5eb; background: #fff;
    border-radius: 6px; cursor: pointer; color: #555;
    display: inline-flex; align-items: center; justify-content: center;
}
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-btn:not(:disabled):hover { background: #f5f7fa; }
.pagination-info { font-size: 0.85rem; color: #666; }

/* Backup section */
.backup-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .backup-container { grid-template-columns: 1fr; } }
.backup-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .backup-options { grid-template-columns: 1fr; } }
.backup-option,
.backup-schedule {
    background: #f8f9fa; border-radius: 12px; padding: 20px;
}
.backup-option h3,
.backup-schedule h3 {
    font-size: 1rem; color: #333; margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
}
.backup-option p,
.backup-schedule p { font-size: 0.85rem; color: #777; margin-bottom: 14px; }
.backup-settings { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.restore-controls {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
}
.file-info { color: #999; font-size: 0.85rem; }

.schedule-settings {
    display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.schedule-option label.radio { font-size: 0.9rem; }
.retention-settings { margin-bottom: 14px; }
.retention-settings label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 6px; }
.retention-settings select {
    width: 100%; padding: 8px 10px;
    border: 1px solid #d8dde6; border-radius: 8px;
    background: #fff; font-size: 0.9rem;
}

/* Radio buttons (lightweight, matches .checkbox) */
.radio {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 0.9rem; color: #555;
}
.radio input[type="radio"] { accent-color: #667eea; }

/* ----- Page-local modal (different from .modal-backdrop in panel-shared.css) ---- */
/* Used by databases.html which toggles `style.display = 'flex'/'none'`. */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center; justify-content: center; z-index: 1000;
}
.modal[style*="display: flex"],
.modal[style*="display:flex"] { display: flex !important; }
.modal-content {
    background: #fff; border-radius: 12px;
    width: 92%; max-width: 560px; max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px; border-bottom: 1px solid #eef0f5;
}
.modal-header h3 { margin: 0; font-size: 1.15rem; color: #333; }
.modal-close {
    background: transparent; border: none; cursor: pointer;
    width: 32px; height: 32px; border-radius: 6px; color: #888;
    display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #f5f7fa; color: #333; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 14px 22px; border-top: 1px solid #eef0f5;
    background: #fafbfd;
}

/* Form bits inside modal */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; color: #333; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
    width: 100%; padding: 10px 12px;
    border: 1px solid #d8dde6; border-radius: 8px;
    font-size: 0.95rem; font-family: inherit; background: #fff;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none; border-color: #667eea;
}
.help-text { display: block; color: #888; font-size: 0.78rem; margin-top: 4px; }

.input-group { display: flex; align-items: stretch; gap: 0; }
.input-group input { border-radius: 8px 0 0 8px; flex: 2; }
.input-group .input-group-text {
    display: inline-flex; align-items: center; padding: 0 10px;
    background: #f5f7fa; border: 1px solid #d8dde6;
    border-left: none; border-right: none;
    color: #555; font-weight: 600;
}
.input-group input + input { border-radius: 0 8px 8px 0; flex: 1; border-left: none; }

.password-input { display: flex; gap: 8px; align-items: stretch; }
.password-input input { flex: 1; }

.privileges-grid,
.database-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px 16px;
    padding: 10px;
    background: #fafbfd; border: 1px solid #eef0f5; border-radius: 8px;
}

.btn-small {
    padding: 8px 12px; font-size: 0.85rem;
    border-radius: 6px; gap: 6px;
}

/* Toast notifications produced by DatabaseManager.showNotification */
.notification {
    position: fixed; bottom: 24px; right: 24px;
    background: #333; color: #fff;
    padding: 12px 16px; border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex; align-items: center; gap: 10px;
    min-width: 260px; max-width: 380px;
    animation: notif-in 0.25s ease;
}
.notification button {
    background: transparent; border: none; color: inherit;
    cursor: pointer; padding: 4px; margin-left: auto; opacity: 0.7;
}
.notification button:hover { opacity: 1; }
.notification-success { background: #16a34a; }
.notification-error   { background: #dc2626; }
.notification-info    { background: #2563eb; }
.notification-warning { background: #d97706; }
@keyframes notif-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   Settings page
   ============================================================ */

/* Two-column layout (nav + content) */
.settings-nav {
    background: #fff;
    border-radius: 12px;
    padding: 14px 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    overflow-x: auto;
}
.settings-nav-header { display: none; }
.settings-nav-items {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.settings-nav-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 8px;
    color: #555; text-decoration: none; font-weight: 500;
    transition: all 0.2s; white-space: nowrap;
}
.settings-nav-item:hover { background: #f5f7fa; color: #333; }
.settings-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.settings-nav-item i { font-size: 0.95rem; }

.settings-content { background: transparent; }
.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-section-header {
    background: #fff; border-radius: 12px;
    padding: 22px 26px; margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.settings-section-header h2 {
    font-size: 1.25rem; color: #333;
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.settings-section-header h2 i { color: #667eea; }
.settings-section-header p { color: #777; font-size: 0.9rem; }

.settings-form {
    background: #fff; border-radius: 12px;
    padding: 26px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.settings-form > .form-group { margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid #eef0f5; }
.settings-form > .form-group:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.settings-form > .form-group > h3 {
    font-size: 1.05rem; color: #333; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid #eef0f5;
}

/* Profile - avatar */
.avatar-upload {
    display: flex; align-items: center; gap: 18px;
    padding-bottom: 22px; margin-bottom: 22px;
    border-bottom: 1px solid #eef0f5;
}
.avatar-preview {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2.4rem;
    box-shadow: 0 6px 16px rgba(102,126,234,.3);
}
.avatar-upload-controls { display: flex; flex-direction: column; gap: 6px; }
.avatar-upload-controls .help-text { margin-top: 0; }

/* Status badges (reused several places) */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem; font-weight: 700;
    border-radius: 999px;
}
.status-badge.success { background: rgba(34,197,94,.12); color: #16a34a; }
.status-badge.warning { background: rgba(234,179,8,.12); color: #b45309; }
.status-badge.error,
.status-badge.danger  { background: rgba(239,68,68,.12); color: #b91c1c; }

/* Security checklist */
.security-status {
    background: #f8f9fa; border-radius: 10px;
    padding: 18px; margin-bottom: 22px;
}
.security-status-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.security-status-header h3 { font-size: 1rem; color: #333; }
.security-checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fff; border-radius: 8px;
    border: 1px solid #eef0f5;
}
.checklist-item i { color: #d1d5db; font-size: 1.05rem; }
.checklist-item.completed i { color: #16a34a; }
.checklist-item span { flex: 1; color: #333; font-size: 0.9rem; }
.checklist-item button { margin-left: auto; }

/* Password strength */
.password-strength { margin: 8px 0 16px; }
.strength-bar {
    height: 6px; background: #e1e5eb;
    border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.strength-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #f97316); border-radius: 3px; }
.strength-text { font-size: 0.78rem; color: #666; }

/* Two-factor options */
.two-factor-info p { color: #666; margin-bottom: 14px; font-size: 0.9rem; }
.two-factor-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.two-factor-options .option {
    background: #f8f9fa; border-radius: 10px;
    padding: 18px; text-align: center;
    border: 2px solid transparent; transition: all 0.2s;
}
.two-factor-options .option:hover { border-color: #667eea; transform: translateY(-2px); }
.two-factor-options .option i { font-size: 1.8rem; color: #667eea; margin-bottom: 10px; }
.two-factor-options .option h4 { font-size: 1rem; margin-bottom: 4px; color: #333; }
.two-factor-options .option p { font-size: 0.82rem; color: #777; margin-bottom: 12px; }

/* Sessions */
.sessions-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.session-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px; background: #f8f9fa; border-radius: 8px;
}
.session-info { display: flex; align-items: center; gap: 14px; }
.session-info i { font-size: 1.3rem; color: #667eea; width: 32px; text-align: center; }
.session-info strong { display: block; color: #333; font-size: 0.95rem; }
.session-info small { color: #888; font-size: 0.78rem; }

/* Notification toggles (switch) */
.notification-categories { display: flex; flex-direction: column; gap: 22px; }
.notification-category h3 { font-size: 1rem; color: #333; margin-bottom: 12px; }
.notification-options { display: flex; flex-direction: column; gap: 10px; }
.notification-option {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; background: #f8f9fa; border-radius: 8px;
}
.option-info h4 { font-size: 0.95rem; color: #333; margin-bottom: 2px; }
.option-info p { font-size: 0.82rem; color: #777; }

.notification-frequency { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px; }

/* iOS-style switch */
.switch {
    position: relative; display: inline-block;
    width: 44px; height: 24px; flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #cbd0d9; border-radius: 999px; transition: 0.3s;
}
.slider:before {
    content: ""; position: absolute;
    height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%;
    transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch.large { width: 52px; height: 28px; }
.switch.large .slider:before { height: 22px; width: 22px; }
.switch.large input:checked + .slider:before { transform: translateX(24px); }

/* Billing */
.billing-overview { margin-bottom: 22px; }
.plan-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-radius: 14px; padding: 24px;
    box-shadow: 0 10px 30px rgba(102,126,234,.3);
}
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.plan-header h3 { font-size: 1.2rem; }
.price { font-size: 2rem; font-weight: 700; }
.price span { font-size: 0.9rem; font-weight: 400; opacity: 0.85; }
.plan-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px; margin-bottom: 16px;
}
.plan-features .feature { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.plan-features .feature i { background: rgba(255,255,255,0.18); padding: 4px; border-radius: 50%; font-size: 0.7rem; }
.plan-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.renewal-date { opacity: 0.9; font-size: 0.85rem; }
.plan-footer .btn { background: #fff; color: #667eea; }
.plan-footer .btn:hover { background: #f5f7fa; }

.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.payment-method {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; background: #f8f9fa; border-radius: 8px;
}
.method-info { display: flex; align-items: center; gap: 14px; }
.method-info i { font-size: 1.6rem; color: #667eea; }
.method-info strong { display: block; color: #333; font-size: 0.95rem; }
.method-info small { color: #888; font-size: 0.78rem; }

.billing-history { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #f8f9fa; border-radius: 8px;
}
.history-info strong { display: block; color: #333; font-size: 0.92rem; }
.history-info small { color: #888; font-size: 0.78rem; }
.history-amount { display: flex; align-items: center; gap: 10px; }
.history-amount span { font-weight: 600; color: #333; }

.auto-renewal-settings {
    display: flex; align-items: center; gap: 16px;
    padding: 18px; background: #f8f9fa; border-radius: 10px;
}
.renewal-info h4 { font-size: 0.95rem; color: #333; margin-bottom: 2px; }
.renewal-info p { font-size: 0.82rem; color: #777; }

/* Hosting */
.server-info {
    background: #f8f9fa; border-radius: 10px;
    padding: 18px; margin-bottom: 22px;
}
.server-info h3 { font-size: 1rem; color: #333; margin-bottom: 12px; }
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.info-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; background: #fff; border-radius: 8px;
    border: 1px solid #eef0f5;
}
.info-label { color: #777; font-size: 0.85rem; }
.info-value { color: #333; font-weight: 600; font-size: 0.9rem; }

.php-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.php-option label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 6px; }
.php-option select {
    width: 100%; padding: 9px 12px;
    border: 1px solid #d8dde6; border-radius: 8px;
    background: #fff; font-size: 0.9rem;
}

.error-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }

.caching-settings { display: flex; flex-direction: column; gap: 10px; }
.cache-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; background: #f8f9fa; border-radius: 8px;
}
.cache-info h4 { font-size: 0.95rem; color: #333; margin-bottom: 2px; }
.cache-info p { font-size: 0.82rem; color: #777; }

/* Backup */
.backup-status {
    background: #f8f9fa; border-radius: 10px;
    padding: 18px; margin-bottom: 22px;
}
.status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.status-header h3 { font-size: 1rem; color: #333; }
.status-details {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.detail {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: #fff; border-radius: 8px;
    border: 1px solid #eef0f5;
}
.detail i { font-size: 1.2rem; color: #667eea; width: 28px; text-align: center; }
.detail strong { display: block; color: #333; font-size: 0.88rem; }
.detail span { color: #777; font-size: 0.8rem; }

.schedule-time { margin-top: 14px; }
.schedule-time label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 6px; }
.schedule-time select {
    width: 100%; max-width: 240px;
    padding: 9px 12px; border: 1px solid #d8dde6; border-radius: 8px;
    background: #fff; font-size: 0.9rem;
}

.backup-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.backup-storage { display: flex; flex-direction: column; gap: 10px; }
.storage-option {
    padding: 14px; background: #f8f9fa; border-radius: 8px;
}
.storage-option .help-text { margin: 6px 0 0 26px; }

/* API */
.api-info { margin-bottom: 22px; }
.api-status {
    background: #f8f9fa; border-radius: 10px; padding: 18px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.api-status h3 { font-size: 1rem; color: #333; }
.api-description { width: 100%; font-size: 0.88rem; color: #666; margin-top: 6px; }

.api-keys { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.api-key-item {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
    padding: 14px 18px; background: #f8f9fa; border-radius: 8px;
}
.key-info { flex: 1; min-width: 0; }
.key-info strong { display: block; color: #333; font-size: 0.95rem; margin-bottom: 4px; }
.api-key {
    display: block;
    background: #1f2937; color: #d1d5db;
    padding: 8px 12px; border-radius: 6px;
    font-family: 'Courier New', monospace; font-size: 0.82rem;
    word-break: break-all; margin-bottom: 4px;
}
.key-info small { color: #888; font-size: 0.78rem; }
.key-actions { display: flex; gap: 6px; flex-shrink: 0; }

.api-docs p { color: #666; font-size: 0.9rem; margin-bottom: 12px; }
.api-endpoints { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.endpoint {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: #f8f9fa; border-radius: 8px;
    font-size: 0.85rem;
}
.endpoint code {
    background: #fff; padding: 3px 8px;
    border-radius: 4px; color: #333; font-family: 'Courier New', monospace;
    border: 1px solid #eef0f5;
}
.endpoint span:last-child { color: #777; }
.method {
    display: inline-block; padding: 3px 8px;
    font-size: 0.72rem; font-weight: 700;
    border-radius: 4px; color: #fff;
    min-width: 44px; text-align: center;
}
.method.get  { background: #10b981; }
.method.post { background: #3b82f6; }
.method.put  { background: #f59e0b; }
.method.del,
.method.delete { background: #ef4444; }

.access-control { display: flex; flex-direction: column; gap: 8px; }
.control-option { padding: 10px 14px; background: #f8f9fa; border-radius: 8px; }

/* Responsive tweaks for settings */
@media (max-width: 700px) {
    .settings-nav-items { flex-direction: column; }
    .settings-nav-item { width: 100%; }
    .avatar-upload { flex-direction: column; text-align: center; }
}

/* Shared header widgets (notification bell + Create New dropdown + modal + toast)
   Used by dashboard.html and file-manager.html (and any other page that injects
   the shared header). */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid #e1e5eb; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12); min-width: 240px; z-index: 100;
    display: none; overflow: hidden;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; color: #333; text-decoration: none; font-size: 0.95rem;
}
.dropdown-menu a:hover { background: #f5f7fa; }
.dropdown-menu .dropdown-header {
    padding: 10px 16px; background: #f8f9fa; font-weight: 600;
    font-size: 0.85rem; color: #555; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.dropdown-menu .empty { padding: 16px; color: #888; text-align: center; font-size: 0.9rem; }
.icon-btn { position: relative; }
.badge.hidden { display: none; }
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #333; color: #fff; padding: 12px 20px; border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); z-index: 9999;
    opacity: 0; transform: translateY(20px); transition: all 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #28a745; }
.toast.error { background: #dc3545; }
.toast.info { background: #17a2b8; }
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-backdrop.show { display: flex; }
.modal {
    background: #fff; border-radius: 12px; padding: 28px;
    width: 90%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 { margin-bottom: 18px; }
.modal .form-group { margin-bottom: 16px; }
.modal .form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #333; }
.modal .form-group input, .modal .form-group select {
    width: 100%; padding: 12px; border: 2px solid #e1e5eb; border-radius: 8px;
    font-size: 0.95rem; font-family: inherit;
}
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
