/* TinyBooking — hand-written stylesheet (no build step).
   Theme: tinymail.ca — dark navy + crimson accent. */

:root {
    --night-950: #070b13;
    --night-900: #0c1322;
    --night-850: #111a2e;
    --night-800: #182238;
    --night-700: #223052;
    --night-600: #2e4068;
    --brand-300: #fda4af;
    --brand-400: #fb7185;
    --brand-500: #f43f5e;
    --brand-600: #e11d48;
    --brand-700: #be123c;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --green-300: #6ee7b7;
    --green-500: #10b981;
    --radius: 0.75rem;
    --radius-lg: 1rem;
}

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--night-950);
    color: var(--gray-300);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Let long unbroken strings (emails, URLs) wrap instead of overlapping. */
    overflow-wrap: break-word;
}

h1, h2, h3 { color: #fff; font-weight: 700; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--brand-400); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding-left: 1.25rem; }

/* ---------- layout helpers ---------- */
.container { max-width: 72rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.container-md { max-width: 56rem; }
.container-sm { max-width: 42rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; } .gap-5 { gap: 1.25rem; } .gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1 1 0%; min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .25rem; } .mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }

.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--gray-400); }
.text-dim { color: var(--gray-500); }
.text-faint { color: var(--gray-600); }
.text-brand { color: var(--brand-400); }
.text-green { color: var(--green-300); }
.text-white { color: #fff; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.block { display: block; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hover-white:hover { color: #fff; }
.border-t { border-top: 1px solid var(--night-700); }
.pt-4 { padding-top: 1rem; } .pt-5 { padding-top: 1.25rem; } .pt-6 { padding-top: 1.5rem; }
.w-full { width: 100%; }
.min-w-64 { min-width: 16rem; }

/* ---------- header / logo ---------- */
.site-header { border-bottom: 1px solid var(--night-800); background: rgba(12, 19, 34, .6); }
.site-header .inner {
    max-width: 72rem; margin: 0 auto; padding: 1rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; row-gap: .5rem; column-gap: 1rem;
}
@media (max-width: 640px) {
    .logo-tagline { display: none; } /* keep the small-screen header compact */
}
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-img { height: 2rem; width: auto; display: block; }
.logo-tagline { font-size: .875rem; font-weight: 400; color: var(--gray-500); }

/* ---------- buttons ---------- */
.btn {
    display: inline-block; border: 1px solid transparent; border-radius: .5rem;
    padding: .625rem 1.5rem; font-size: .875rem; font-weight: 600;
    cursor: pointer; text-align: center; text-decoration: none; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-500); color: #fff; }
.btn-outline { background: transparent; border-color: var(--night-600); color: var(--gray-300); }
.btn-outline:hover { border-color: var(--brand-600); color: #fff; }
.btn-danger-outline { background: transparent; border-color: rgba(225, 29, 72, .5); color: var(--brand-400); }
.btn-danger-outline:hover { background: rgba(225, 29, 72, .1); color: var(--brand-400); }
.btn-sm { padding: .5rem 1rem; }

.link-btn { background: none; border: 0; padding: 0; color: var(--gray-500); font-size: .875rem; cursor: pointer; font-family: inherit; }
.link-btn:hover { color: var(--brand-400); }

/* ---------- cards, badges, alerts ---------- */
.card {
    background: var(--night-900);
    border: 1px solid var(--night-700);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.card-hover:hover { border-color: rgba(225, 29, 72, .6); text-decoration: none; }

.badge {
    display: inline-block; border-radius: 9999px; padding: .25rem .75rem;
    font-size: .75rem; font-weight: 600; border: 1px solid transparent;
}
.badge-green { border-color: rgba(16, 185, 129, .4); background: rgba(16, 185, 129, .1); color: var(--green-300); }
.badge-red { border-color: rgba(244, 63, 94, .5); background: rgba(225, 29, 72, .1); color: var(--brand-300); }
.badge-gray { border-color: var(--night-600); color: var(--gray-400); }

.alert { border-radius: .5rem; padding: .75rem 1rem; font-size: .875rem; margin-bottom: 1.5rem; border: 1px solid transparent; }
.alert-success { border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .1); color: var(--green-300); }
.alert-error { border-color: rgba(244, 63, 94, .4); background: rgba(225, 29, 72, .1); color: var(--brand-300); }
.alert-info { border-color: var(--night-600); background: var(--night-850); color: var(--gray-400); }
.alert ul { margin: 0; }

/* ---------- forms ---------- */
.label { display: block; margin-bottom: .25rem; font-size: .875rem; font-weight: 500; color: var(--gray-300); }
.label-sm { display: block; margin-bottom: .25rem; font-size: .75rem; font-weight: 500; color: var(--gray-400); }
.input, .select, textarea.input {
    width: 100%; border-radius: .5rem; border: 1px solid var(--night-600);
    background: var(--night-850); color: #fff; padding: .625rem .75rem;
    font-size: 1rem; font-family: inherit;
}
.input::placeholder { color: var(--gray-600); }
.input:focus, .select:focus { outline: none; border-color: var(--brand-500); }
.input-sm { padding: .5rem .75rem; font-size: .875rem; width: auto; }
.select { appearance: auto; }
.checkbox { height: 1rem; width: 1rem; accent-color: var(--brand-600); }
.input-color { height: 2.75rem; padding: .25rem .5rem; cursor: pointer; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--night-600); border-radius: .5rem; background: var(--night-850); }
.input-prefix:focus-within { border-color: var(--brand-500); }
.input-prefix .prefix { border-right: 1px solid var(--night-600); padding: .625rem .75rem; font-size: .875rem; color: var(--gray-500); }
.input-prefix input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; padding: .625rem .75rem; font-size: 1rem; font-family: inherit; }
.input-prefix input:focus { outline: none; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--night-700); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
.table thead { background: var(--night-900); }
.table th { padding: .75rem 1rem; font-size: .75rem; text-transform: uppercase; color: var(--gray-500); font-weight: 600; }
.table td { padding: .75rem 1rem; border-top: 1px solid var(--night-800); color: var(--gray-300); }
.table tbody tr:first-child td { border-top: 0; }
.table .num { text-align: right; }

