/* ---------------------------------------------------------
   domain.css — Ferienwohnungs-spezifisch
--------------------------------------------------------- */

/* Status-Pills (für Apartments, Bookings, Guests) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
}
.pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.st-available, .st-confirmed { background: #ECFDF5; color: #047857; }
.st-available::before, .st-confirmed::before { background: #10B981; }

.st-occupied, .st-completed { background: #EFF6FF; color: #1D4ED8; }
.st-occupied::before, .st-completed::before { background: #3B82F6; }

.st-maintenance, .st-pending { background: #FFF7ED; color: #B45309; }
.st-maintenance::before, .st-pending::before { background: #F59E0B; }

.st-cancelled { background: #FEF2F2; color: #B91C1C; }
.st-cancelled::before { background: #EF4444; }

.st-vip      { background: #FEF3C7; color: #92400E; }
.st-vip::before { background: var(--brand); }
.st-regular  { background: #F1F5F9; color: #475569; }
.st-regular::before { background: #94A3B8; }
.st-new      { background: #ECFDF5; color: #047857; }
.st-new::before { background: #10B981; }

/* Location-Zelle */
.loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
}
.loc svg { color: var(--text-mute); }

/* Rating */
.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    font-weight: 500;
}
.rating svg { color: var(--brand); fill: var(--brand); }

/* Avatar (Initialen) */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 700;
    flex-shrink: 0;
}

.muted-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
}
.muted-cell svg { color: var(--text-mute); }

/* ----------- Dashboard-Grid ----------- */
.dash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 14px;
}
.dash-grid .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.dash-grid .span-2 { grid-column: span 2; }

/* Recent-List Meta (rechte Seite der Zeile) */
.rl-meta {
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 500;
    flex-shrink: 0;
}

/* Top-Apartments-Liste */
.top-list { list-style: none; padding: 0; margin: 4px 0 0; }
.top-list li { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.top-list li:last-child { border-bottom: none; }
.top-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.top-row strong { font-size: 13px; font-weight: 600; }
.top-row .rev { color: var(--brand-deep); font-weight: 600; font-size: 12.5px; }
.top-bar {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.top-bar > div {
    height: 100%;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-deep) 100%);
    border-radius: 3px;
}
.muted { color: var(--text-mute); font-size: 11px; }

/* Apartment-Bild (Detail) */
.machine-info.span-machine .apartment-img {
    background:
        linear-gradient(135deg, rgba(228,158,0,.15) 0%, rgba(0,0,0,.4) 100%),
        url('https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?auto=format&fit=crop&w=600&q=70') center/cover;
}
.machine-info.span-machine .apartment-img::before { content: none; }

/* Amenities */
.amenities {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.amenities .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text);
}
.amenities .chip svg { color: var(--brand); }

/* ===== Buttons ===== */
.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary-sm:hover { background: var(--brand-deep); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 7px 13px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 12.5px;
    cursor: pointer;
}
.btn-secondary:hover { border-color: var(--text-soft); }

/* Welcome-Text neben Page-Title */
.welcome {
    margin-left: auto;
    color: var(--text-soft);
    font-size: 13px;
}

