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

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

:root {
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent2: #7c3aed;
    --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --red: #dc2626;
    --green: #16a34a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
}

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.5;
}

/* TOPBAR */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 28px;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700; font-size: 15px;
    color: var(--gray-900);
    display: flex; align-items: center; gap: 10px;
}
.topbar-logo {
    width: 30px; height: 30px;
    background: var(--grad);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.topbar-logo svg { color: #fff; }
.topbar-links { display: flex; gap: 8px; }
.topbar-links a {
    font-size: 13px; color: var(--gray-600);
    text-decoration: none; padding: 6px 12px;
    border-radius: 6px; transition: all .15s;
}
.topbar-links a:hover { background: var(--gray-100); color: var(--gray-900); }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 28px; }

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px; font-weight: 700; color: var(--gray-900);
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px; font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.4); }
.btn-outline { background: var(--white); border-color: var(--gray-200); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--white); border-color: #fca5a5; color: var(--red); }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-full { width: 100%; justify-content: center; }

/* CARDS */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.card-header h3 { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* TOURS GRID */
.tours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px; }
.tour-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-200); overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.tour-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tour-card.unpublished { opacity: .65; }
.tour-card-body { padding: 18px; }
.tour-card-body h3 { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.tour-desc { color: var(--gray-600); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.tour-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--gray-400); }
.tour-card-actions {
    padding: 12px 18px; border-top: 1px solid var(--gray-100);
    display: flex; gap: 6px; flex-wrap: wrap;
    background: var(--gray-50);
}

/* SCENES LIST */
.scenes-list { display: flex; flex-direction: column; gap: 10px; }
.scene-row {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 14px 18px;
    display: flex; align-items: center; gap: 16px;
    transition: box-shadow .2s;
}
.scene-row:hover { box-shadow: var(--shadow-sm); }
.scene-thumb { width: 110px; height: 55px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--gray-100); }
.scene-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.scene-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.scene-info strong { font-size: 14px; font-weight: 500; }
.scene-meta { font-size: 11px; color: var(--gray-400); }
.scene-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* BADGES */
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-gray  { background: var(--gray-100); color: var(--gray-600); }
.badge-blue  { background: #eff6ff; color: var(--accent); }

/* FIELDS */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 500; color: var(--gray-600); letter-spacing: .02em; }
.field input, .field textarea, .field select {
    padding: 9px 12px; border: 1px solid var(--gray-200);
    border-radius: 8px; font-size: 14px; font-family: inherit;
    color: var(--gray-800); background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ALERTS */
.alert { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }

/* UPLOAD ZONE */
.upload-zone {
    border: 2px dashed var(--gray-200); border-radius: var(--radius);
    padding: 28px 20px; text-align: center; cursor: pointer;
    transition: all .2s; background: var(--gray-50);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: #eff6ff; }
.upload-icon { font-size: 36px; margin-bottom: 10px; }
.upload-sub { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
#upload-selected { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
#upload-selected button { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 18px; line-height: 1; }

/* PROGRESS */
.progress-bar { height: 6px; background: var(--gray-200); border-radius: 99px; margin-bottom: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; width: 0; }
#progress-text { font-size: 12px; color: var(--gray-600); text-align: center; }

/* MODAL */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; padding: 20px;
    backdrop-filter: blur(4px);
}
.modal {
    background: var(--white); border-radius: 14px;
    width: 100%; max-width: 480px; max-height: 90vh;
    overflow-y: auto; padding: 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
}
.modal-lg { max-width: 600px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-header h3 { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-400); padding: 0; line-height: 1; }
.modal-close:hover { color: var(--gray-800); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--gray-100); }

/* LOGIN */
body.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}
.login-box {
    background: var(--white); border-radius: 16px;
    padding: 44px; width: 100%; max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    border: 1px solid var(--gray-200);
}
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo-icon {
    width: 56px; height: 56px; background: var(--grad);
    border-radius: 16px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
}
.login-logo-icon svg { color: #fff; }
.login-box h1 {
    font-family: 'Outfit', sans-serif;
    text-align: center; font-size: 22px; font-weight: 700;
    margin-bottom: 4px; color: var(--gray-900);
}
.login-sub { text-align: center; color: var(--gray-400); font-size: 13px; margin-bottom: 28px; }

/* EMPTY STATE */
.empty-state {
    text-align: center; padding: 70px 20px;
    color: var(--gray-400);
    background: var(--white); border-radius: var(--radius);
    border: 2px dashed var(--gray-200);
}
.empty-state p { font-size: 15px; }
