:root{
  --bg:#090a0f;
  --glass: rgba(147,51,234,.10);
  --glass-2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --text:#eaeaef;
  --muted:#a1a1b5;
  --purple:#8b5cf6;
  --purple-600:#7c3aed;
  --shadow: 0 20px 60px rgba(124,58,237,.25);
  --ok:#22c55e; --warn:#f59e0b; --danger:#ef4444;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--text);
  background:
    radial-gradient(800px 600px at -10% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(900px 700px at 110% -20%, rgba(37,99,235,.14), transparent 70%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Helvetica Neue, Arial;
}

.hidden{display:none !important;}
.container{max-width:1200px; margin:0 auto; padding:24px;}

.nav{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px;}
.brand{display:flex; align-items:center; gap:12px}
.brand img{height:42px}
.brand .title{font-weight:800; letter-spacing:.2px}
.brand .subtitle{color:var(--muted); font-size:.92rem}

.btn{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(147,51,234,.22), rgba(147,51,234,.15));
  color:var(--text);
  padding:11px 16px; border-radius:14px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  cursor:pointer; transition: transform .04s ease, filter .2s ease;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform: translateY(1px)}
.btn-ghost{ background: var(--glass); border-color: rgba(255,255,255,.08); }
.btn-primary{ background: linear-gradient(180deg, var(--purple), var(--purple-600)); border-color: transparent; }
.btn-disabled{ background: rgba(255,255,255,.06); color:#c0c4cf; border-color: rgba(255,255,255,.08); cursor:not-allowed; filter: grayscale(.6); }
.btn-xs{ padding:6px 10px; font-size:.85rem; }

/* Grid & Cards */
.grid{display:grid; gap:16px; grid-template-columns: repeat(4,minmax(0,1fr));}
@media (max-width: 1000px){ .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 580px){ .grid{ grid-template-columns: 1fr; } }

.card{
  position:relative; border-radius:20px; padding:16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border); backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.card .kpi{display:flex; justify-content:space-between; align-items:end;}
.kpi .label{color:var(--muted); font-size:.92rem}
.kpi .value{font-size:1.7rem; font-weight:800}

/* Tiles */
.tile{
  display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end;
  min-height:140px; padding:18px; border-radius:22px; position:relative; overflow:hidden;
  border:1px solid var(--border);
  background: radial-gradient(250px 160px at 20% -10%, rgba(139,92,246,.35), transparent 50%),
             radial-gradient(200px 160px at 120% 120%, rgba(37,99,235,.22), transparent 60%),
             rgba(255,255,255,.04);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
  cursor:pointer; transition: transform .06s ease, filter .15s ease, border-color .2s ease;
}
.tile:hover{filter: brightness(1.06); border-color: rgba(255,255,255,.2)}
.tile .name{font-size:1.1rem; font-weight:700}
.tile .meta{color:var(--muted); font-size:.9rem; margin-top:6px}
.tile.huge { padding: 24px; display:flex; align-items:center; gap:16px; cursor:pointer; }
.tile .bigicon { width:56px; height:56px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:28px; background:#242434; }
.tile .name { font-size:1.2rem; font-weight:700; }
.tile .meta { color:#a1a1b5; }
.tile .bigicon img.icon { width:34px; height:34px; display:block; }

/* Toolbar & Inputs */
.toolbar{display:flex; flex-wrap:wrap; gap:10px; margin: 18px 0 10px;}
.input,.select{
  background: linear-gradient(180deg, rgba(20,10,36,0.92), rgba(20,10,36,0.88));
  border:1px solid rgba(168,85,247,0.55);
  color:#fff; padding:10px 12px; border-radius:12px; outline:none;
}
.input::placeholder{color: rgba(220,195,255,0.9)}
.input:focus,.select:focus{border-color: rgba(192,132,252,0.95); box-shadow: 0 0 0 2px rgba(192,132,252,0.35)}
.textarea{
  background: linear-gradient(180deg, rgba(20,10,36,0.92), rgba(20,10,36,0.88));
  border:1px solid rgba(168,85,247,0.55);
  color:#fff; padding:10px 12px; border-radius:12px; outline:none;
}
.textarea::placeholder{color: rgba(220,195,255,0.9)}

/* Tables */
.table-wrap{overflow:auto; border-radius:16px; border:1px solid var(--border); box-shadow: var(--shadow);}
table{width:100%; border-collapse:collapse; background: rgba(255,255,255,.02);}
thead th{
  position:sticky; top:0; z-index:1;
  background: rgba(139,92,246,.18); backdrop-filter: blur(8px);
  text-align:left; font-weight:700; font-size:.9rem;
  padding:12px; border-bottom:1px solid var(--border); white-space:nowrap;
}
tbody td{padding:10px 12px; border-bottom:1px solid rgba(255,255,255,.06); white-space:nowrap;}
tbody tr:hover{background: rgba(255,255,255,.02)}

.badge{display:inline-block; padding:2px 8px; border-radius:999px; font-size:.75rem; border:1px solid var(--border);}
.badge.open{background: rgba(34,197,94,.15); color:#bbf7d0; border-color: rgba(34,197,94,.3)}

/* Center & Login */
.center{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding: 32px; }
.login-card{
  max-width:460px; width:100%;
  padding:24px; border-radius:24px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.login-card h1{margin:10px 0 6px 0}
.login-card p{color:var(--muted); margin:0 0 16px 0}
.login-row{display:flex; flex-direction:column; gap:8px; margin-bottom:12px}
.hr{height:1px; background:linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); margin:16px 0}
.small{font-size:.88rem; color:var(--muted)}
.muted{color:var(--muted)}

/* ==== Modals (einheitlich & standardmäßig versteckt) ==== */
.modal{
  position: fixed; inset: 0;
  display: none; /* wichtig: default aus */
  align-items:center; justify-content:center;
  padding:24px; background: rgba(0,0,0,.45); z-index: 1000;
}
.modal.show{ display:flex; }
.modal-card{
  width: 100%; max-width: 720px;
  border-radius:20px; padding:18px;
  background: linear-gradient(180deg, rgba(10,6,16,0.92), rgba(10,6,16,0.88));
  border:1px solid rgba(147,51,234,0.45); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.modal-grid{ display:grid; gap:10px; grid-template-columns:1fr 1fr; }
.modal-grid .full{ grid-column:1 / -1; }
.checks{ display:flex; gap:14px; flex-wrap:wrap }
.label{ color:var(--muted); font-size:.85rem; margin-bottom:4px; display:block }

/* ================= Belege / Quittungen ================= */
.month-card{ padding: 14px 14px 10px 14px; }
.month-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.month-title{ font-weight:800; font-size:1.1rem; }
.receipt-list{ display:grid; gap:8px; }
.receipt-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border:1px solid var(--border); border-radius:12px;
  background: rgba(255,255,255,.03);
}
.receipt-main{ min-width:0; }
.receipt-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-actions{ display:flex; gap:8px; align-items:center; }

/* ===== Inventar ===== */
.inv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.inv-actions .btn { margin-left: .5rem; }

.inv-tablewrap { overflow:auto; border-radius: 1rem; border:1px solid var(--border); box-shadow: var(--shadow); }
.inv-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.02); }
.inv-table th, .inv-table td { padding: .6rem .7rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.inv-table th { text-align: left; opacity: .9; }
.inv-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.inv-table .need-negative { color: #ff6b6b; font-weight: 600; }
.inv-table .need-positive { color: #8aff8a; font-weight: 600; }
.inv-table .need-zero { opacity: .7; }

.inv-img { width: 56px; height: 56px; object-fit: cover; border-radius: .5rem; }
.inv-img.placeholder { width: 56px; height: 56px; display: grid; place-items: center; background: rgba(255,255,255,.06); border-radius: .5rem; }

.plusminus { display:flex; gap:.4rem; }
.btn.circle { width: 32px; height: 32px; border-radius: 999px; padding: 0; }
.btn.inv.primary { background: rgba(148, 87, 235, .9); }
.btn.inv.success { background: rgba(56, 178, 172, .9); }
.btn.inv.danger  { background: rgba(245, 101, 101, .9); }

.badge { display:inline-block; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.mgr-col.hidden, .entnahme-col.hidden { display: none; }

/* Logbuch-Modal */
.modal-head { display:flex; align-items:center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal-body { padding: 1rem 1.25rem; }
.inv-table.log tr.log-neg { color: #ff6b6b; }
.inv-table.log tr.log-pos { color: #8aff8a; }

/* === Dropdown === */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 280px;
  display: none;                 /* standardmäßig verstecken */
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10,6,16,0.98), rgba(10,6,16,0.94));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 40;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .btn { display: block; width: 100%; text-align: left; }
.dropdown-menu .hr { margin: 8px 0; }
/* Öffnen auch erlauben, wenn JS .show am Menü setzt */
.dropdown-menu.show { display: block; }
:root{
  --bg:#090a0f;
  --glass: rgba(147,51,234,.10);
  --glass-2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --text:#eaeaef;
  --muted:#a1a1b5;
  --purple:#8b5cf6;
  --purple-600:#7c3aed;
  --shadow: 0 20px 60px rgba(124,58,237,.25);
  --ok:#22c55e; --warn:#f59e0b; --danger:#ef4444;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--text);
  background:
    radial-gradient(800px 600px at -10% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(900px 700px at 110% -20%, rgba(37,99,235,.14), transparent 70%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Helvetica Neue, Arial;
}

.hidden{display:none !important;}
.container{max-width:1200px; margin:0 auto; padding:24px;}

.nav{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px;}
.brand{display:flex; align-items:center; gap:12px}
.brand img{height:42px}
.brand .title{font-weight:800; letter-spacing:.2px}
.brand .subtitle{color:var(--muted); font-size:.92rem}

.btn{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(147,51,234,.22), rgba(147,51,234,.15));
  color:var(--text);
  padding:11px 16px; border-radius:14px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  cursor:pointer; transition: transform .04s ease, filter .2s ease;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform: translateY(1px)}
.btn-ghost{ background: var(--glass); border-color: rgba(255,255,255,.08); }
.btn-primary{ background: linear-gradient(180deg, var(--purple), var(--purple-600)); border-color: transparent; }
.btn-disabled{ background: rgba(255,255,255,.06); color:#c0c4cf; border-color: rgba(255,255,255,.08); cursor:not-allowed; filter: grayscale(.6); }
.btn-xs{ padding:6px 10px; font-size:.85rem; }

/* Grid & Cards */
.grid{display:grid; gap:16px; grid-template-columns: repeat(4,minmax(0,1fr));}
@media (max-width: 1000px){ .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 580px){ .grid{ grid-template-columns: 1fr; } }

.card{
  position:relative; border-radius:20px; padding:16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border); backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.card .kpi{display:flex; justify-content:space-between; align-items:end;}
.kpi .label{color:var(--muted); font-size:.92rem}
.kpi .value{font-size:1.7rem; font-weight:800}

/* Tiles */
.tile{
  display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end;
  min-height:140px; padding:18px; border-radius:22px; position:relative; overflow:hidden;
  border:1px solid var(--border);
  background: radial-gradient(250px 160px at 20% -10%, rgba(139,92,246,.35), transparent 50%),
             radial-gradient(200px 160px at 120% 120%, rgba(37,99,235,.22), transparent 60%),
             rgba(255,255,255,.04);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
  cursor:pointer; transition: transform .06s ease, filter .15s ease, border-color .2s ease;
}
.tile:hover{filter: brightness(1.06); border-color: rgba(255,255,255,.2)}
.tile .name{font-size:1.1rem; font-weight:700}
.tile .meta{color:var(--muted); font-size:.9rem; margin-top:6px}
.tile.huge { padding: 24px; display:flex; align-items:center; gap:16px; cursor:pointer; }
.tile .bigicon { width:56px; height:56px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:28px; background:#242434; }
.tile .name { font-size:1.2rem; font-weight:700; }
.tile .meta { color:#a1a1b5; }
.tile .bigicon img.icon { width:34px; height:34px; display:block; }

/* Toolbar & Inputs */
.toolbar{display:flex; flex-wrap:wrap; gap:10px; margin: 18px 0 10px;}
.input,.select{
  background: linear-gradient(180deg, rgba(20,10,36,0.92), rgba(20,10,36,0.88));
  border:1px solid rgba(168,85,247,0.55);
  color:#fff; padding:10px 12px; border-radius:12px; outline:none;
}
.input::placeholder{color: rgba(220,195,255,0.9)}
.input:focus,.select:focus{border-color: rgba(192,132,252,0.95); box-shadow: 0 0 0 2px rgba(192,132,252,0.35)}
.textarea{
  background: linear-gradient(180deg, rgba(20,10,36,0.92), rgba(20,10,36,0.88));
  border:1px solid rgba(168,85,247,0.55);
  color:#fff; padding:10px 12px; border-radius:12px; outline:none;
}
.textarea::placeholder{color: rgba(220,195,255,0.9)}

/* Tables */
.table-wrap{overflow:auto; border-radius:16px; border:1px solid var(--border); box-shadow: var(--shadow);}
table{width:100%; border-collapse:collapse; background: rgba(255,255,255,.02);}
thead th{
  position:sticky; top:0; z-index:1;
  background: rgba(139,92,246,.18); backdrop-filter: blur(8px);
  text-align:left; font-weight:700; font-size:.9rem;
  padding:12px; border-bottom:1px solid var(--border); white-space:nowrap;
}
tbody td{padding:10px 12px; border-bottom:1px solid rgba(255,255,255,.06); white-space:nowrap;}
tbody tr:hover{background: rgba(255,255,255,.02)}

.badge{display:inline-block; padding:2px 8px; border-radius:999px; font-size:.75rem; border:1px solid var(--border);}
.badge.open{background: rgba(34,197,94,.15); color:#bbf7d0; border-color: rgba(34,197,94,.3)}

/* Center & Login */
.center{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding: 32px; }
.login-card{
  max-width:460px; width:100%;
  padding:24px; border-radius:24px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.login-card h1{margin:10px 0 6px 0}
.login-card p{color:var(--muted); margin:0 0 16px 0}
.login-row{display:flex; flex-direction:column; gap:8px; margin-bottom:12px}
.hr{height:1px; background:linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); margin:16px 0}
.small{font-size:.88rem; color:var(--muted)}
.muted{color:var(--muted)}

/* ==== Modals (einheitlich & standardmäßig versteckt) ==== */
.modal{
  position: fixed; inset: 0;
  display: none; /* wichtig: default aus */
  align-items:center; justify-content:center;
  padding:24px; background: rgba(0,0,0,.45); z-index: 1000;
}
.modal.show{ display:flex; }
.modal-card{
  width: 100%; max-width: 720px;
  border-radius:20px; padding:18px;
  background: linear-gradient(180deg, rgba(10,6,16,0.92), rgba(10,6,16,0.88));
  border:1px solid rgba(147,51,234,0.45); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.modal-grid{ display:grid; gap:10px; grid-template-columns:1fr 1fr; }
.modal-grid .full{ grid-column:1 / -1; }
.checks{ display:flex; gap:14px; flex-wrap:wrap }
.label{ color:var(--muted); font-size:.85rem; margin-bottom:4px; display:block }

/* ================= Belege / Quittungen ================= */
.month-card{ padding: 14px 14px 10px 14px; }
.month-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.month-title{ font-weight:800; font-size:1.1rem; }
.receipt-list{ display:grid; gap:8px; }
.receipt-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border:1px solid var(--border); border-radius:12px;
  background: rgba(255,255,255,.03);
}
.receipt-main{ min-width:0; }
.receipt-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-actions{ display:flex; gap:8px; align-items:center; }

/* ===== Inventar ===== */
.inv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.inv-actions .btn { margin-left: .5rem; }

.inv-tablewrap { overflow:auto; border-radius: 1rem; border:1px solid var(--border); box-shadow: var(--shadow); }
.inv-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.02); }
.inv-table th, .inv-table td { padding: .6rem .7rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.inv-table th { text-align: left; opacity: .9; }
.inv-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.inv-table .need-negative { color: #ff6b6b; font-weight: 600; }
.inv-table .need-positive { color: #8aff8a; font-weight: 600; }
.inv-table .need-zero { opacity: .7; }

.inv-img { width: 56px; height: 56px; object-fit: cover; border-radius: .5rem; }
.inv-img.placeholder { width: 56px; height: 56px; display: grid; place-items: center; background: rgba(255,255,255,.06); border-radius: .5rem; }

.plusminus { display:flex; gap:.4rem; }
.btn.circle { width: 32px; height: 32px; border-radius: 999px; padding: 0; }
.btn.inv.primary { background: rgba(148, 87, 235, .9); }
.btn.inv.success { background: rgba(56, 178, 172, .9); }
.btn.inv.danger  { background: rgba(245, 101, 101, .9); }

.badge { display:inline-block; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.mgr-col.hidden, .entnahme-col.hidden { display: none; }

/* Logbuch-Modal */
.modal-head { display:flex; align-items:center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal-body { padding: 1rem 1.25rem; }
.inv-table.log tr.log-neg { color: #ff6b6b; }
.inv-table.log tr.log-pos { color: #8aff8a; }

/* === Dropdown === */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 280px;
  display: none;                 /* standardmäßig verstecken */
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10,6,16,0.98), rgba(10,6,16,0.94));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 40;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .btn { display: block; width: 100%; text-align: left; }
.dropdown-menu .hr { margin: 8px 0; }
/* Öffnen auch erlauben, wenn JS .show am Menü setzt */
.dropdown-menu.show { display: block; }
#exportDropdown.show,
#exportDropdownTasks.show { display: block; }

/* ===== Passwort-Popup ===== */
.password-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.password-modal {
  background: linear-gradient(180deg, rgba(147, 51, 234, .22), rgba(37, 99, 235, .22));
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 360px;
  width: calc(100% - 40px);
  color: var(--text);
}

.password-modal h2 {
  margin: 0 0 12px 0;
}

.password-input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 10, 36, 0.92), rgba(20, 10, 36, 0.88));
  color: #fff;
  outline: none;
  font-size: 1rem;
}

.password-button {
  margin-top: 16px;
  width: 100%;
}

.password-message {
  margin-top: 8px;
  font-size: .9rem;
}

.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}

.error {
  border-color: rgba(239, 68, 68, 0.8);
}

.success {
  border-color: rgba(34, 197, 94, 0.8);
}

/* ============ Belege & Stundenzettel (Dokumente) =========== */
#view-docs .docs-year {
  font-weight: 800;
  font-size: 1.4rem;
  text-align: center;
  margin-top: 10px;
}
#view-docs .months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.month-btn {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.month-btn:hover {
  background: rgba(255,255,255,.05);
}
.month-btn.selected {
  background: rgba(147,51,234,.3);
  border-color: rgba(147,51,234,.6);
}
.docs-month-content {
  margin-top: 20px;
}
.docs-type-title {
  font-weight: 700;
  margin-top: 12px;
}
.docs-type-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.docs-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.docs-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-item-actions {
  display: flex;
  gap: 8px;
}
/* Secondary button for Stundenzettel-Upload */
.btn-secondary {
  background: rgba(56, 178, 172, .8);
  color: white;
}

/* ============ Jahresnavigation in den Dokumenten =========== */
#view-docs .docs-year-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
#view-docs .btn-year {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
}
#view-docs .btn-year:hover {
  background: rgba(255,255,255,.05);
}
#betrieb-info-modal {
  padding: 12px;
  box-sizing: border-box;
}

#betrieb-info-modal .modal-card {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

#betrieb-info-modal .betrieb-info-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  line-height: 1.55;
  color: #fff;
}




/* ===== Tagesaufgaben: Betriebsmittel-Info ===== */
.help-pulse{
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(139,92,246,.28);
  color: #fff;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(139,92,246,.72);
  animation: helpPulse 1.6s infinite;
}
.help-pulse:hover{ background: rgba(139,92,246,.48); filter: brightness(1.08); }
@keyframes helpPulse{
  0%{ box-shadow: 0 0 0 0 rgba(139,92,246,.72); transform: scale(1); }
  70%{ box-shadow: 0 0 0 10px rgba(139,92,246,0); transform: scale(1.04); }
  100%{ box-shadow: 0 0 0 0 rgba(139,92,246,0); transform: scale(1); }
}
.betrieb-check-label{ display: inline-flex; align-items: center; gap: 6px; }
#betrieb-info-modal{ padding: 12px; box-sizing: border-box; }
#betrieb-info-modal .betrieb-info-card{
  width: min(820px, calc(100vw - 24px));
  max-width: 820px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.betrieb-info-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
#betrieb-info-modal .betrieb-info-body{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}
.betrieb-info-table{ width:100%; table-layout: fixed; }
.betrieb-info-table th:nth-child(1), .betrieb-info-table td:nth-child(1){ width:65%; }
.betrieb-info-table th:nth-child(2), .betrieb-info-table td:nth-child(2){ width:35%; }
.betrieb-info-table td, .betrieb-info-table th{ white-space: normal; }
@media (max-width: 580px){
  .betrieb-info-head{ flex-direction: column; }
  #betriebInfoClose{ width:100%; }
  .help-pulse{ width:22px; height:22px; }
}