/* ===== Quick-Stats ===== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.qs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.qs-item strong { font-size: 18px; font-weight: 700; display: block; line-height: 1.1; }
.qs-item small  { color: var(--text-soft); font-size: 11.5px; }
.qs-ico {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qs-ico.tone-brand  { background: var(--brand-soft); color: var(--brand-deep); }
.qs-ico.tone-ok     { background: #ECFDF5; color: var(--ok-deep); }
.qs-ico.tone-warn   { background: #FFF7ED; color: #B45309; }
.qs-ico.tone-danger { background: #FEF2F2; color: var(--danger-deep); }
.qs-ico.tone-info   { background: #EFF6FF; color: #1D4ED8; }

/* tone-Klassen auch für rl-ico und alert-ico */
.rl-ico.tone-warn   { background: #FFF7ED; color: #B45309; }
.rl-ico.tone-danger { background: #FEF2F2; color: var(--danger-deep); }
.rl-ico.tone-ok     { background: #ECFDF5; color: var(--ok-deep); }
.rl-ico.tone-info   { background: #EFF6FF; color: #1D4ED8; }
.rl-ico.rl-ico-in   { background: #ECFDF5; color: var(--ok-deep); }
.rl-ico.rl-ico-out  { background: #FFF7ED; color: #B45309; }
.rl-ico.rl-ico-star { background: var(--brand-soft); color: var(--brand-deep); }

.alerts-list .ico.tone-warn   { background: #FFF7ED; color: #B45309; }
.alerts-list .ico.tone-info   { background: #EFF6FF; color: #1D4ED8; }
.alerts-list .ico.tone-danger { background: #FEF2F2; color: var(--danger-deep); }

/* ===== Top Spenders ===== */
.top-spenders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 4px;
}
.ts-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-soft);
    border-radius: 10px;
}
.ts-rank {
    color: var(--brand);
    font-weight: 800;
    font-size: 14px;
}
.ts-text { flex: 1; min-width: 0; }
.ts-text strong { font-size: 13px; }
.ts-text small  { color: var(--text-mute); font-size: 11px; display: block; }
.ts-amt {
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 13px;
}

/* ===== Channel-Liste (Reports) ===== */
.channel-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 14px; }
.ch-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ch-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ch-name { font-weight: 500; font-size: 13px; flex: 1; }
.ch-pct  { font-weight: 600; color: var(--text); font-size: 13px; }
.ch-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ch-bar > div { height: 100%; border-radius: 3px; }

/* ===== Mini-Kalender ===== */
.cal { margin-top: 6px; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cal-head span {
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
}
.cal-grid:not(.cal-head) span {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-soft);
}
.cal-free    { color: var(--text); background: var(--surface); }
.cal-booked  { background: var(--brand-soft); color: var(--brand-deep); border-color: var(--brand-soft) !important; }
.cal-blocked { background: #FEF2F2; color: var(--danger-deep); border-color: #FEF2F2 !important; }

.legend { display: inline-flex; gap: 12px; color: var(--text-soft); font-size: 11.5px; align-items: center; }
.legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.legend .lg-book  { background: var(--brand-soft); border: 1px solid var(--brand); }
.legend .lg-block { background: #FEF2F2; border: 1px solid var(--danger); }
.legend .lg-free  { background: var(--surface); border: 1px solid var(--border-strong); }

/* ===== Wide-Grid (Detail-Seite, unter Overview) ===== */
.wide-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
    margin-top: 14px;
}
.wide-grid .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

/* ===== Reviews-Liste ===== */
.reviews { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 12px; }
.reviews li {
    padding: 12px;
    background: var(--bg-soft);
    border-radius: 10px;
}
.rev-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
}
.rev-head strong { font-size: 13px; }
.rev-stars { color: var(--brand); font-size: 13px; letter-spacing: 1px; }
.rev-stars .muted { color: var(--border-strong); }
.reviews p { font-size: 12.5px; color: var(--text); line-height: 1.5; }

/* ===== Mini-Table (Detail Recent Bookings) ===== */
.mini-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.mini-table th {
    text-align: left; padding: 8px 12px;
    font-size: 11px; font-weight: 600;
    color: var(--text-soft); letter-spacing: .3px;
    border-bottom: 1px solid var(--border);
}
.mini-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12.5px;
}
.mini-table tr:last-child td { border-bottom: none; }

/* ===== Work Hub (Employee Dashboard) ===== */
.wh-greeting {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.wh-greeting__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.wh-greeting__text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -.02em;
}
.wh-greeting__text p {
    font-size: 12.5px;
    color: var(--text-mute);
    margin-top: 2px;
}

.wh-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
    align-items: start;
}

/* Clock-in card */
.wh-clock {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wh-clock__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px 4px 6px;
    border-radius: 999px;
    width: fit-content;
}
.wh-clock__badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wh-clock__badge--open    { background: #ECFDF5; color: #047857; }
.wh-clock__badge--open::before { background: #10B981; }
.wh-clock__badge--break   { background: #FFF7ED; color: #B45309; }
.wh-clock__badge--break::before { background: var(--warn); }
.wh-clock__badge--done    { background: #EFF6FF; color: #1D4ED8; }
.wh-clock__badge--done::before { background: #3B82F6; }
.wh-clock__badge--none    { background: var(--bg); color: var(--text-mute); }
.wh-clock__badge--none::before { background: var(--border-strong); }

.wh-clock__label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.wh-clock__sub {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 2px;
}

/* Notices inside wh-top */
.wh-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wh-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #fff6e6;
    border: 1px solid #f0d080;
    border-radius: var(--radius);
    font-size: 12.5px;
    color: #8a5a00;
    line-height: 1.45;
}
.wh-notice i { margin-top: 1px; flex-shrink: 0; }

/* Quick-action tiles */
.wh-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.wh-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.wh-tile:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: var(--shadow-xs);
}
.wh-tile__icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 17px;
    color: var(--text-soft);
    transition: background .15s, color .15s;
}
.wh-tile:hover .wh-tile__icon {
    background: var(--brand-soft);
    color: var(--brand-deep);
}
.wh-tile__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: block;
    line-height: 1.2;
}
.wh-tile__sub {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 2px;
    display: block;
}

/* Recent time entries (compact) */
.wh-entries {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.wh-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
}
.wh-entry:last-child { border-bottom: none; }
.wh-entry__date {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    min-width: 76px;
}
.wh-entry__times {
    font-size: 11.5px;
    color: var(--text-mute);
    flex: 1;
}
.wh-entry__right {
    text-align: right;
    flex-shrink: 0;
}
.wh-entry__dur {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: block;
}
.wh-entry__status {
    font-size: 11px;
    color: var(--text-mute);
    display: block;
    margin-top: 1px;
}

/* Section title inside Work Hub */
.wh-section-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-mute);
    margin-bottom: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .dash-grid       { grid-template-columns: 1fr 1fr; }
    .dash-grid .span-2 { grid-column: span 2; }
    .quick-stats     { grid-template-columns: repeat(3, 1fr); }
    .top-spenders    { grid-template-columns: 1fr; }
    .wide-grid       { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .dash-grid       { grid-template-columns: 1fr; }
    .dash-grid .span-2 { grid-column: span 1; }
    .quick-stats     { grid-template-columns: repeat(2, 1fr); }
    .welcome         { display: none; }
    .qs-item strong  { font-size: 16px; }
    .wh-top          { grid-template-columns: 1fr; }
    .wh-tiles        { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .wh-tiles        { grid-template-columns: 1fr; }
}
