html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F0;
    color: #1F2A24;
}

#blazor-error-ui {
    background: #C62828;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
#blazor-error-ui a { color: #fff; text-decoration: underline; margin-left: 0.75rem; }

.ts-boot {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #F5F5F0 0%, #E8F0E8 100%);
    gap: 0.75rem;
}
.ts-boot-mark svg {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 6px 12px rgba(46, 125, 50, 0.25));
    animation: ts-pulse 1.6s ease-in-out infinite;
}
.ts-boot-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1B5E20;
}
@keyframes ts-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

/* Brand mark used inside the running app */
.ts-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}
.ts-brand svg { width: 28px; height: 28px; }

/* Subtle card lift */
.ts-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.ts-card:hover {
    transform: translateY(-2px);
}

/* Stat tile gradients */
.ts-stat-customers { background: linear-gradient(135deg, #2E7D32, #66BB6A); color: #fff; }
.ts-stat-services  { background: linear-gradient(135deg, #5D4037, #A1887F); color: #fff; }
.ts-stat-quotes    { background: linear-gradient(135deg, #F9A825, #FBC02D); color: #1F2A24; }
.ts-stat-accepted  { background: linear-gradient(135deg, #0277BD, #4FC3F7); color: #fff; }
.ts-stat-employees { background: linear-gradient(135deg, #455A64, #78909C); color: #fff; }
.ts-stat-crews     { background: linear-gradient(135deg, #6A1B9A, #AB47BC); color: #fff; }

.ts-stat-tile {
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.ts-stat-tile .label { font-size: 0.85rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; }
.ts-stat-tile .value { font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: 0.25rem; }

/* Calendar grid */
.ts-cal {
    overflow-x: auto;
    border: 1px solid #E0E5DE;
    border-radius: 12px;
    background: #FFFFFF;
}
.ts-cal-grid {
    display: grid;
    min-width: 100%;
}
.ts-cal-corner {
    background: #FAFAF7;
    border-right: 1px solid #E0E5DE;
    border-bottom: 1px solid #E0E5DE;
}
.ts-cal-col-header {
    padding: 0.6rem 0.75rem;
    background: #FAFAF7;
    border-right: 1px solid #E0E5DE;
    border-bottom: 1px solid #E0E5DE;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1F2A24;
}
.ts-cal-col-header:last-child { border-right: none; }
.ts-cal-swatch {
    width: 12px; height: 12px; border-radius: 3px; flex: 0 0 12px;
}
.ts-cal-day-header {
    padding: 0.6rem 0.75rem;
    background: #FAFAF7;
    border-right: 1px solid #E0E5DE;
    border-bottom: 1px solid #E0E5DE;
    text-align: center;
}
.ts-cal-day-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4E5C56;
}
.ts-cal-day-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1F2A24;
    line-height: 1;
}
.ts-cal-day-month {
    font-size: 0.7rem;
    color: #4E5C56;
    text-transform: uppercase;
}
.ts-cal-cell {
    min-height: 96px;
    padding: 0.4rem;
    border-right: 1px solid #E0E5DE;
    border-bottom: 1px solid #E0E5DE;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: background-color 120ms ease;
}
.ts-cal-cell:last-child { border-right: none; }
.ts-cal-cell.ts-cal-drop {
    background: rgba(46, 125, 50, 0.08);
    outline: 2px dashed #66BB6A;
    outline-offset: -4px;
}
.ts-cal-card {
    background: #FFFFFF;
    border: 1px solid #E0E5DE;
    border-left: 4px solid #BDBDBD;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: transform 120ms ease, box-shadow 120ms ease;
    user-select: none;
}
.ts-cal-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.ts-cal-card:active { cursor: grabbing; }
.ts-cal-card-time { font-weight: 700; font-size: 0.85rem; color: #1B5E20; }
.ts-cal-card-customer { font-size: 0.85rem; font-weight: 600; line-height: 1.2; margin-top: 1px; }
.ts-cal-card-job { font-size: 0.75rem; color: #4E5C56; line-height: 1.2; }
.ts-cal-card-status {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ts-status-scheduled  { background: #E3F2FD; color: #0277BD; }
.ts-status-enroute    { background: #FFF3E0; color: #F57C00; }
.ts-status-inprogress { background: #FFF3E0; color: #F57C00; }
.ts-status-completed  { background: #E8F5E9; color: #2E7D32; }
.ts-status-skipped    { background: #ECEFF1; color: #455A64; }
.ts-status-rescheduled { background: #FFF8E1; color: #F9A825; }

/* Login splash */
.ts-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: linear-gradient(140deg, #1B5E20 0%, #2E7D32 60%, #66BB6A 100%);
}
@media (min-width: 900px) {
    .ts-login-shell { grid-template-columns: 1.1fr 1fr; }
}
.ts-login-hero {
    display: none;
    color: #fff;
    padding: 3rem;
    flex-direction: column;
    justify-content: space-between;
}
@media (min-width: 900px) {
    .ts-login-hero { display: flex; }
}
.ts-login-hero h1 { font-size: 2.5rem; line-height: 1.1; margin: 0 0 0.75rem 0; }
.ts-login-hero p { font-size: 1.05rem; opacity: 0.9; max-width: 28rem; }
.ts-login-card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #FAFAF7;
}
.ts-login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
}
