/* ============================================================
   Avison Studios Dashboard — Corporate Design
   Farben aus dem CD-Handbuch:
   Burnt Orange #BE5E21 · Moss Green #8F8F45 · Powder Blue #ADBDD6
   Almond #E9DAC5 · Blue Charcoal #232425
   Schrift: Clash Grotesk (AVISON) + Typewriter-Akzente (studios)
   ============================================================ */
:root {
    --orange: #BE5E21;
    --orange-soft: #d4824d;
    --moss: #8F8F45;
    --powder: #ADBDD6;
    --almond: #E9DAC5;
    --almond-light: #F4EADA;
    --paper: #fffdf8;
    --charcoal: #232425;
    --charcoal-soft: #313234;
    --ink: #232425;
    --muted: #7d7263;
    --radius: 18px;
    --radius-sm: 14px;
    --border: 2.5px solid var(--charcoal);
    --border-sm: 2px solid var(--charcoal);
    --shadow: 5px 6px 0 rgba(35, 36, 37, 0.9);
    --shadow-sm: 3px 4px 0 rgba(35, 36, 37, 0.85);
    --font-display: 'Clash Grotesk', 'Segoe UI', sans-serif;
    --font-type: 'Special Elite', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--almond);
    background-image: radial-gradient(rgba(35,36,37,0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.45;
}

/* ============ Topbar ============ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 34px 10px;
    max-width: 1320px;
    margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 64px; height: 50px; }
.logo-trapez {
    fill: var(--orange);
    stroke: var(--almond-light);
    stroke-width: 13;
    stroke-linejoin: round;
    paint-order: stroke;
}
.logo-almond { fill: var(--almond-light); }
.logo-orange { fill: var(--orange); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-avison { font-weight: 700; font-size: 26px; letter-spacing: 1.5px; color: var(--orange); }
.brand-studios {
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 5px;
    color: var(--charcoal);
    margin-top: 3px;
}
.topbar-actions { display: flex; gap: 10px; }

/* ============ Seite & Hero ============ */
.page { max-width: 1320px; margin: 0 auto; padding: 8px 34px 56px; }

.kicker {
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0 0 4px;
    display: block;
}

.day-hero { padding: 30px 4px 26px; }
.day-hero .kicker { font-size: 14px; margin-bottom: 8px; color: var(--charcoal); }
.day-title {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin: 0;
}
.day-title em { font-style: normal; color: var(--orange); }
.day-sub {
    font-family: var(--font-type);
    font-size: 16px;
    letter-spacing: 2px;
    color: var(--muted);
    margin: 12px 0 0;
}

/* ============ Bento-Raster ============ */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 22px;
}
.span-4  { grid-column: span 4; }
.span-8  { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (max-width: 1020px) {
    .span-4, .span-8 { grid-column: span 12; }
    .page, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ============ Karten (einheitlich) ============ */
.card {
    background: var(--almond-light);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 26px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.card-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.card h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.05;
}
.card h3, .panel-box h3 {
    margin: 0 0 10px;
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ============ Buttons & Inputs ============ */
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    background: var(--orange);
    color: var(--almond-light);
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 9px 18px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s, box-shadow 0.08s;
    white-space: nowrap;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 3px 0 rgba(35,36,37,0.85); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 rgba(35,36,37,0.85); }
.btn.ghost { background: var(--almond-light); color: var(--charcoal); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.round { border-radius: 50%; width: 44px; height: 44px; padding: 0; font-size: 22px; line-height: 1; flex-shrink: 0; }
.btn.danger { background: var(--almond-light); color: var(--orange); }

.icon-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 17px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 8px;
    line-height: 1;
}
.icon-btn:hover { color: var(--orange); background: rgba(190, 94, 33, 0.12); }

input[type=text], input[type=url], input[type=password], select {
    font-family: var(--font-display);
    background: var(--paper);
    border: var(--border);
    color: var(--ink);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 15px;
    width: 100%;
}
input:focus, select:focus { outline: 3px solid var(--powder); outline-offset: 1px; }
::placeholder { color: #a99c89; }

.add-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.add-row input { flex: 1; }
.add-row select { width: auto; }
.add-row.small input { padding: 7px 10px; font-size: 13px; border-width: 2px; }
.add-row.small .btn { padding: 6px 12px; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ============ Kalender ============ */
.calendar-embed { flex: 1; }
.calendar-embed iframe {
    width: 100%;
    height: 560px;
    border-radius: var(--radius-sm);
    border: var(--border-sm);
    background: #fff;
}
.calendar-empty {
    height: 560px;
    display: grid;
    place-content: center;
    text-align: center;
    border: 2px dashed rgba(35,36,37,0.35);
    border-radius: var(--radius-sm);
}

/* ============ Termine ============ */
.events-list { display: flex; flex-direction: column; gap: 14px; }
.event-row {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--paper);
    border: var(--border-sm);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 13px 14px;
}
.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    background: var(--charcoal);
    color: var(--almond);
    border-radius: 10px;
    padding: 9px 6px;
}
.event-date span { font-weight: 600; font-size: 15px; }
.event-date small { font-family: var(--font-type); font-size: 11px; color: var(--powder); margin-top: 2px; }
.event-title { font-weight: 600; font-size: 16px; }
.badge {
    font-family: var(--font-type);
    font-size: 10px;
    padding: 3px 9px 2px;
    border: 1.5px solid var(--charcoal);
    border-radius: 20px;
    margin-right: 8px;
    letter-spacing: 1.5px;
    vertical-align: 2px;
    display: inline-block;
    transform: rotate(-2deg);
}
.badge-dreh { background: var(--orange); color: var(--almond-light); }
.badge-meeting { background: var(--powder); color: var(--charcoal); }
.badge-deadline { background: var(--charcoal); color: var(--almond); }

/* ============ To-dos ============ */
.card-todos { background: var(--paper); }
.progress-label {
    font-family: var(--font-type);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--moss);
}
.progress-track {
    height: 12px;
    border: var(--border-sm);
    border-radius: 8px;
    background: var(--almond-light);
    margin-bottom: 16px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(-45deg, var(--moss), var(--moss) 8px, #a3a356 8px, #a3a356 16px);
    transition: width 0.35s ease;
}

.todo-list { list-style: none; margin: 0; padding: 0; }
.card-todos .todo-list { column-width: 380px; column-gap: 40px; }
.todo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    border-bottom: 2px dashed rgba(35, 36, 37, 0.25);
    font-size: 17px;
    break-inside: avoid;
}
.todo label { display: flex; align-items: center; gap: 13px; cursor: pointer; flex: 1; }
.todo input[type=checkbox] {
    appearance: none;
    width: 24px; height: 24px;
    border: var(--border-sm);
    border-radius: 50%;
    background: var(--paper);
    cursor: pointer;
    flex-shrink: 0;
    display: grid;
    place-content: center;
    transition: background 0.15s;
}
.todo input[type=checkbox]:checked { background: var(--moss); }
.todo input[type=checkbox]:checked::after {
    content: '✓';
    color: var(--almond-light);
    font-weight: 700;
    font-size: 15px;
}
.todo.done span { text-decoration: line-through wavy rgba(190,94,33,0.7) 2px; color: var(--muted); }
.todo-list.small .todo { font-size: 15px; padding: 7px 2px; }
.todo-list.small .todo input[type=checkbox] { width: 20px; height: 20px; }

/* ============ Kunden ============ */
.client-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.client-tab {
    font-family: var(--font-display);
    font-weight: 600;
    background: var(--paper);
    border: var(--border);
    color: var(--charcoal);
    border-radius: 24px;
    padding: 8px 22px;
    cursor: pointer;
    font-size: 15px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.08s, box-shadow 0.08s;
}
.client-tab:active { transform: translate(2px, 3px); box-shadow: none; }
.client-tab.active {
    background: var(--client-color, var(--orange));
    color: var(--almond-light);
}

/* Bento im Kundenbereich: Stats oben, darunter 3 gleiche Boxen */
.panel-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 1020px) { .panel-bento { grid-template-columns: 1fr; } }

