/* =========================================================
   Admin Portal - Premium Glassmorphism Theme
   ========================================================= */

body.admin-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── LOGIN OVERLAY ─── */
.login-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Light, eye-comfortable gradient — replaces the dark background */
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 201, 177, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(99, 179, 237, 0.18) 0%, transparent 50%),
        linear-gradient(145deg, #eaf6ff 0%, #f0fdf9 40%, #e8f4fd 70%, #f5f0ff 100%);
    z-index: 1000;
}

.login-glass-card {
    background: #ffffff;
    border: 1px solid rgba(0, 201, 177, 0.2);
    border-radius: 24px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 4px 24px rgba(15, 28, 63, 0.08),
        0 20px 60px rgba(0, 201, 177, 0.1);
    text-align: center;
}

.login-brand {
    margin-bottom: 32px;
}

.admin-logo {
    height: 50px;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 8px rgba(0, 201, 177, 0.25));
}

.login-brand h2 {
    color: #0F1C3F;
    font-family: 'Outfit', sans-serif;
    margin: 0 0 8px 0;
    font-size: 1.8rem;
}

.login-brand p {
    color: #6b7fa3;
    font-size: 0.93rem;
    margin: 0;
}

/* Login page — override dark form-control for light card */
.login-glass-card .form-control {
    background: #f4f7ff;
    border: 1.5px solid #d4dcf0;
    color: #0F1C3F;
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.login-glass-card .form-control:focus {
    border-color: #00C9B1;
    background: #f0fdfb;
    box-shadow: 0 0 0 3px rgba(0, 201, 177, 0.15);
}

.login-glass-card .form-control::placeholder { color: #a0aec0; }

/* Login button — keep teal primary style */
.login-glass-card .btn-primary {
    background: linear-gradient(135deg, #1A348A, #00C9B1);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: opacity 0.25s, transform 0.2s;
}
.login-glass-card .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── MAIN LAYOUT: SIDEBAR + CONTENT ─── */
.admin-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header .sidebar-logo {
    height: 32px;
}

.sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin: 0 0 12px 12px;
    font-weight: 600;
}

.nav-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #94a3b8;
    text-align: left;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(26, 52, 138, 0.2), rgba(0, 201, 177, 0.2));
    border: 1px solid rgba(0, 201, 177, 0.3);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #1A348A, #00C9B1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.admin-details {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.admin-status {
    font-size: 0.75rem;
    color: #10b981;
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #ef4444;
    color: #fff;
}

/* Main Content Area */
.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at 50% 0%, rgba(26, 52, 138, 0.15), transparent 50%);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-header h1 {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    font-size: 1.6rem;
    color: #fff;
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.content-body {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.tab-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.text-muted {
    color: #94a3b8;
    margin: 0;
}

/* ─── FORMS & CARDS ─── */
.glass-card, .founder-card, .job-card, .section-item {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover, .founder-card:hover, .job-card:hover {
    border-color: rgba(0, 201, 177, 0.3);
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 20px;
}
.form-row .half { flex: 1; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: #00C9B1;
    box-shadow: 0 0 0 3px rgba(0, 201, 177, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-full { width: 100%; }
.glass-divider { border: 0; height: 1px; background: rgba(255,255,255,0.1); margin: 24px 0; }

/* ─── TOGGLE SWITCH ─── */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 12px 16px;
    border-radius: 8px;
}
.toggle-label { margin-bottom: 0 !important; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #475569; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(20px); }

/* ─── NOTIFICATIONS ─── */
.glass-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    font-weight: 500;
}

.glass-toast.show { transform: translateY(0); }
.glass-toast.success { border-left: 4px solid #10b981; }
.glass-toast.error { border-left: 4px solid #ef4444; }

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
    margin-top: 10px;
    display: inline-block;
}
.remove-btn:hover { background: #ef4444; color: #fff; }

/* ─── UNREAD BADGE (sidebar) ────────────────────────────────── */
.unread-badge {
    background: #f59e0b;
    color: #000;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── HERO BANNER CARDS ─────────────────────────────────────── */
.banners-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.banner-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px 1fr;
    transition: border-color 0.3s;
}

.banner-card:hover { border-color: rgba(0, 201, 177, 0.3); }

.banner-preview {
    position: relative;
    height: 220px;
    background: #0f172a;
    overflow: hidden;
}

.banner-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #475569;
    font-size: 0.85rem;
}
.banner-placeholder span:first-child { font-size: 2.5rem; }

.banner-status-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 50px;
}
.banner-status-pill.active   { background: rgba(16,185,129,0.15); color:#10b981; border:1px solid rgba(16,185,129,0.3); }
.banner-status-pill.inactive { background: rgba(239,68,68,0.15);  color:#ef4444; border:1px solid rgba(239,68,68,0.3);  }

.banner-fields {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.banner-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* File upload area */
.file-upload-area {
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    color: #64748b;
    font-size: 0.88rem;
    transition: all 0.3s;
}
.file-upload-area:hover {
    border-color: rgba(0, 201, 177, 0.45);
    color: #00C9B1;
    background: rgba(0,201,177,0.04);
}

/* ─── CUSTOMER QUERIES ──────────────────────────────────────── */
.queries-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.query-stat-card {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 20px 24px;
    text-align: center;
}

.q-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.q-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.queries-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.query-card {
    padding: 20px 24px;
    border-radius: 14px;
    transition: border-color 0.3s, transform 0.2s;
}

.query-card.unread {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.04);
}
.query-card.unread:hover { border-color: rgba(245, 158, 11, 0.6); }

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.query-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.query-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A348A, #00C9B1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.query-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.query-meta {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 2px;
}

.query-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.query-service-tag {
    background: rgba(26, 52, 138, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(26,52,138,0.4);
    border-radius: 50px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.query-date {
    color: #475569;
    font-size: 0.78rem;
}

.new-badge {
    background: #f59e0b;
    color: #000;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    letter-spacing: 0.05em;
}

.query-message {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.65;
    padding: 14px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.query-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* Responsive: stack banner card on small screens */
@media (max-width: 900px) {
    .banner-card { grid-template-columns: 1fr; }
    .banner-preview { height: 180px; }
    .queries-summary { flex-direction: column; }
}
