*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #13EC6D;
    --primary-glow: rgba(19, 236, 109, 0.4);
    --primary-dim: rgba(19, 236, 109, 0.1);
    
    --bg-base: #060913;
    --glass-bg: rgba(20, 24, 40, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --danger: #ff4757;
    --danger-dim: rgba(255, 71, 87, 0.15);
    --blue-accent: #3b82f6;

    --radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 30px 20px 80px;
}

/* ── Animated Background Orbs ── */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #0a1128 0%, var(--bg-base) 100%);
}

.orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.orb-2 {
    background: #2563eb;
    bottom: -200px;
    left: -100px;
    animation-delay: -10s;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: none;
}

/* ── Header & Navigation ── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-box {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(19,236,109,0.2), rgba(19,236,109,0.05));
    border: 1px solid rgba(19,236,109,0.3);
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #fff, var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ── Layout Grid ── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

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

/* ── Sidebar ── */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 30px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.nav-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(19, 236, 109, 0.25);
    box-shadow: 0 4px 15px rgba(19, 236, 109, 0.05);
}

/* ── Glass Cards ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Forms ── */
.form-grid {
    display: grid;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-left: 4px;
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

textarea.input-field {
    resize: vertical;
    min-height: 100px;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-dim);
    background: rgba(0, 0, 0, 0.5);
}

.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
}

.switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider::before {
    transform: translateX(22px);
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-action:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit {
    background: var(--primary);
    color: #000;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-submit:hover:not(:disabled) {
    box-shadow: 0 8px 25px rgba(19, 236, 109, 0.6);
}

/* File Upload */
.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.upload-dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.upload-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}
.upload-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Previews */
.image-preview-container {
    display: none;
    margin-top: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--glass-border);
    position: relative;
}

.image-preview-container img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.clear-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.clear-preview:hover { background: var(--danger); }

/* List Items */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.list-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.1);
}

.item-visual {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.item-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-visual .icon-placeholder {
    font-size: 32px;
    color: var(--primary);
    opacity: 0.8;
}

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

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

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

.status-active {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(19, 236, 109, 0.2);
}

.status-inactive {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
}

.btn-icon:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.btn-icon.delete:hover {
    color: var(--danger);
    background: var(--danger-dim);
    border-color: rgba(255, 71, 87, 0.3);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.2);
}

.btn-icon.toggle:hover {
    color: var(--primary);
    background: var(--primary-dim);
    border-color: rgba(19, 236, 109, 0.3);
}

/* ── Login Overlay ── */
.login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #0f1729 0%, var(--bg-base) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo-box {
    margin: 0 auto 20px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ── Tab Panes ── */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Empty States ── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .material-symbols-rounded {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

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

/* ── Toast ── */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

#toast.error {
    border-color: var(--danger);
}

/* ── Floating Bot Button ── */
.floating-bot-btn {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0ea855);
    border: none;
    color: #000;
    display: grid;
    place-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(19, 236, 109, 0.4);
    transition: var(--transition);
    z-index: 100;
}

.floating-bot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 35px rgba(19, 236, 109, 0.6);
}

.floating-bot-btn:active {
    transform: scale(0.9);
}

/* ── Bot Chat Window ── */
.bot-window {
    position: fixed;
    right: 28px;
    bottom: 100px;
    width: 380px;
    height: 580px;
    max-height: calc(100vh - 160px);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    z-index: 99;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.bot-window.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

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

.header-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.header-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.icon-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 18px;
}

.message.bot .avatar {
    background: var(--primary-dim);
    color: var(--primary);
}

.message.user .avatar {
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
}

.bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .bubble {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-top-left-radius: 4px;
}

.message.user .bubble {
    background: var(--primary-dim);
    border: 1px solid rgba(19, 236, 109, 0.2);
    border-top-right-radius: 4px;
}

.bubble p {
    margin-bottom: 8px;
}

.bubble p:last-child {
    margin-bottom: 0;
}

.bubble strong {
    color: var(--primary);
}

.bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
}

.bubble th, .bubble td {
    border: 1px solid var(--glass-border);
    padding: 6px 8px;
    text-align: left;
}

.bubble th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
}

.loading-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: bounce 1.2s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
}

.input-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-form input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.input-form input::placeholder {
    color: var(--text-muted);
}

.input-form button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    border: none;
    color: #000;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
    flex-shrink: 0;
}

.input-form button:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
}

.input-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bot-window .input-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ── Mobile Menu Toggle ── */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 24px;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* ── Sidebar Backdrop ── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.open {
    display: block;
    opacity: 1;
}

