/* tip.denschmargin.com — DDL-Subset passend zu denschMargin */
:root {
    --bg:         #fafafa;
    --surface:    #ffffff;
    --border:     #e5e5e7;
    --text:       #1d1d1f;
    --text-muted: #6b6b70;
    --accent:     #d4aa5a;
    --accent-dk:  #b8904a;
    --ok:         #34c759;
    --warn:       #ff9500;
    --err:        #ff3b30;
    --radius:     10px;
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 2px 8px rgba(0,0,0,0.06);
}
[data-mode="dark"] {
    --bg:         #1c1c1e;
    --surface:    #2c2c2e;
    --border:     #3a3a3c;
    --text:       #f5f5f7;
    --text-muted: #98989d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dk); text-decoration: none; }
[data-mode="dark"] a { color: var(--accent); }
a:hover { text-decoration: underline; }

.wrap { max-width: 840px; margin: 0 auto; padding: 24px 18px 48px; }

.hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.hdr__logo { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.hdr__logo span { color: var(--accent); }
.hdr__sub { font-size: 12px; color: var(--text-muted); margin-left: 10px; font-weight: 400; }
.hdr__nav { display: flex; gap: 14px; font-size: 14px; }
.hdr__nav a { color: var(--text); padding: 6px 10px; border-radius: 6px; }
.hdr__nav a.active, .hdr__nav a:hover { background: var(--border); text-decoration: none; }

h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.02em; }
.sub { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
h2 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 18px;
}

/* KPI */
.kpi { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 0 0 20px; }
@media (min-width: 620px) { .kpi { grid-template-columns: repeat(4,1fr); } }
.kpi__card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px;
}
.kpi__lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi__val { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }

/* Denomination-Grid */
.denom-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px; margin-top: 8px;
}
.denom {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
}
.denom__lbl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.denom__inp-wrap { display: flex; align-items: center; gap: 8px; }
.denom__inp {
    flex: 1; padding: 6px 10px; font-size: 16px; font-weight: 600;
    border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text);
    text-align: right; min-width: 0;
}
.denom__inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,170,90,.2); }
.denom__sum { font-size: 12px; color: var(--text-muted); text-align: right; min-height: 14px; }

/* Buttons */
.btn {
    display: inline-block; padding: 10px 20px; font-size: 14px; font-weight: 600;
    border: none; border-radius: 8px; cursor: pointer; text-decoration: none;
    background: var(--text); color: var(--bg);
    transition: transform 0.05s;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn--accent { background: var(--accent); color: #111; }
.btn--danger { background: var(--err); color: #fff; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-align: center; padding: 4px 0; text-transform: uppercase;
}
.cal__cell {
    aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: space-between;
    padding: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border);
    font-size: 12px; position: relative;
}
.cal__cell--empty   { background: transparent; border: none; }
.cal__cell--past    { background: var(--surface); cursor: pointer; }
.cal__cell--past:hover { border-color: var(--accent); }
.cal__cell--today   { border: 2px solid var(--accent); background: rgba(212,170,90,0.08); }
.cal__cell--future  { background: transparent; color: var(--text-muted); opacity: 0.5; }
.cal__cell--has     { border-color: var(--accent-dk); }
.cal__cell a { color: inherit; text-decoration: none; display: block; width: 100%; height: 100%; }
.cal__day { font-size: 13px; font-weight: 700; }
.cal__sum { font-size: 13px; font-weight: 700; color: var(--accent-dk); margin-top: auto; word-break: break-all; }
.cal__empty { font-size: 11px; color: var(--text-muted); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.tbl td.right { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Alert */
.alert {
    padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border);
    background: rgba(212,170,90,0.12); color: var(--text); font-size: 14px; margin-bottom: 18px;
}
.alert--ok { background: rgba(52,199,89,0.12); border-color: rgba(52,199,89,0.3); }
.alert--err { background: rgba(255,59,48,0.12); border-color: rgba(255,59,48,0.3); }

/* Form inputs */
input[type="number"], input[type="text"], textarea, select {
    padding: 8px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg); color: var(--text); font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,170,90,.2); }
label { font-size: 13px; font-weight: 500; color: var(--text-muted); display: block; margin-bottom: 4px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.ftr {
    margin-top: 48px; padding: 20px 0; border-top: 1px solid var(--border);
    font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.7;
}

.big-total {
    font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent-dk);
    text-align: center; margin: 16px 0 8px; font-variant-numeric: tabular-nums;
}
