/* ==========================================
   SKIPREADY OPERATOR DASHBOARD
   ========================================== */

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #f4f5f7;
    color: #111827;
    font-size: 14px;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---- Page shell ---- */
.dash-page {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.dash-sidebar {
    width: 236px;
    flex-shrink: 0;
    background: #1A1C2E;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.dash-sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: block;
}

.dash-sidebar-logo img {
    height: 38px;
    width: auto;
}

/* Nav */
.dash-nav {
    padding: 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-nav-section {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    padding: 14px 10px 6px;
}

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255,255,255,.6);
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.dash-nav a svg {
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .15s;
}

.dash-nav a:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.9);
}

.dash-nav a:hover svg { opacity: 1; }

.dash-nav a.active {
    background: rgba(255,190,0,.12);
    color: #FFBE00;
    font-weight: 700;
}

.dash-nav a.active svg { opacity: 1; }

/* Trial badge */
.dash-trial-badge {
    margin: 0 14px 20px;
    background: rgba(255,190,0,.1);
    border: 1px solid rgba(255,190,0,.25);
    border-radius: 10px;
    padding: 12px 14px;
}

.dash-trial-badge strong {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #FFBE00;
    margin-bottom: 4px;
}

.dash-trial-badge p {
    font-size: .72rem;
    color: rgba(255,255,255,.5);
    line-height: 1.4;
}