.panel-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}
.panel-box {
    background: var(--paper);
    border: var(--border-sm);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 16px 18px;
    min-width: 0;
}
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.col-head h3 { margin: 0; }
.client-footer { grid-column: 1 / -1; text-align: right; margin-top: 4px; }

/* ---- Social-Stat-Karten (dunkel, im Kundenbereich) ---- */
.stat-card {
    background: var(--charcoal);
    border: var(--border-sm);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border-top: 6px solid var(--client-color, var(--orange));
    color: var(--almond);
    padding: 16px 18px;
}
.stat-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.stat-platform {
    font-family: var(--font-type);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--powder);
}
.stat-handle { color: var(--almond); text-decoration: none; font-weight: 600; }
.stat-handle:hover { color: var(--orange-soft); }
.stat-main { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; }
.followers { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 13px; color: #9a9da2; }
.delta { font-size: 14px; font-weight: 600; }
.delta.up { color: #a8c46a; }
.delta.down { color: var(--orange-soft); }
.sparkline { width: 100%; height: 38px; color: var(--powder); }
.post-views { margin-top: 8px; color: #9a9da2; }
.stat-date { margin-top: 6px; font-family: var(--font-type); font-size: 11px; letter-spacing: 1px; color: #707276; }
.stat-card .muted { color: #9a9da2; }

/* ============ Notizen ============ */
.notes { display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.note-card {
    background: var(--almond-light);
    border: var(--border-sm);
    border-radius: 12px;
    padding: 13px 15px;
}
.note-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.note-head strong { font-size: 15px; }
.note-items { list-style: none; margin: 0 0 10px; padding: 0; }
.note-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 2px dashed rgba(35,36,37,0.2);
    font-size: 14px;
}
.note-items li:last-child { border-bottom: none; }
.note-items a { color: var(--orange); font-weight: 600; text-decoration: none; word-break: break-all; }
.note-items a:hover { text-decoration: underline wavy 1.5px; }

/* ============ Zähler ============ */
.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 2px dashed rgba(35,36,37,0.25);
}
.counter-row:last-child { border-bottom: none; }
.counter-name { flex: 1; font-weight: 500; font-size: 15px; }
.counter-controls { display: flex; align-items: center; gap: 8px; }
.counter-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: var(--border-sm);
    background: var(--almond-light);
    color: var(--charcoal);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    box-shadow: 2px 3px 0 rgba(35,36,37,0.85);
    transition: transform 0.08s, box-shadow 0.08s;
}
.counter-btn:hover { background: var(--orange); color: var(--almond-light); }
.counter-btn:active { transform: translate(2px, 3px); box-shadow: none; }
.counter-value {
    min-width: 50px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    color: var(--moss);
    font-variant-numeric: tabular-nums;
}
.counter-value.low { color: var(--orange); }

/* ============ Footer ============ */
.footer {
    background: var(--charcoal);
    color: #6f7175;
    text-align: center;
    padding: 22px 0;
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 2px;
}
.footer em { font-style: normal; color: var(--orange-soft); }

/* ============ Einstellungen (Dialog) ============ */
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 2px dashed rgba(35,36,37,0.2);
}
dialog {
    font-family: var(--font-display);
    background: var(--almond-light);
    color: var(--ink);
    border: 3px solid var(--charcoal);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    width: min(580px, 92vw);
}
dialog::backdrop { background: rgba(35, 36, 37, 0.55); }
dialog h2 { margin-top: 0; text-transform: uppercase; }
dialog h3 {
    margin: 20px 0 8px;
    font-family: var(--font-type);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}
dialog label { display: block; margin: 14px 0 4px; font-size: 14px; font-weight: 500; }
dialog label input { margin-top: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============ Login ============ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--almond);
    background-image: radial-gradient(rgba(35,36,37,0.05) 1px, transparent 1px);
    background-size: 26px 26px;
}
.login-box {
    background: var(--almond-light);
    border: 3px solid var(--charcoal);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 38px;
    width: min(380px, 92vw);
    text-align: center;
}
.login-box .logo { width: 86px; height: 64px; margin-bottom: 6px; }
.login-box h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}
.login-sub {
    font-family: var(--font-type);
    letter-spacing: 4px;
    color: var(--orange);
    font-size: 13px;
    margin: 2px 0 26px;
}
.login-box input { margin-bottom: 16px; text-align: center; }
.login-box button { width: 100%; padding: 12px; font-size: 16px; }
.login-error { color: var(--orange); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
