/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #1a1a1a; font-size: 14px; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== Navbar ===== */
.navbar { background: #1a1a1a; color: #fff; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 52px; position: sticky; top: 0; z-index: 100; }
.nav-brand a { color: #d4a855; font-weight: bold; font-size: 16px; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: #ccc; padding: 6px 12px; border-radius: 4px; font-size: 13px; }
.nav-links a:hover { background: #333; color: #fff; text-decoration: none; }
.nav-logout { color: #f87171 !important; }
.nav-dropdown { position: relative; }
.nav-dropdown-btn { background: none; border: none; color: #ccc; padding: 6px 12px; cursor: pointer; font-size: 13px; border-radius: 4px; }
.nav-dropdown-btn:hover { background: #333; color: #fff; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #2a2a2a; border-radius: 6px; min-width: 160px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; color: #ccc; padding: 8px 16px; font-size: 13px; }
.nav-dropdown-menu a:hover { background: #3a3a3a; color: #fff; }

/* ===== Main content ===== */
.main-content { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* ===== Flash messages ===== */
.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ===== Form validation errors ===== */
.form-errors { list-style: none; margin: 6px 0 0; padding: 0; }
.form-errors li { font-size: 12px; color: #dc2626; display: flex; align-items: center; gap: 4px; }
.form-errors li::before { content: "⚠"; font-size: 11px; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover { background: #f9fafb; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-google { background: #fff; color: #374151; border: 1px solid #d1d5db; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-google:hover { background: #f9fafb; }

/* ===== Page header ===== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: #1a1a1a; margin: 0; }
.page-header .subtitle { color: #6b7280; font-size: 13px; margin: 4px 0 0; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sort-select { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; background: #fff; color: #1a1a1a; cursor: pointer; }
.sort-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.library-search { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; color: #1a1a1a; width: 200px; }
.library-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* ===== Table ===== */
.table-container { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { background: #f9fafb; padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
.table td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: 6px; }

/* ===== Guides ===== */
.guide-avatar { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; display: block; }
.guide-avatar-placeholder { width: 64px; height: 64px; border-radius: 50%; background: #e5c97e; color: #5a3e00; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.table .col-avatar { width: 80px; padding-right: 0; }
.table .col-actions { width: 140px; }
.guide-role { font-size: 12px; color: #6b7280; }
.guide-bio-cell { font-size: 13px; color: #6b7280; max-width: 320px; }
.action-buttons { display: flex; gap: 6px; align-items: center; }
.action-buttons form { margin: 0; }
.text-muted { color: #9ca3af; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }

/* ===== Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.library-card { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; }
.card-thumb { width: 100%; height: 160px; object-fit: cover; }
.card-thumb--empty { display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #9ca3af; font-size: 13px; }
.card-body { padding: 12px; }
.card-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-meta { color: #6b7280; font-size: 12px; margin-bottom: 4px; }
.card-coords { color: #9ca3af; font-size: 11px; }
.card-desc { color: #374151; font-size: 13px; margin-top: 4px; }
.card-images-count { color: #9ca3af; font-size: 11px; margin-top: 6px; }
.card-actions { padding: 8px 12px; border-top: 1px solid #f3f4f6; display: flex; gap: 6px; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 48px 24px; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; color: #6b7280; }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 6px; font-size: 13px; text-decoration: none; border: 1px solid #d1d5db; color: #374151; background: #fff; }
.pagination a:hover { background: #f9fafb; text-decoration: none; }
.pagination .page-current { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
.pagination .page-ellipsis { border: none; background: none; color: #6b7280; }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ===== Forms ===== */
.form-container { max-width: 840px; }
.form-section { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; padding: 24px; margin-bottom: 20px; }
.form-section h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #374151; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-group--checkbox label { display: flex; align-items: center; gap: 8px; margin-bottom: 0; cursor: pointer; }
.form-group--checkbox input[type="checkbox"] { width: auto; flex-shrink: 0; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff; color: #1a1a1a; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.hint { font-size: 12px; color: #6b7280; margin-top: 4px; }
.collapsible-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 20px; }
.collapsible-form summary { padding: 14px 20px; cursor: pointer; font-weight: 600; font-size: 14px; color: #374151; }
.collapsible-form .form-container { padding: 0 20px 20px; max-width: 100%; }

/* ===== Editor layout ===== */
.editor-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.editor-sidebar { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; position: sticky; top: 72px; max-height: calc(100vh - 100px); overflow-y: auto; }
.sidebar-section { padding: 16px; border-bottom: 1px solid #f3f4f6; }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin-bottom: 10px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar-item { padding: 8px 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; cursor: grab; transition: all 0.15s; }
.sidebar-item:hover { background: #eff6ff; border-color: #93c5fd; }
.sidebar-item:active { cursor: grabbing; }
.sidebar-item-name { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.sidebar-item-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.sidebar-empty { color: #9ca3af; font-size: 12px; padding: 8px 0; }
.sidebar-search { width: 100%; padding: 5px 8px; margin-bottom: 8px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 12px; background: #fff; color: #1a1a1a; box-sizing: border-box; }
.sidebar-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }

/* Day cards */
.editor-days { display: flex; flex-direction: column; gap: 12px; }
.day-card { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; }
.day-card-header { padding: 10px 16px; background: #1a1a1a; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.day-number { font-weight: 700; font-size: 13px; }
.day-date { font-size: 12px; color: #9ca3af; }
.day-card-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.day-zone { border: 2px dashed #e5e7eb; border-radius: 6px; min-height: 52px; padding: 8px; transition: border-color 0.15s; }
.day-zone--activity { border-color: #bfdbfe; background: #eff6ff; }
.day-zone--accommodation { border-color: #bbf7d0; background: #f0fdf4; }
.day-zone:hover { border-color: #93c5fd; }
.drop-hint { color: #9ca3af; font-size: 12px; text-align: center; padding: 8px 0; }
.drop-hint--activity { color: #3b82f6; }
.drop-hint--accommodation { color: #10b981; }
.assigned-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.assigned-item-info { flex: 1; }
.assigned-item-info strong { font-size: 13px; display: block; }
.assigned-item-info .location { font-size: 11px; color: #6b7280; }
.item-desc { font-size: 11px; color: #6b7280; margin-top: 2px; }
.remove-btn { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 4px; }
.remove-btn:hover { background: #fee2e2; }
.day-images { display: flex; gap: 6px; flex-wrap: wrap; }
.day-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; }
.day-notes { font-size: 12px; color: #6b7280; font-style: italic; padding: 6px 8px; background: #f9fafb; border-radius: 4px; }

/* ===== Map component ===== */
.map-container { position: relative; width: 100%; }
.map-image { width: 100%; height: auto; display: block; border-radius: 8px; }
.map-svg-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 8px; }
.map-markers { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.map-label { position: absolute; transform: translate(-50%, -120%); background: rgba(0,0,0,0.75); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; pointer-events: none; }


/* ===== Public view ===== */
.preview-banner { background: #fef3c7; color: #92400e; text-align: center; padding: 8px; font-size: 13px; border-bottom: 1px solid #fcd34d; }
.public-header { padding: 24px 32px; background: #fdf8f0; border-bottom: 3px solid #8B6914; display: flex; align-items: center; gap: 20px; }
.public-logo { max-height: 72px; max-width: 200px; }
.public-header-text { color: #555; font-size: 14px; }
.public-client-info { padding: 24px 32px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.public-client-info h1 { font-size: 26px; color: #2c1810; margin-bottom: 12px; }
.client-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; color: #6b7280; }
.client-meta strong { color: #374151; }
.public-intro, .public-intro-full { padding: 16px 32px; background: #fff; border-bottom: 1px solid #f3f4f6; }
.public-section { padding: 24px 32px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.public-section h2 { font-size: 18px; color: #8B6914; margin-bottom: 16px; }
.public-parks .parks-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.park-pill { display: flex; flex-direction: column; align-items: flex-start; background: #fdf8ef; border: 1px solid #e5c97e; border-radius: 8px; padding: 8px 14px; }
.park-pill .park-name { font-size: 14px; font-weight: 600; color: #5a3e00; }
.park-pill .park-country { font-size: 11px; color: #9a7a3a; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.public-days { padding: 0 32px; }
.public-day-card { background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; margin: 16px 0; overflow: hidden; }
.public-day-header { padding: 12px 16px; background: #2c1810; color: #f5e6c8; display: flex; justify-content: space-between; align-items: center; }
.public-activity, .public-accommodation { padding: 12px 16px; }
.public-activity h3 { font-size: 15px; color: #2c1810; margin-bottom: 4px; }
.public-accommodation h4 { font-size: 14px; color: #374151; margin-bottom: 2px; }
.public-accommodation .location { font-size: 12px; color: #6b7280; }
.public-day-images { display: flex; gap: 8px; padding: 0 16px 12px; }
.day-image-link { flex: 1; max-width: 33%; cursor: pointer; }
.day-pub-thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; transition: opacity .2s; }
.day-image-link:hover .day-pub-thumb { opacity: .85; }
.public-day-notes { padding: 0 16px 12px; font-size: 13px; color: #6b7280; font-style: italic; }
.public-profile { padding: 32px; background: #fdf8f0; border-top: 2px solid #8B6914; }
.public-profile h2 { font-size: 20px; color: #8B6914; margin-bottom: 16px; }
.profile-card { display: flex; gap: 20px; align-items: flex-start; }
.profile-photo { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; }
.profile-photo-preview { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; margin-bottom: 12px; }
.profile-info h3 { font-size: 18px; margin-bottom: 4px; }
.profile-title { color: #6b7280; font-size: 13px; margin-bottom: 8px; }
.public-footer { background: #2c1810; color: #f5e6c8; padding: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.footer-section h3 { color: #d4a855; font-size: 14px; margin-bottom: 8px; border-bottom: 1px solid #5a3a1a; padding-bottom: 6px; }
.footer-section p { font-size: 13px; line-height: 1.6; }

/* ===== Image gallery ===== */
.image-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.image-item { position: relative; cursor: grab; }
.image-item:active { cursor: grabbing; }
.image-thumb { width: 100px; height: 80px; object-fit: cover; border-radius: 6px; border: 2px solid #e5e7eb; }
.image-delete-btn { position: absolute; top: 2px; right: 2px; background: rgba(220,38,38,0.9); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.image-caption { display: block; font-size: 10px; color: #6b7280; text-align: center; margin-top: 2px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-preview { max-height: 80px; max-width: 240px; margin-bottom: 12px; display: block; }
.trix-current-value { padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
trix-toolbar .trix-button--icon-attach { display: none; }
.reference { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #374151; margin-left: 8px; }

/* ===== Media gallery (in forms) ===== */
.media-item { position: relative; cursor: grab; display: inline-block; }
.media-item:active { cursor: grabbing; }
.media-thumb { width: 100px; height: 80px; object-fit: cover; border-radius: 6px; border: 2px solid #e5e7eb; display: block; }
.media-delete-btn { position: absolute; top: 2px; right: 2px; background: rgba(220,38,38,0.9); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.media-delete-btn:hover { background: #dc2626; }
[data-media-picker-target="gallery"] { display: flex; flex-wrap: wrap; gap: 10px; min-height: 40px; margin-bottom: 16px; }
.media-empty { color: #9ca3af; font-size: 13px; padding: 8px 0; }

/* ===== Upload zone ===== */
.upload-zone { border: 2px dashed #d1d5db; border-radius: 8px; padding: 24px 16px; text-align: center; color: #6b7280; font-size: 13px; transition: border-color 0.15s, background 0.15s; }
.upload-zone p { margin: 0 0 12px; }
.upload-zone .btn + .btn { margin-left: 8px; }
.upload-zone.drag-over { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.upload-limit { font-size: 11px; color: #9ca3af; }
.upload-error { color: #dc2626; font-size: 12px; margin: 6px 0 0; }

/* ===== Library picker modal (inside media-picker) ===== */
.library-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.library-modal[hidden] { display: none; }
.library-modal-inner { background: #fff; border-radius: 10px; width: 100%; max-width: 720px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.library-modal-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; }
.library-modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.library-modal-header input[type="text"] { flex: 1; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.library-modal-header input[type="text"]:focus { outline: none; border-color: #2563eb; }
.library-modal-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: #6b7280; padding: 0 4px; line-height: 1; }
.library-modal-header button:hover { color: #1a1a1a; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 16px 20px; overflow-y: auto; }
.library-item { border: 2px solid #e5e7eb; border-radius: 8px; overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.library-item:hover { border-color: #2563eb; transform: scale(1.03); }
.library-thumb { width: 100%; height: 90px; object-fit: cover; display: block; }
.library-name { display: block; font-size: 11px; color: #374151; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-empty { color: #9ca3af; font-size: 13px; grid-column: 1 / -1; text-align: center; padding: 24px 0; }

/* ===== Library management page ===== */
.library-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.library-manager-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.library-manager-thumb { width: 100%; height: 120px; object-fit: cover; display: block; }
.library-manager-meta { padding: 8px 10px; }
.library-manager-name { display: block; font-size: 12px; color: #374151; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; border-radius: 4px; padding: 2px 4px; }
.library-manager-name:hover { background: #eff6ff; color: #2563eb; }
.library-manager-input { width: 100%; padding: 2px 4px; font-size: 12px; border: 1px solid #2563eb; border-radius: 4px; margin-bottom: 4px; box-sizing: border-box; }
.library-manager-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.library-manager-date { font-size: 11px; color: #9ca3af; }
.library-manager-size { font-size: 11px; color: #9ca3af; }

/* ===== Location search (geocoding) ===== */
.location-search-wrapper { position: relative; }
.location-search-input { width: 100%; }
.location-results-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 200; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); margin-top: 2px; overflow: hidden; }
.location-result-item { padding: 10px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid #f3f4f6; transition: background 0.1s; }
.location-result-item:last-child { border-bottom: none; }
.location-result-item:hover { background: #eff6ff; }
.location-result-item strong { font-size: 13px; color: #111827; }
.location-result-address { font-size: 11px; color: #6b7280; }

/* ===== Add-ons (red theme) ===== */
.badge-addon { background: #fee2e2; color: #991b1b; }
.badge-activity { background: #dbeafe; color: #1e40af; }
.badge-accommodation { background: #d1fae5; color: #065f46; }
.sidebar-item--activity { border-left: 3px solid #2563eb; }
.sidebar-item--activity:hover { background: #eff6ff; }
.sidebar-item--accommodation { border-left: 3px solid #059669; }
.sidebar-item--accommodation:hover { background: #f0fdf4; }
.sidebar-item--addon { border-left: 3px solid #dc2626; }
.sidebar-item--addon:hover { background: #fff5f5; }
.day-zone--addon { background: #fff5f5; border-color: #fca5a5; }
.drop-hint--addon { color: #dc2626; }
.public-addons { margin: 8px 0; padding: 8px 12px; background: #fff5f5; border-left: 3px solid #dc2626; border-radius: 0 4px 4px 0; }
.public-addon { margin-bottom: 6px; }
.public-addon:last-child { margin-bottom: 0; }
.public-addon h4 { font-size: 10pt; color: #7f1d1d; margin-bottom: 2px; }
.public-addon p { font-size: 9pt; color: #555; margin: 0; }
.day-addons { margin: 6px 0; padding: 6px 10px; background: #fff5f5; border-left: 2px solid #dc2626; }
.day-addon h4 { font-size: 10pt; color: #7f1d1d; margin-bottom: 2px; }
.day-addon p { font-size: 9pt; color: #444; }

/* ===== Usage panel (dashboard) ===== */
.usage-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; }
.usage-panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.usage-trial-end { font-size: 12px; color: #6b7280; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.usage-item { display: flex; flex-direction: column; gap: 4px; }
.usage-label { font-size: 11px; font-weight: 500; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.usage-value { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.usage-bar-wrap { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.usage-bar { height: 100%; background: #2563eb; border-radius: 2px; transition: width 0.3s; }

/* ===== Utility ===== */
.hidden { display: none; }

/* ===== Subscription badges ===== */
.badge-trial { background: #dbeafe; color: #1e40af; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-past_due { background: #fef3c7; color: #92400e; }
.badge-canceled { background: #f3f4f6; color: #6b7280; }
.badge-expired { background: #fee2e2; color: #991b1b; }

/* ===== Admin ===== */
.admin-page { max-width: 1100px; margin: 0 auto; }
.admin-page h1 { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; font-size: 13px; }
.admin-table thead { background: #f9fafb; }
.admin-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; color: #1a1a1a; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f9fafb; }
.admin-sub-form { padding: 16px; background: #f9fafb; border-radius: 6px; display: flex; flex-direction: column; gap: 14px; }
.admin-sub-form .form-row { grid-template-columns: repeat(3, 1fr); }
.admin-sub-form label { font-size: 12px; font-weight: 500; color: #374151; display: flex; flex-direction: column; gap: 4px; }
.admin-sub-form input, .admin-sub-form select { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; background: #fff; }
.admin-sub-form details summary { font-size: 12px; color: #6b7280; cursor: pointer; margin-bottom: 10px; }

/* ===== Plans page ===== */
.plans-page { max-width: 1080px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.plans-page > h1 { font-size: 30px; font-weight: 800; color: #1a1a1a; margin: 0 0 10px; letter-spacing: -0.5px; }
.plans-subtitle { font-size: 15px; color: #6b7280; margin: 0 0 48px; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }

.plan-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 32px 28px; display: flex; flex-direction: column; gap: 0; position: relative; transition: box-shadow 0.2s; }
.plan-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.plan-card--featured { border: 2px solid #d4a855; box-shadow: 0 4px 20px rgba(212,168,85,0.12); }
.plan-card--featured:hover { box-shadow: 0 8px 32px rgba(212,168,85,0.22); }

.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: #d4a855; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

.plan-header { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #f3f4f6; margin-bottom: 20px; }
.plan-header h2 { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 14px; }
.plan-price { font-size: 42px; font-weight: 800; color: #1a1a1a; line-height: 1; }
.plan-price span { font-size: 14px; font-weight: 400; color: #9ca3af; }

.plan-features { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { font-size: 13px; color: #374151; padding-left: 22px; position: relative; line-height: 1.4; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: #059669; font-weight: 700; }
.plan-card--featured .plan-features li::before { color: #d4a855; }

.plan-card form { width: 100%; }
.plan-card form button { width: 100%; padding: 10px 16px; font-size: 14px; }
.plan-card a.btn { display: block; width: 100%; text-align: center; padding: 10px 16px; font-size: 14px; }
.plan-card--featured .btn-primary { background: #d4a855; border-color: #c49a3c; }
.plan-card--featured .btn-primary:hover { background: #c49a3c; color: #fff; }

.coming-soon { font-size: 10px; font-weight: 600; background: #f3f4f6; color: #9ca3af; padding: 1px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }

/* ===== Upsell modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal { background: #fff; border-radius: 14px; padding: 36px 32px; max-width: 440px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.modal h2 { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0 0 12px; }
.modal p { font-size: 14px; color: #374151; margin: 0 0 10px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions form { flex: 1; }
.modal-actions form button { width: 100%; }
.modal-actions > button.btn-secondary { flex: 1; }

@media (max-width: 800px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .plans-page { padding: 32px 16px; }
}
.admin-sub-form details .form-row { grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
.admin-actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.admin-details-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; padding: 16px; background: #f9fafb; border-radius: 6px; }
.admin-details-item { display: flex; flex-direction: column; gap: 4px; }
.admin-details-label { font-size: 11px; font-weight: 500; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.admin-details-value { font-size: 14px; font-weight: 600; color: #1a1a1a; }
