:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-glow: rgba(14, 165, 233, 0.15);
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-content: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-stripe: rgba(255, 255, 255, 0.02);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.06);
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow: hidden;
}

/* ===================== LAYOUT ===================== */
.app-wrapper { display: flex; height: 100vh; width: 100vw; }

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 0;
    height: 100vh;
    overflow: hidden;
}

.logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-shrink: 0; }
.logo-icon { font-size: 2rem; }
.logo h2 { font-size: 1.25rem; font-weight: 700; }

nav { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; padding-right: 0.25rem; }
nav::-webkit-scrollbar { width: 4px; }
nav::-webkit-scrollbar-track { background: transparent; }
nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
nav ul { list-style: none; }
nav li {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    transition: all var(--transition);
    font-size: 0.9rem;
    flex-shrink: 0;
}
nav li:hover { background: rgba(255, 255, 255, 0.05); color: white; }
nav li.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3); }

.sidebar-footer { flex-shrink: 0; padding: 1rem 0; }
.sidebar-user {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.user-name { font-weight: 600; font-size: 1rem; }
.user-role { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}
.btn-icon:hover { border-color: var(--error); color: var(--error); }

/* Content Area */
.content {
    flex: 1;
    padding: 2.5rem 3rem;
    overflow-y: auto;
    background: var(--bg-content);
}

.view-section { display: none; max-width: 1200px; margin: 0 auto; }
.view-section.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ===================== UI ELEMENTS ===================== */
.hero { margin-bottom: 2rem; }
.hero h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.25rem; }
.hero p { color: var(--text-muted); font-size: 1rem; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.card-header h3 { font-size: 1.1rem; font-weight: 600; }
.header-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.info-item label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}
.info-item p {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    word-break: break-all;
}

/* ===================== BUTTONS ===================== */
.btn {
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-main); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.btn-danger { background: var(--error); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; border-radius: 8px; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.7rem; border-radius: 6px; }
.full-width { width: 100%; margin-top: 1rem; justify-content: center; }

/* ===================== STATUS BADGE ===================== */
.status-badge {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.online .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-info { background: var(--primary-glow); color: var(--primary); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* ===================== SEARCH & FILTER ===================== */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    border-radius: var(--radius);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    min-width: 220px;
    transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--text-dim); }
.search-icon {
    position: absolute;
    left: 0.7rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    pointer-events: none;
}
.search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    border-radius: 50%;
    display: none;
    line-height: 1;
}
.search-clear:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }
.search-clear.visible { display: block; }
.record-count {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    white-space: nowrap;
}

/* ===================== TABLE ===================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

thead th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
    position: relative;
}

thead th:hover { color: var(--text-main); }
thead th.sorted { color: var(--primary); }
thead th .sort-arrow {
    margin-left: 0.3rem;
    font-size: 0.6rem;
    opacity: 0.4;
}
thead th.sorted .sort-arrow { opacity: 1; }

tbody tr {
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-light);
}
tbody tr:nth-child(even) { background: var(--bg-stripe); }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cell types */
.cell-text { color: var(--text-main); }
.cell-null { color: var(--text-dim); font-style: italic; }
.cell-bool-true { color: var(--success); font-weight: 600; }
.cell-bool-false { color: var(--text-dim); }
.cell-json { font-family: 'Courier New', monospace; font-size: 0.75rem; color: var(--text-muted); max-width: 180px; }
.cell-date { font-family: 'Courier New', monospace; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.cell-uuid { font-family: 'Courier New', monospace; font-size: 0.7rem; color: var(--text-dim); max-width: 100px; }
.cell-link { color: var(--primary); text-decoration: none; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.3rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-link:hover { text-decoration: underline; color: #38bdf8; }

/* Image thumbnails in table cells */
.cell-thumbs { display: inline-flex; align-items: center; gap: 0.25rem; }
.cell-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); transition: all 0.2s ease; }
.cell-thumb:hover { transform: scale(3); z-index: 100; position: relative; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.cell-thumb-single { width: 42px; height: 42px; }
.cell-thumb-link { display: inline-block; line-height: 0; }
.cell-thumb-more { font-size: 0.65rem; color: var(--text-dim); background: rgba(0,0,0,0.3); padding: 0.1rem 0.35rem; border-radius: 4px; }
.cell-file-link { font-size: 0.75rem; color: var(--primary); text-decoration: none; padding: 0.1rem 0.3rem; background: var(--primary-glow); border-radius: 4px; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.2rem; }

/* Action buttons in table */
.actions-cell {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    white-space: nowrap;
}

.btn-row {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.btn-row:hover { transform: translateY(-1px); }
.btn-edit { border-color: transparent; }
.btn-edit:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }
.btn-delete { border-color: transparent; }
.btn-delete:hover { border-color: var(--error); color: var(--error); background: rgba(239, 68, 68, 0.1); }
.btn-view { border-color: transparent; }
.btn-view:hover { border-color: var(--success); color: var(--success); background: rgba(34, 197, 94, 0.1); }

/* Table empty state */
.table-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dim);
}
.table-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
.table-empty-text { font-size: 0.9rem; }

