/* ============================================
   TravelMap - Admin Panel Styles (Responsive)
   ============================================ */
:root {
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --accent: #818cf8;
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    --bg-main: #0f172a;
    --bg-input: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --mobile-header-h: 56px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text);
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
}

/* ============================
   Login Screen
   ============================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    padding: 16px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

.login-logo .material-symbols-outlined {
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo h1 {
    font-size: 22px;
    margin-top: 8px;
}

.login-error {
    display: none;
    padding: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

.login-error.show {
    display: block;
}

/* ============================
   Mobile Header
   ============================ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-h);
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
}

.mobile-header-title {
    font-weight: 700;
    font-size: 16px;
    flex: 1;
}

.mobile-header-action {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: background 0.15s;
}

.mobile-header-action:hover {
    background: rgba(255, 255, 255, 0.06);
}

.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.open {
    display: block;
}

.nav-close-btn {
    display: none;
}

/* ============================
   Admin Layout
   ============================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-nav {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 16px;
}

.nav-logo .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

.nav-links {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

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

.nav-link.active {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.06);
    border-left-color: var(--primary);
}

.nav-link .material-symbols-outlined {
    font-size: 20px;
}

.nav-footer {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    min-height: 100vh;
}

/* ============================
   Section
   ============================ */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.section-top h1 {
    font-size: 24px;
    font-weight: 700;
}

/* ============================
   Table (desktop)
   ============================ */
.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.table-thumb {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

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

/* ============================
   Mobile Cards (replaces table on mobile)
   ============================ */
.mobile-cards {
    display: none;
}

.mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.mobile-card-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-card-id {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.mobile-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-card-row .label {
    color: var(--text-muted);
    font-size: 12px;
    min-width: 80px;
    flex-shrink: 0;
}

.mobile-card-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-card-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 10px 8px;
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-sm .material-symbols-outlined {
    font-size: 16px;
}

.btn-outline {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

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

.icon-btn .material-symbols-outlined {
    font-size: 18px;
}

/* ============================
   Forms
   ============================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select option {
    background: var(--bg-dark);
    color: var(--text);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.color-preview {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    vertical-align: middle;
    border: 2px solid var(--border);
    margin-right: 8px;
}

input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 2px;
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* ============================
   Tabs
   ============================ */
.form-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius);
}

.form-tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.form-tab.active {
    background: var(--primary);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================
   Hashtag Pills
   ============================ */
.hashtag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.hashtag-pill {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
}

.hashtag-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-muted);
    color: var(--text);
    transform: translateY(-1px);
}

.hashtag-pill.active {
    background: var(--pill-color);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px var(--pill-shadow);
}

.hashtag-pill .material-symbols-outlined {
    font-size: 16px;
    opacity: 0.7;
}

.hashtag-pill.active .material-symbols-outlined {
    opacity: 1;
}

/* ============================
   Icon preview
   ============================ */
.icon-preview {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.icon-preview .material-symbols-outlined {
    font-size: 24px;
}

/* ============================
   Nominatim Search
   ============================ */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 4px;
}

.search-result-item {
    padding: 12px 14px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* ============================
   Modal
   ============================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    margin-bottom: 40px;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
    border-radius: 20px 20px 0 0;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    border-radius: 0 0 20px 20px;
}

/* ============================
   Gallery Modal
   ============================ */
