/* ServiceLog — Warm theme design tokens & shared components */

:root {
    --wt-bg: #fdf6ec;
    --wt-card: #fff;
    --wt-card-soft: #fffaf3;
    --wt-ink: #2b241c;
    --wt-ink-soft: #5c4630;
    --wt-muted: #8a7a63;
    --wt-muted-2: #a8967f;
    --wt-placeholder: #c2b7a4;
    --wt-border: #f0e4d3;
    --wt-border-strong: #e0cbb0;
    --wt-accent: #bb4d2e;
    --wt-accent-2: #d98c3f;
    --wt-gradient: linear-gradient(135deg, var(--wt-accent), var(--wt-accent-2));
    --wt-success: #3f8a5c;
    --wt-success-bg: #e8f4ec;
    --wt-danger-bg: #fbe9e7;
    --wt-danger: #b3402c;
    --wt-tint-terracotta: #f7e2d8;
    --wt-tint-terracotta-ink: #9c3f24;
    --wt-tint-olive: #e8ead9;
    --wt-tint-olive-ink: #5c6b31;
    --wt-tint-mustard: #f4e6c8;
    --wt-tint-mustard-ink: #8a651a;
    --wt-tint-brown: #eee3d6;
    --wt-tint-brown-ink: #6b5842;
}

body.wt {
    background: var(--wt-bg);
    font-family: 'Karla', ui-sans-serif, system-ui, sans-serif;
    color: var(--wt-ink);
}

.wt-heading {
    font-family: 'Bitter', Georgia, serif;
    font-weight: 700;
    color: var(--wt-ink);
}

/* ===== Header bands ===== */
.wt-band {
    background: var(--wt-gradient);
    padding: 22px 20px;
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: -1rem -0.75rem 0;
}

.wt-band a.wt-back,
.wt-band .wt-back {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex: none;
}

.wt-band-title {
    font-family: 'Bitter', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    flex: 1;
}

.wt-hero-band {
    background: var(--wt-gradient);
    padding: 22px 20px 40px;
    border-radius: 0 0 28px 28px;
    margin: -1rem -0.75rem 0;
}

.wt-hero-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.wt-hero-logo {
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-sizing: border-box;
    flex: none;
}

.wt-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wt-hero-brand {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.wt-hero-greeting {
    font-size: 14.5px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2px;
}

.wt-hero-name {
    font-family: 'Bitter', Georgia, serif;
    font-size: 21px;
    font-weight: 700;
    color: #fff;
}

.wt-content-card {
    background: var(--wt-card-soft);
    margin: -20px -0.75rem 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 14px rgba(43,36,28,0.06);
    padding: 24px 20px 90px;
    position: relative;
}

.wt-content-flat {
    background: var(--wt-bg);
    margin: -12px -0.75rem 0;
    border-radius: 20px 20px 0 0;
    padding: 20px;
}

/* ===== Cards & lists ===== */
.wt-card {
    background: var(--wt-card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(43,36,28,0.05);
}

.wt-list {
    background: var(--wt-card);
    border-radius: 16px;
    overflow: hidden;
}

.wt-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f5ede2;
}

.wt-list-row:last-child {
    border-bottom: none;
}

.wt-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex: none;
}

/* ===== Buttons ===== */
.wt-btn {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    width: 100%;
    cursor: pointer;
}

.wt-btn-primary {
    background: var(--wt-gradient);
    color: #fff;
    box-shadow: 0 8px 18px rgba(187,77,46,0.3);
}

.wt-btn-outline {
    background: transparent;
    color: var(--wt-ink-soft);
    border: 2px solid var(--wt-border-strong);
}

.wt-btn-danger-outline {
    background: transparent;
    color: var(--wt-accent);
    border: 1.5px solid var(--wt-accent);
}

/* ===== Forms ===== */
.wt-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--wt-ink-soft);
    margin-bottom: 5px;
    display: block;
}

.wt-input,
.wt-select {
    width: 100%;
    background: #fff;
    border: 1px solid var(--wt-border);
    border-radius: 11px;
    padding: 12px 14px;
    /* Must stay >= 16px: iOS/Android auto-zoom the page on focus for any input font-size below 16px. */
    font-size: 16px;
    color: var(--wt-ink);
    font-family: 'Karla', ui-sans-serif, system-ui, sans-serif;
}

.wt-input::placeholder {
    color: var(--wt-placeholder);
}

.wt-input:focus,
.wt-select:focus {
    outline: none;
    border-color: var(--wt-accent);
}

/* ===== Chips / pills ===== */
.wt-chip {
    display: inline-block;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--wt-border-strong);
    color: var(--wt-ink-soft);
    cursor: pointer;
}

.wt-chip.active {
    background: var(--wt-gradient);
    color: #fff;
    border-color: transparent;
}

.wt-badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.wt-badge-terracotta { background: var(--wt-tint-terracotta); color: var(--wt-tint-terracotta-ink); }
.wt-badge-olive { background: var(--wt-tint-olive); color: var(--wt-tint-olive-ink); }
.wt-badge-mustard { background: var(--wt-tint-mustard); color: var(--wt-tint-mustard-ink); }
.wt-badge-brown { background: var(--wt-tint-brown); color: var(--wt-tint-brown-ink); }
.wt-badge-success { background: var(--wt-success-bg); color: var(--wt-success); }
.wt-badge-danger { background: var(--wt-danger-bg); color: var(--wt-danger); }

/* ===== Quick action pills (Dashboard) ===== */
.wt-actions-row {
    display: flex;
    gap: 10px;
}

.wt-action-pill {
    flex: 1;
    border-radius: 16px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    text-align: center;
}

.wt-action-pill svg { flex: none; }

.wt-action-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--wt-ink-soft);
}

/* ===== Report / grid tiles ===== */
.wt-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.wt-tile {
    background: #fff;
    border-radius: 18px;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(43,36,28,0.06);
}

.wt-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.wt-tile-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--wt-ink);
}

.wt-tile-sub {
    font-size: 13px;
    color: var(--wt-muted-2);
    margin-top: 2px;
}

/* ===== Stat boxes ===== */
.wt-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wt-stat-box {
    background: #fff;
    border-radius: 16px;
    padding: 18px 10px;
    text-align: center;
}

.wt-stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--wt-ink);
}

.wt-stat-label {
    font-size: 13px;
    color: var(--wt-muted-2);
    margin-top: 3px;
}

/* ===== Bottom tab bar ===== */
.wt-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    height: 66px;
    background: var(--wt-card-soft);
    border-top: 1px solid var(--wt-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.wt-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--wt-placeholder);
    font-size: 12px;
}

.wt-tab.active {
    color: var(--wt-accent);
    font-weight: 700;
}

.wt-tab svg { flex: none; }

/* ===== Alerts (override Bootstrap look) ===== */
.wt-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14.5px;
    margin-bottom: 14px;
}

.wt-alert-success { background: var(--wt-success-bg); color: var(--wt-success); }
.wt-alert-danger { background: var(--wt-danger-bg); color: var(--wt-danger); }