.dash-trial-badge a {
    display: inline-block;
    margin-top: 8px;
    font-size: .72rem;
    font-weight: 700;
    color: #FFBE00;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Main area ---- */
.dash-main {
    margin-left: 236px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top bar */
.dash-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.dash-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-site-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 600;
    color: #6b7280;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color .2s, color .2s;
}

.dash-site-link:hover { border-color: #FFBE00; color: #1A1C2E; }

.dash-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1A1C2E;
    color: #FFBE00;
    font-size: .8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Content area */
.dash-content {
    padding: 28px 32px 48px;
    flex: 1;
}

/* ---- Stat cards ---- */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.yellow { background: rgba(255,190,0,.15); color: #c49000; }
.stat-icon.blue   { background: rgba(59,130,246,.1);  color: #3b82f6; }
.stat-icon.green  { background: rgba(34,197,94,.1);   color: #22c55e; }
.stat-icon.purple { background: rgba(139,92,246,.1);  color: #8b5cf6; }

.stat-body { min-width: 0; }

.stat-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: .75rem;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 2px;
}

/* ---- Sections / cards ---- */
.dash-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.dash-card + .dash-card { margin-top: 20px; }

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.dash-card-title {
    font-size: .9rem;
    font-weight: 700;
    color: #111827;
}

.dash-card-body {
    padding: 20px;
}

/* ---- Tables ---- */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}

.dash-table th {
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.dash-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f9fafb;
    color: #374151;
    vertical-align: middle;
}

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

.dash-table tr:hover td { background: #fafafa; }

.dash-table .mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .8rem;
    font-weight: 600;
    color: #1A1C2E;
}

/* ---- Status badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-pending   { background: rgba(251,191,36,.15); color: #b45309; }
.badge-confirmed { background: rgba(34,197,94,.12);  color: #15803d; }
.badge-completed { background: rgba(107,114,128,.1); color: #4b5563; }
.badge-cancelled { background: rgba(239,68,68,.1);   color: #b91c1c; }
.badge-trial     { background: rgba(139,92,246,.1);  color: #7c3aed; }
.badge-active    { background: rgba(34,197,94,.12);  color: #15803d; }
.badge-inactive  { background: rgba(107,114,128,.1); color: #6b7280; }

/* ---- Forms ---- */
.dash-form-section {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.dash-form-section:last-child { border-bottom: none; }

.dash-form-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    margin-bottom: 16px;
}

.dash-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.dash-form-row.trio {
    grid-template-columns: 1fr 1fr 1fr;
}

.dash-form-row:last-child { margin-bottom: 0; }

.dash-group { margin-bottom: 14px; }
.dash-group:last-child { margin-bottom: 0; }

.dash-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.dash-label .req { color: #ef4444; margin-left: 2px; }

.dash-input {
    width: 100%;
    height: 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    font-size: .88rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.dash-input:focus {
    border-color: #1A1C2E;
    box-shadow: 0 0 0 3px rgba(26,28,46,.07);
}

.dash-input.is-error { border-color: #ef4444; }

.dash-select {
    width: 100%;
    height: 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 32px 0 12px;
    font-size: .88rem;
    font-family: inherit;
    color: #111827;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}

.dash-select:focus { border-color: #1A1C2E; }

.dash-textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: .88rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.dash-textarea:focus {
    border-color: #1A1C2E;
    box-shadow: 0 0 0 3px rgba(26,28,46,.07);
}

.dash-hint {
    font-size: .74rem;
    color: #9ca3af;
    margin-top: 4px;
    line-height: 1.4;
}

.dash-field-error {
    font-size: .74rem;
    color: #ef4444;
    margin-top: 3px;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    background: #1A1C2E;
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}

.btn-primary:hover { background: #252742; }

.btn-primary.yellow {
    background: #FFBE00;
    color: #1A1C2E;
}

.btn-primary.yellow:hover { background: #e5aa00; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    background: #fff;
    color: #374151;
    font-size: .84rem;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    text-decoration: none;
}

.btn-secondary:hover { border-color: #9ca3af; color: #111827; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    background: rgba(239,68,68,.08);
    color: #dc2626;
    font-size: .78rem;
    font-weight: 700;
    font-family: inherit;
    border: 1.5px solid rgba(239,68,68,.2);
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}

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

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: .78rem;
}

/* Form save bar (sticky bottom) */
.dash-save-bar {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
}

/* ---- Flash messages ---- */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.flash-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ---- Skip sizes inline table ---- */
.skip-manage-table {
    width: 100%;
    border-collapse: collapse;
}

.skip-manage-table th {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.skip-manage-table td {
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.skip-manage-table tr:last-child td { border-bottom: none; }

.skip-manage-table td input,
.skip-manage-table td select {
    border: none;
    border-right: 1px solid #f3f4f6;
    height: 48px;
    padding: 0 12px;
    font-size: .88rem;
    font-family: inherit;
    color: #111827;
    background: transparent;
    outline: none;
    width: 100%;
    transition: background .15s;
}

.skip-manage-table td input[type="number"] { text-align: right; }

.skip-manage-table td input:focus,
.skip-manage-table td select:focus { background: rgba(255,190,0,.05); }

.skip-manage-table .price-cell {
    position: relative;
    display: flex;
    align-items: center;
}

.skip-manage-table .price-cell::before {
    content: '£';
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: .85rem;
    pointer-events: none;
}

.skip-manage-table .price-cell input {
    padding-left: 24px !important;
}

.skip-manage-table .actions-cell {
    padding: 0 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
}

.skip-row-inactive { opacity: .45; }

.skip-popular-pill {
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #FFBE00;
    color: #1A1C2E;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ---- Coverage chip display ---- */
.coverage-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.coverage-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1A1C2E;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 10px 4px 12px;
    border-radius: 20px;
}

.coverage-chip button {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
    padding: 0;
    transition: color .15s;
}

.coverage-chip button:hover { color: #fff; }

/* ---- Blocked dates calendar ---- */
.blocked-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
}

.blocked-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

.blocked-date-chip button {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: .6;
    transition: opacity .15s;
}

.blocked-date-chip button:hover { opacity: 1; }

/* ---- Booking detail panel ---- */
.booking-ref { font-size: .8rem; font-weight: 700; color: #6b7280; }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state svg {
    color: #d1d5db;
    margin-bottom: 14px;
}

.empty-state h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: .82rem;
    color: #9ca3af;
}

/* ---- Login page ---- */
.login-page {
    min-height: 100vh;
    background: #1A1C2E;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
}

.login-logo {
    display: block;
    text-align: center;
    margin-bottom: 28px;
}

.login-logo img { height: 44px; }

.login-card h1 {
    font-size: 1.3rem;
    font-weight: 900;
    color: #111827;
    margin-bottom: 4px;
    letter-spacing: -.02em;
}

.login-card p { font-size: .84rem; color: #9ca3af; margin-bottom: 24px; }

.login-btn {
    width: 100%;
    height: 48px;
    background: #1A1C2E;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}

.login-btn:hover { background: #252742; }

/* ---- Page title row ---- */
.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title-row h1 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -.02em;
}

/* ---- Extras manage table ---- */
.extras-manage-table td input {
    border: none;
    border-right: 1px solid #f3f4f6;
    height: 46px;
    padding: 0 12px;
    font-size: .88rem;
    font-family: inherit;
    color: #111827;
    background: transparent;
    outline: none;
    width: 100%;
    transition: background .15s;
}

.extras-manage-table td input:focus { background: rgba(255,190,0,.05); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .dash-form-row.trio { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .dash-sidebar { width: 200px; }
    .dash-main    { margin-left: 200px; }
    .dash-content { padding: 20px 16px 40px; }
    .dash-topbar  { padding: 0 16px; }
    .stat-cards   { grid-template-columns: 1fr 1fr; }
    .dash-form-row { grid-template-columns: 1fr; }
}
