:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#1c2b35;background:#edf3f6;--blue:#27546d;--orange:#ef6636;--card:#ffffffed;--ink:#1c2b35;--line:#dce5e9;--muted:#61727f}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(#edf3f6df,#edf3f6e8),url('/tdt-background.jpg') center/cover fixed;color:var(--ink)}body.dark{--card:#1c303bea;--ink:#f1f6f9;--line:#48616c;--muted:#b3c7d0;background:linear-gradient(#0d1a21e8,#0d1a21e8),url('/tdt-background.jpg') center/cover fixed}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.center{display:grid;place-items:center;min-height:70vh}.login{min-height:100vh;display:grid;place-items:center;padding:18px}.panel,.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 4px 20px #142c3810}.login .panel{width:min(430px,100%)}.logo{width:90px;height:90px;object-fit:contain;border-radius:18px}.brand{display:flex;align-items:center;gap:15px}.brand strong{color:var(--orange);font-size:21px}.brand small{display:block;color:var(--muted)}.shell{display:flex;min-height:100vh}.sidebar{background:#27546d;color:white;width:235px;padding:22px 14px;position:sticky;top:0;height:100vh;flex-shrink:0}.sidebar .brand strong{color:#fff}.sidebar .brand small{color:#d9e7ed}.sidebar .logo{width:53px;height:53px}.nav{display:grid;gap:6px;margin-top:35px}.nav button{border:0;background:transparent;color:#e1edf2;padding:13px;text-align:left;border-radius:10px}.nav button.active{background:#ffffff28;font-weight:700}.content{padding:24px;flex:1;min-width:0;max-width:1500px}.header{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:20px}.header h1{margin:0;font-size:25px}.header p{margin:5px 0;color:var(--muted)}.card{margin-bottom:15px}.card h3{margin:0 0 14px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.field{display:grid;gap:5px;margin:10px 0;min-width:0}.field label{font-size:13px;font-weight:650}.field input,.field select{width:100%;padding:11px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--ink)}.btn{border:0;border-radius:9px;background:var(--orange);color:#fff;padding:10px 14px;font-weight:650}.btn.blue{background:var(--blue)}.btn.outline{background:transparent;border:1px solid var(--line);color:var(--ink)}.btn.red{background:#b9433d}.btn.sm{font-size:12px;padding:7px 10px}.muted{color:var(--muted)}.small{font-size:12px}.tag{display:inline-block;border-radius:30px;padding:4px 9px;background:#e0f0e7;color:#136b4b;font-size:12px;font-weight:700}.tag.pending{background:#fff0d8;color:#885913}.tag.blocked{background:#fce1db;color:#9e3e2c}.list{display:grid;gap:9px}.item{border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:10px;padding:12px}.item strong{display:block}.empty{border:1px dashed var(--line);border-radius:10px;padding:17px;color:var(--muted);text-align:center}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:650px}td,th{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.notice{background:#e7f1f6;color:#234c62;padding:12px;border-radius:9px;font-size:13px}.dark .notice{background:#274453;color:#e0edf4}.mobile-nav{display:none}#toast:not(:empty){position:fixed;right:20px;bottom:20px;background:#183b4e;color:white;padding:13px 17px;border-radius:10px;z-index:100;max-width:350px}.iconbtn{width:35px;height:35px;padding:7px;display:grid;place-items:center}.iconbtn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.iconbtn.red{color:#bd4439}.toolbar{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.toolbar .field{margin:0}.wday{font-size:12px;color:var(--muted)}@media(max-width:850px){.sidebar{display:none}.content{padding:17px 12px 95px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;justify-content:space-around;background:var(--card);border-top:1px solid var(--line);padding:8px 2px calc(8px + env(safe-area-inset-bottom));z-index:20}.mobile-nav button{background:transparent;border:0;color:var(--ink);font-size:12px;padding:10px 5px}.mobile-nav button.active{color:var(--orange);font-weight:800}.grid,.grid.three{grid-template-columns:1fr}.header h1{font-size:21px}#toast:not(:empty){bottom:80px}}


/* TDT: dedicated Overview form layout; never depend on inherited flex widths. */
.overview-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  align-items:end;
  gap:12px;
  width:100%;
  min-width:0;
}
.overview-controls > .field{
  margin:0;
  min-width:0;
  width:100%;
}
.overview-controls > .field input,
.overview-controls > .field select{
  display:block;
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  width:100%;
}
.overview-controls > .btn{
  min-width:0;
  width:auto;
  white-space:nowrap;
  min-height:43px;
}
@media(max-width:850px){
  .overview-view-controls{
    grid-template-columns:minmax(0,1fr);
    gap:12px;
  }
  .overview-free-controls{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .overview-controls > .field{
    min-width:0;
    max-width:100%;
  }
  .overview-controls > .field input,
  .overview-controls > .field select{
    min-width:0;
    width:100%;
    max-width:100%;
    font-size:16px;
    padding:11px 9px;
  }
  .overview-controls > .btn{
    grid-column:1/-1;
    width:100%;
    white-space:normal;
  }
}
@media(max-width:360px){
  .overview-free-controls{grid-template-columns:1fr}
}