/* ── Responsive: Tablet & Mobile ── */
@media (max-width: 900px) {
    body {
        padding: 20px 16px 80px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        z-index: 100;
        border-radius: 0;
        padding: 24px 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        display: flex;
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    header {
        margin-bottom: 24px;
    }

    .glass-card {
        padding: 20px;
        border-radius: 16px;
    }

    .card-header {
        margin-bottom: 20px;
    }

    .card-header h2 {
        font-size: 16px;
    }

    .login-card {
        padding: 32px 24px;
        margin: 0 16px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    .brand-text span {
        font-size: 12px;
    }

    .logo-box {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .header-user {
        padding: 4px 12px !important;
        gap: 8px !important;
    }

    .header-user span:first-child {
        font-size: 12px !important;
    }

    .header-user span:nth-child(2) {
        font-size: 10px !important;
    }

    .header-user .btn-icon {
        width: 32px !important;
        height: 32px !important;
    }

    .nav-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .list-item {
        gap: 12px;
        padding: 12px;
        flex-wrap: wrap;
    }

    .item-visual {
        width: 56px;
        height: 56px;
    }

    .item-visual .icon-placeholder {
        font-size: 24px;
    }

    .item-title {
        font-size: 14px;
    }

    .item-desc {
        white-space: normal;
        max-width: 100%;
    }

    .item-actions {
        flex-direction: row;
        gap: 6px;
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--glass-border);
        margin-top: 4px;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
    }

    .btn-action {
        padding: 12px 20px;
        font-size: 14px;
    }

    .toggle-wrapper {
        gap: 10px;
    }

    .prayer-times-grid {
        grid-template-columns: 1fr !important;
    }

    .upload-dropzone {
        padding: 20px 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .bubble {
        max-width: 90%;
    }

    .chat-input-container {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px 12px 80px;
    }

    .glass-card {
        padding: 16px;
    }

    .card-header {
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .card-header h2 {
        font-size: 14px;
    }

    .login-card {
        padding: 24px 16px;
    }

    .login-header h2 {
        font-size: 18px;
    }

    .login-header p {
        font-size: 13px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .brand-text h1 {
        font-size: 16px;
    }

    .brand-text span {
        font-size: 11px;
    }

    .logo-box {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 12px;
    }

    .mobile-menu-toggle {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .sidebar {
        width: 260px;
        padding: 20px 16px;
    }

    .input-field {
        padding: 12px 14px;
        font-size: 14px;
    }

    textarea.input-field {
        min-height: 80px;
    }

    .data-list {
        gap: 12px;
    }

    .list-item {
        gap: 10px;
        padding: 10px;
        border-radius: 12px;
    }

    .item-visual {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .item-title {
        font-size: 13px;
    }

    .item-desc {
        font-size: 12px;
    }

    .item-actions {
        gap: 4px;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 16px;
    }

    .btn-action {
        padding: 10px 16px;
        font-size: 13px;
    }

    .switch {
        width: 44px;
        height: 24px;
    }

    .slider::before {
        width: 18px;
        height: 18px;
    }

    input:checked + .slider::before {
        transform: translateX(20px);
    }

    .upload-dropzone {
        padding: 16px 12px;
    }

    .upload-icon {
        font-size: 28px;
    }

    .upload-text {
        font-size: 13px;
    }

    .image-preview-container img {
        max-height: 180px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ── Responsive: Chat Window ── */
@media (max-width: 600px) {
    .bot-window {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 84px;
        height: 55vh;
        max-height: 55vh;
        border-radius: 16px;
    }

    .floating-bot-btn {
        width: 52px;
        height: 52px;
        right: 16px;
        bottom: 16px;
        font-size: 24px;
    }

    .chat-header {
        padding: 16px 20px;
    }

    .header-info h3 {
        font-size: 14px;
    }

    .bubble {
        max-width: 95%;
        font-size: 13px;
        padding: 10px 14px;
    }

    .input-form input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .input-form button {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* ── Modal Overlay ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: fadeIn 0.25s ease-out;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-body .form-grid {
    gap: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}

.btn-danger {
    background: var(--danger);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

@media (max-width: 480px) {
    .modal-card {
        margin: 0 8px;
        border-radius: 16px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .brand-text h1 {
        font-size: 14px;
    }

    .brand-text span {
        display: none;
    }

    .logo-box {
        width: 34px;
        height: 34px;
        font-size: 16px;
        border-radius: 10px;
    }

    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .glass-card {
        padding: 12px;
        border-radius: 14px;
    }

    .bot-window {
        right: 4px;
        left: 4px;
        bottom: 76px;
        height: 50vh;
        border-radius: 14px;
    }

    .floating-bot-btn {
        width: 44px;
        height: 44px;
        right: 12px;
        bottom: 12px;
        font-size: 20px;
    }
}