/* ===================== STATUS MESSAGES ===================== */
.status-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.status-msg.success { color: var(--success); }
.status-msg.error { color: var(--error); }

/* ===================== MODAL ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}
.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--bg-sidebar);
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s ease;
}

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

.modal-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.btn-close:hover { background: rgba(239, 68, 68, 0.15); color: var(--error); border-color: var(--error); }

.modal-body {
    padding: 2rem 2.5rem;
    overflow-y: auto;
    flex: 1;
}

/* ===================== FORM ===================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group { text-align: left; margin-bottom: 0.25rem; }
.form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.form-input,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    outline: none;
    resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    appearance: auto;
    transition: border-color var(--transition);
}
.form-select:focus { border-color: var(--primary); }
.form-select option { background: var(--bg-sidebar); color: white; }

/* Checkbox */
.checkbox-input {
    width: 18px !important;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Form actions */
.form-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.form-actions .btn {
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
}

/* Login Page */
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.login-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.error-msg { color: var(--error); font-size: 0.85rem; margin-top: 1rem; }

/* ===================== ANALYTICS ===================== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.analytics-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--transition);
}
.analytics-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
}
.analytics-count { font-size: 2rem; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; }
.analytics-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===================== STORAGE MANAGER ===================== */
.storage-usage { display: flex; flex-direction: column; gap: 1.5rem; }
.usage-bar-container { display: flex; flex-direction: column; gap: 0.5rem; }
.usage-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.usage-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease, background 0.5s ease;
}
.usage-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.usage-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; }
.usage-stat {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-light);
}
.usage-stat-label { display: block; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.3rem; }
.usage-stat-value { display: block; font-size: 1.1rem; font-weight: 700; }
.cell-size { font-family: 'Courier New', monospace; font-size: 0.75rem; color: var(--text-muted); }

/* ===================== FILE UPLOAD ===================== */
.fileupload-wrapper { display: flex; flex-direction: column; gap: 0.5rem; }
.fileupload-input { padding: 0.5rem !important; font-size: 0.8rem !important; cursor: pointer; }
.fileupload-input::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.75rem;
    transition: var(--transition);
}
.fileupload-input::file-selector-button:hover { opacity: 0.85; }
.fileupload-preview { min-height: 36px; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.fileupload-badge {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.fileupload-empty { color: var(--text-dim); font-size: 0.75rem; font-style: italic; }
.fileupload-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 99px;
    padding: 0.3rem 0.75rem;
}
.fileupload-progress-bar {
    height: 5px;
    background: var(--primary);
    border-radius: 99px;
    flex: 1;
    transition: width 0.3s ease;
    min-width: 40px;
}
.fileupload-progress-text { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.fileupload-hint { color: var(--text-dim); font-size: 0.7rem; }
.fileupload-thumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.fileupload-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: transform var(--transition);
}
.fileupload-thumb:hover { transform: scale(1.8); z-index: 10; position: relative; }
.fileupload-file-link {
    font-size: 0.7rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    background: var(--primary-glow);
    border-radius: 4px;
    white-space: nowrap;
}

/* ===================== TRANSLATION WORKBENCH ===================== */
.trans-workbench { margin-bottom: 1rem; }
.trans-missing-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.trans-missing-header h4 { font-size: 1rem; }
.trans-badge { background: var(--error); color: white; padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.75rem; font-weight: 700; }
.trans-missing-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
}
.trans-missing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.trans-missing-item:last-child { border-bottom: none; }
.trans-missing-key { flex: 1; min-width: 200px; }
.trans-missing-key strong { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.trans-ref { display: block; font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.trans-missing-form { display: flex; gap: 0.5rem; align-items: center; }
.trans-missing-form .form-input { min-width: 200px; padding: 0.4rem 0.7rem; font-size: 0.85rem; }

/* Translation Overview Table */
.trans-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; }
.trans-cell.done { color: var(--success); }
.trans-cell.missing { color: var(--error); font-weight: 600; }

/* ===================== MAP STYLES ===================== */
.map-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.map-preview {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}
.map-preview:hover {
    transform: scale(1.2);
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.map-preview .leaflet-container {
    width: 100%;
    height: 100%;
}
.map-container {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}
.map-container .leaflet-container { width: 100%; height: 100%; z-index: 1; }
.map-coords {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.map-coords input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    outline: none;
}
.map-coords input:focus {
    border-color: var(--primary);
}
.map-info {
    color: var(--text-dim);
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.map-geocode-status {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.map-geocode-status.status-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.map-geocode-status.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.map-geocode-status.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.map-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.map-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .sidebar { width: 60px; padding: 1rem 0.5rem; }
    .sidebar .logo h2, .sidebar .user-info, .sidebar-footer .status-text { display: none; }
    .sidebar .logo { justify-content: center; }
    nav li { padding: 0.5rem; justify-content: center; }
    nav li span:last-child { display: none; }
    .content { padding: 1.5rem; }
    .card { padding: 1.25rem; }
    .modal-body { padding: 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .header-actions { flex-wrap: wrap; }
    .search-input { min-width: 140px; }
}