/* Tables become stacked cards on small screens: each row is a block,
   each cell a labeled line (label comes from the cell's data-label). */
@media (max-width: 640px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: .75rem 1rem; border-top: 1px solid var(--night-800); }
    .table tbody tr:first-child { border-top: 0; }
    .table td {
        display: flex; justify-content: space-between; align-items: center;
        flex-wrap: wrap; row-gap: .15rem;
        gap: 1rem; border: 0; padding: .25rem 0; text-align: right;
        min-width: 0; overflow-wrap: anywhere;
    }
    .table td::before {
        content: attr(data-label);
        font-size: .75rem; font-weight: 600; text-transform: uppercase;
        color: var(--gray-500); text-align: left; flex-shrink: 0;
    }
    .table td[colspan] { display: block; text-align: center; }
    .table td[colspan]::before { content: none; }
}

/* ---------- pagination ---------- */
.pagination { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.pagination a, .pagination span {
    display: inline-block; padding: .375rem .75rem; border-radius: .5rem;
    border: 1px solid var(--night-600); font-size: .875rem; color: var(--gray-300);
}
.pagination a:hover { border-color: var(--brand-600); text-decoration: none; }
.pagination .current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.pagination .disabled { color: var(--gray-600); border-color: var(--night-800); }


/* ---------- dashboard shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    display: none; width: 15rem; flex-shrink: 0; flex-direction: column;
    border-right: 1px solid var(--night-800); background: var(--night-900);
}
.sidebar-head { border-bottom: 1px solid var(--night-800); padding: 1rem 1.25rem; }
.sidebar-nav { flex: 1; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .25rem; }
.sidebar-nav a {
    display: block; border-radius: .5rem; padding: .5rem .75rem;
    font-size: .875rem; font-weight: 500; color: var(--gray-400); text-decoration: none;
}
.sidebar-nav a:hover { background: var(--night-850); color: #fff; }
.sidebar-nav a.active { background: rgba(225, 29, 72, .15); color: var(--brand-400); }
.sidebar-foot { border-top: 1px solid var(--night-800); padding: 1rem 1.25rem; font-size: .875rem; }
.content { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border-bottom: 1px solid var(--night-800); background: var(--night-900);
    padding: .75rem 1rem;
}
.topbar h1 { font-size: 1.125rem; font-weight: 600; }
.mobile-nav {
    display: flex; gap: .25rem; overflow-x: auto;
    border-bottom: 1px solid var(--night-800); background: var(--night-900);
    padding: .5rem .75rem;
}
.mobile-nav a, .mobile-nav button {
    white-space: nowrap; border-radius: .5rem; padding: .375rem .75rem;
    font-size: .875rem; font-weight: 500; color: var(--gray-400);
    background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none;
}
.mobile-nav a.active { background: rgba(225, 29, 72, .15); color: var(--brand-400); }
.main { flex: 1; padding: 2rem 1rem; }
.main-inner { max-width: 56rem; margin: 0 auto; }
@media (min-width: 768px) {
    .sidebar { display: flex; }
    .mobile-nav { display: none; }
    .topbar, .main { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ---------- booking page ---------- */
.booking-layout { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .booking-layout { grid-template-columns: 300px 1fr; } }
.dot { display: inline-block; height: .625rem; width: .625rem; border-radius: 9999px; }
.event-meta { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--gray-300); }
.event-meta svg { height: 1rem; width: 1rem; color: var(--gray-500); flex-shrink: 0; }

