@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.6);
    --bg-panel-strong: rgba(30, 41, 59, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-color);
    background-image:
        radial-gradient(ellipse at top right, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.brand-icon {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}

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

.nav-link.active {
    border-left: 3px solid var(--primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

/* Main Dashboard */
.dashboard {
    flex: 1;
    padding: 40px 50px;
    overflow-y: auto;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.dash-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    font-size: 0.9rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Glass Panel Custom */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Data Table Premium */
.jesant-table {
    width: 100%;
    border-collapse: collapse;
}

.jesant-table th {
    padding: 15px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.jesant-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.9rem;
}

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

.jesant-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.emp-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin: 3px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    font-weight: 500;
}

/* -------------------------------------
   PREMIUM ADMIN DRAWER (SLIDE-OVER)
---------------------------------------- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-panel-strong);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border-color);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active .drawer-panel {
    right: 0;
}

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

.drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    padding: 5px;
    display: flex;
    transition: 0.2s;
}

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

.drawer-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.drawer-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modern-form-group {
    margin-bottom: 20px;
}

.modern-form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.premium-checkbox-list {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
}

.premium-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.premium-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* SweetAlert overrides */
.swal2-popup {
    background: var(--bg-panel-strong) !important;
    color: white !important;
    border: 1px solid var(--border-color);
    border-radius: 16px !important;
}

.swal2-title {
    color: white !important;
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem !important;
}

.swal2-input,
.swal2-textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    color: white !important;
    border: 1px solid var(--border-color) !important;
}

/* Dashboard Cards and Filters */
.context-filters {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.glass-select {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.glass-select option {
    background: #0f172a;
    color: white;
}

.task-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.task-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.task-status-badg {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-status-badg.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.task-status-badg.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.task-body {
    display: flex;
}

.task-content {
    flex: 2;
    padding: 20px;
    border-right: 1px solid var(--border-color);
}

.task-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.dropzone:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    color: white;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-dl {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-dl:hover {
    color: white;
}

.chat-window {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 250px;
}

.chat-msg {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.chat-msg-header {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.chat-msg-author {
    font-weight: 600;
    color: #38bdf8;
}

.chat-input-area {
    display: flex;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: white;
    outline: none;
    font-size: 0.9rem;
}

.chat-send-btn {
    background: var(--primary);
    border: none;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-panel-strong);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.toast.success i {
    color: #10b981;
}

.toast.error i {
    color: #ef4444;
}

.toast.info i {
    color: #3b82f6;
}