:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    width: 380px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.hidden {
    width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    border-right: none;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar h2 { font-size: 1.3rem; font-weight: 600; }
.sidebar p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.4; }

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    overflow-x: hidden;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.header-title { display: flex; align-items: center; gap: 1rem; }
.header-title h1 { font-size: 1.8rem; margin-bottom: 0.2rem; }
.header-title p { color: var(--text-secondary); font-size: 0.9rem;}

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

/* Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}
.checkbox-group input { width: auto; }

label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }

input, select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

select option { background: var(--bg-color); color: white; }

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Buttons */
button {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-secondary { background: rgba(59, 130, 246, 0.2); color: var(--accent); border: 1px solid rgba(59, 130, 246, 0.3); }
.btn-secondary:hover { background: rgba(59, 130, 246, 0.3); }

.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); color: white; }

.btn-neutral { background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--border-color); }
.btn-neutral:hover { background: rgba(255,255,255,0.15); }

.btn-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.4); }

.btn-icon { background: rgba(255,255,255,0.1); color: white; padding: 0.4rem; border-radius: 6px; width: 35px; height: 35px; }
.btn-icon:hover { background: rgba(255,255,255,0.2); }
.btn-icon-danger { background: transparent; color: var(--danger); font-size: 1.1rem; padding: 0.3rem;}
.btn-icon-danger:hover { background: rgba(239, 68, 68, 0.2); border-radius: 4px;}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    position: absolute; right: 0; top: 110%;
    background-color: rgba(15, 23, 42, 0.95);
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    z-index: 1000;
    backdrop-filter: blur(15px);
    overflow: hidden;
}
.dropdown-content a {
    color: white; padding: 12px 16px; text-decoration: none; display: block; font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown-content a:hover { background-color: rgba(59, 130, 246, 0.2); color: var(--accent); }
.dropdown-content.hidden { display: none; }

/* Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem;
}

/* Filter Grid */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    align-items: flex-end;
}
@media (max-width: 1024px) {
    .filter-grid { grid-template-columns: repeat(2, 1fr); }
}
.filter-btn-group { flex-direction: row; gap: 0.8rem; margin-bottom: 0; }
.filter-btn-group button { flex: 1; }

.batch-tags-container { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.batch-tag { background: rgba(59, 130, 246, 0.2); border: 1px solid var(--accent); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; cursor: pointer; color: white;}
.batch-tag:hover { background: var(--danger); border-color: var(--danger); text-decoration: line-through; } /* Hover to remove */
.batch-tag.addable:hover { background: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Table */
.table-container { overflow-x: auto; padding: 0; display: flex; flex-direction: column;}
.table-toolbar { padding: 1rem 1.5rem; display: flex; gap: 1rem; border-bottom: 1px solid var(--border-color); align-items: center;}
.table-toolbar.hidden { display: none; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.8rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border-color); vertical-align: middle;}
th { font-weight: 600; color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(0, 0, 0, 0.2); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: white; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
tbody tr.selected { background: rgba(59, 130, 246, 0.1); }

.thumbnail { 
    width: 65px; 
    height: 65px; 
    border-radius: 6px; 
    object-fit: cover; 
    background: #333; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, z-index 0s;
    cursor: pointer;
    position: relative;
    z-index: 1;
}
.thumbnail:hover {
    transform: scale(3.5);
    transform-origin: center left;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    border-radius: 4px;
}
.rating-badge { background: rgba(245, 158, 11, 0.2); color: #fbbf24; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.2rem; }
.type-badge { background: rgba(59, 130, 246, 0.2); color: #60a5fa; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; text-transform: uppercase; font-weight: 600; }
.batch-label { background: rgba(16, 185, 129, 0.2); color: #34d399; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; margin-left: 0.3rem;}

.text-center { text-align: center; }
.loading-text { color: var(--text-secondary); padding: 2rem !important; }
.map-link { color: var(--accent); text-decoration: none; font-size: 0.75rem; display: block; margin-top: 0.2rem;}
.map-link:hover { text-decoration: underline; }

.col-phone { white-space: nowrap; font-size: 0.85rem; font-family: monospace; }

/* Pagination */
.pagination-container { display: flex; justify-content: flex-end; padding: 1rem 1.5rem; gap: 0.4rem; }
.page-btn { padding: 0.4rem 0.8rem; background: var(--bg-color); border: 1px solid var(--border-color); color: var(--text-secondary); border-radius: 4px; font-size: 0.8rem; cursor: pointer; }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-btn:hover:not(.active) { background: rgba(255,255,255,0.1); color: white;}

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-content { width: 400px; padding: 2rem; position: relative; }
.close-modal { position: absolute; top: 1rem; right: 1.5rem; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); }

/* Loading Overlay */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;}
.loading-overlay.hidden { display: none !important; }
.loading-overlay p { color: var(--text-secondary); margin-top: 1rem; max-width: 450px; line-height: 1.5;}

.loader-large {
    width: 60px; height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 2rem;
}

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

/* Toast Notifications */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--panel-bg); backdrop-filter: blur(10px); border-left: 4px solid var(--accent); padding: 1rem 1.5rem; border-radius: 8px; color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.2); animation: slideIn 0.3s ease forwards; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