.gallery-upload {
    margin-bottom: 16px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.gallery-item.is-main {
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.gallery-item-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
}

.gallery-item-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.gallery-item-actions .crop-btn {
    background: rgba(139, 92, 246, 0.8);
    color: #fff;
}

.gallery-item-actions .set-main-btn {
    background: rgba(56, 189, 248, 0.8);
    color: #fff;
}

.gallery-item-actions .delete-btn {
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
}

/* ============================
   Map in modal
   ============================ */
.form-map {
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

/* ============================
   Route points list
   ============================ */
.route-points-list {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.route-point-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: background 0.1s;
}

.route-point-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.route-point-row .num {
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.route-point-row .coords {
    flex: 1;
    color: var(--text-secondary);
}

.route-point-row .remove-point {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    padding: 4px;
}

/* ============================
   Quill editor styling
   ============================ */
.ql-toolbar.ql-snow {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.ql-container.ql-snow {
    border-color: var(--border) !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
    background: var(--bg-input) !important;
    min-height: 120px;
}

.ql-editor {
    color: var(--text) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
}

.ql-editor.ql-blank::before {
    color: var(--text-muted) !important;
}

.ql-snow .ql-stroke {
    stroke: var(--text-secondary) !important;
}

.ql-snow .ql-fill {
    fill: var(--text-secondary) !important;
}

.ql-snow .ql-picker-label {
    color: var(--text-secondary) !important;
}

/* ============================
   Toast
   ============================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 13px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    pointer-events: auto;
}

.toast.success {
    border-color: var(--success);
}

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

.toast .material-symbols-outlined {
    font-size: 18px;
}

.toast.success .material-symbols-outlined {
    color: var(--success);
}

.toast.error .material-symbols-outlined {
    color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================
   Badge
   ============================ */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.role-superuser {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.role-admin {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
}

.role-user {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* ============================
   Scrollbar
   ============================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ============================
   Crop Editor
   ============================ */
.crop-editor-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crop-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0a0a0a;
    border-radius: 10px;
    border: 2px solid var(--primary);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.crop-viewport:active {
    cursor: grabbing;
}

.crop-viewport img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    pointer-events: none;
    max-width: none;
}

.crop-viewport::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 2;
}

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

.crop-zoom-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.crop-zoom-control .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
}

.crop-zoom-control input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.crop-zoom-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.crop-info {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.crop-preview-section {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.crop-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
}

.crop-preview-row {
    display: flex;
    gap: 16px;
}

.crop-preview-box {
    flex: 1;
}

.crop-preview-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.crop-preview {
    overflow: hidden;
    background: #0a0a0a;
    border-radius: 8px;
    border: 1px solid var(--border);
    position: relative;
}

.crop-preview.popup-ratio {
    aspect-ratio: 280 / 180;
}

.crop-preview.detail-ratio {
    aspect-ratio: 420 / 260;
}

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

/* ============================================================
   RESPONSIVE - Tablet (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .admin-main {
        padding: 24px 20px;
    }
}

/* ============================================================
   RESPONSIVE - Mobile (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    /* Show mobile header */
    .mobile-header {
        display: flex;
    }

    /* Sidebar as drawer */
    .admin-nav {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .admin-nav.open {
        transform: translateX(0);
    }

    .nav-close-btn {
        display: flex;
    }

    .nav-link {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Main content below header */
    .admin-main {
        margin-left: 0;
        padding: 16px;
        padding-top: calc(var(--mobile-header-h) + 16px);
        min-height: 100vh;
    }

    .section-top {
        flex-wrap: wrap;
    }

    .section-top h1 {
        font-size: 20px;
    }

    .section-top .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* Hide desktop tables, show mobile cards */
    .data-table-wrapper {
        display: none;
    }

    .mobile-cards {
        display: block;
    }

    /* Modal full-screen on mobile */
    .modal-overlay {
        padding-top: 0;
        align-items: stretch;
    }

    .modal,
    .modal-lg {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
        margin-bottom: 0;
    }

    .modal-header {
        border-radius: 0;
        padding: 16px;
        position: sticky;
        top: 0;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        border-radius: 0;
        padding: 16px;
        position: sticky;
        bottom: 0;
    }

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-map {
        height: 250px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        justify-content: center;
        padding: 14px;
    }

    /* Gallery grid on mobile */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .gallery-item img {
        height: 100px;
    }

    .gallery-item-actions button {
        width: 36px;
        height: 36px;
    }

    /* Crop editor on mobile */
    .crop-preview-row {
        flex-direction: column;
        gap: 12px;
    }

    .crop-zoom-control input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    /* Buttons touch-friendly */
    .btn {
        padding: 11px 16px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-sm .material-symbols-outlined {
        font-size: 18px;
    }

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

    .btn-group {
        flex-wrap: wrap;
    }

    /* Toast on mobile */
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .toast {
        width: 100%;
    }

    /* Route points */
    .route-point-row {
        flex-wrap: wrap;
        padding: 8px;
    }

    .route-point-row .coords {
        font-size: 11px;
    }

    /* Login on mobile */
    .login-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    /* Hashtag pills mobile */
    .hashtag-pills {
        gap: 6px;
    }

    .hashtag-pill {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Quill toolbar wrapping */
    .ql-toolbar.ql-snow {
        flex-wrap: wrap;
    }
}

/* ============================================================
   RESPONSIVE - Small phones (max 400px)
   ============================================================ */
@media (max-width: 400px) {
    .admin-main {
        padding: 10px;
        padding-top: calc(var(--mobile-header-h) + 10px);
    }

    .section-top h1 {
        font-size: 18px;
    }

    .mobile-card {
        padding: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .gallery-item img {
        height: 80px;
    }

    .form-map {
        height: 200px;
    }
}