.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-nav { display: flex; gap: .25rem; }
.calendar-nav a {
    border: 1px solid var(--night-600); border-radius: .5rem; padding: .375rem .75rem;
    font-size: .875rem; color: var(--gray-300); text-decoration: none;
}
.calendar-nav a:hover { border-color: var(--brand-600); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.cal-dow { padding: .25rem 0; text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--gray-500); }
.cal-day { padding: .5rem 0; text-align: center; font-size: .875rem; color: var(--gray-600); }
.cal-day.open {
    display: block; border-radius: .5rem; background: var(--night-850);
    color: #fff; font-weight: 500; text-decoration: none; transition: background .1s;
}
.cal-day.open:hover { background: rgba(225, 29, 72, .3); text-decoration: none; }
.cal-day.selected { background: var(--brand-600); color: #fff; }

.slots-wrap { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .slots-wrap.with-slots { grid-template-columns: 1fr 1fr; } }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-height: 20rem; overflow-y: auto; padding-right: .25rem; }
.slot {
    border: 1px solid var(--night-600); border-radius: .5rem; padding: .5rem .75rem;
    text-align: center; font-size: .875rem; font-weight: 500; color: var(--gray-200);
    text-decoration: none; transition: border-color .1s;
}
.slot:hover { border-color: var(--brand-500); color: #fff; text-decoration: none; }

/* ---------- landing ---------- */
.hero { max-width: 56rem; margin: 0 auto; padding: 5rem 1rem; text-align: center; }
.hero-badge {
    display: inline-block; border-radius: 9999px; border: 1px solid rgba(225, 29, 72, .4);
    background: rgba(225, 29, 72, .1); padding: .375rem 1rem;
    font-size: .75rem; font-weight: 600; color: var(--brand-400);
}
.hero h1 { margin-top: 1.5rem; font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--brand-500); }
.hero .sub { max-width: 42rem; margin: 1.5rem auto 0; font-size: 1.125rem; color: var(--gray-400); }
.hero .cta { margin-top: 2.5rem; display: flex; justify-content: center; gap: 1rem; }
.hero .note { margin-top: 1rem; font-size: .75rem; color: var(--gray-500); }
@media (min-width: 640px) { .hero h1 { font-size: 3.75rem; } }

.features { display: grid; gap: 1.5rem; max-width: 72rem; margin: 0 auto; padding: 0 1rem 6rem; }
@media (min-width: 768px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature-icon {
    display: flex; height: 2.5rem; width: 2.5rem; align-items: center; justify-content: center;
    border-radius: .5rem; background: rgba(225, 29, 72, .15); color: var(--brand-400);
}
.feature-icon svg { height: 1.25rem; width: 1.25rem; }
.feature h3 { margin-top: 1rem; font-size: 1.125rem; font-weight: 600; }
.feature p { margin-top: .5rem; font-size: .875rem; color: var(--gray-400); }

.site-footer { border-top: 1px solid var(--night-800); }
.site-footer .inner {
    max-width: 72rem; margin: 0 auto; padding: 2rem 1rem;
    display: flex; flex-direction: column; align-items: center; gap: .75rem;
    font-size: .875rem; color: var(--gray-500);
}
@media (min-width: 640px) { .site-footer .inner { flex-direction: row; justify-content: space-between; } }
.site-footer a { color: var(--gray-400); }
.site-footer a:hover { color: #fff; }

/* ---------- app footer ---------- */
body > main { flex: 1 0 auto; }
.app-footer { border-top: 1px solid var(--night-800); }
.app-footer .inner {
    max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem;
    text-align: center; font-size: .8125rem; color: var(--gray-500);
}

/* ---------- apps dashboard button ---------- */
.tm-apps-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: 10px;
    border: 1px solid var(--brand-600);
    background: none; color: var(--brand-400);
    font-size: 14px; font-weight: 600; white-space: nowrap;
    text-decoration: none; cursor: pointer;
}
.tm-apps-btn:hover { background: rgba(225, 29, 72, .14); color: var(--brand-400); text-decoration: none; }
.tm-apps-btn svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }

/* ---------- copy button ---------- */
.copy-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: 1px solid var(--night-600); border-radius: .375rem;
    padding: .15rem .5rem; margin-left: .5rem; cursor: pointer;
    color: var(--gray-400); font-size: .75rem; font-weight: 500;
    font-family: inherit; vertical-align: middle; line-height: 1.4;
}
.copy-btn:hover { border-color: var(--brand-600); color: var(--brand-400); }
.copy-btn svg { height: .8rem; width: .8rem; }
.copy-btn.copied { border-color: var(--green-500); color: var(--green-300); }

/* ---------- misc ---------- */
.stat-grid { display: grid; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--night-900); border: 1px solid var(--night-700); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat .num { font-size: 1.5rem; font-weight: 700; color: #fff; }

.override-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.day-check { display: flex; width: 9rem; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500; color: var(--gray-300); }
.divider-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.divider-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .75rem 0; border-top: 1px solid var(--night-800); font-size: .875rem;
}
.divider-list li:first-child { border-top: 0; }
