/* app/assets/css/app.css - modern, tablet-first styles */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/wFZV7-Q1B0e3j9Gd7EMB.woff2") format("woff2"),
       url("../fonts/wFZV7-Q1B0e3j9Gd7EMB.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root{
  --bg:#000000;
  --bg-2:#000000;
  --card:#ffffff;
  --muted:#6b7280;
  --ink:#0f172a;
  --accent:#166534;
  --accent-2:#22c55e;
  --danger:#ef4444;
  --ring:rgba(22,101,52,.25);
  --shadow:0 10px 30px rgba(15,23,42,.08);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  min-height:100%;
  min-height:100dvh;
  min-width:100%;
  min-width:100vw;
  width:100%;
  overflow-x:hidden;
  font-family:"Manrope",system-ui,sans-serif;
  background:var(--bg);
  color:var(--ink);
}
body{
  padding-bottom:76px;
  padding-top:1px;
  position:relative;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  background:var(--bg);
  z-index:-1;
}

.wrap{max-width:960px;margin:1px auto;padding:16px}
.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:12px;flex-wrap:wrap}
.big{font-size:1.25rem;font-weight:700;letter-spacing:.01em}
.logo img{height:102px;width:auto;display:block}
.muted{color:var(--muted);font-size:.95rem}
.empty-state{text-align:center}

.card{
  background:var(--card);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--shadow);
  border:1px solid rgba(148,163,184,.18);
}
.card-flush-top{
  margin-top:6px;
  padding-top:0;
}

.form-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}
label{font-weight:600;font-size:.9rem;color:#1f2937}
select,input{
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  font-size:1rem;
  background:#fff;
  color:var(--ink);
  min-height:46px;
}
select:focus,input:focus,button:focus{
  outline:none;
  box-shadow:0 0 0 3px var(--ring);
  border-color:var(--accent);
}

button{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;
  border:none;
  padding:12px 16px;
  border-radius:12px;
  font-weight:700;
  letter-spacing:.01em;
  min-height:46px;
}
button:disabled{opacity:.5}

.section-break{
  border:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(15,23,42,.18),transparent);
  margin:12px 0 14px;
}

.entries{margin-top:14px}
.entries table{width:100%;border-collapse:separate;border-spacing:0 6px}
.entries th{
  padding:8px 10px;
  color:var(--muted);
  font-size:.8rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-align:left;
}
.entries td{
  padding:10px;
  background:#f8fafc;
  border-top:1px solid #eef2f7;
  border-bottom:1px solid #eef2f7;
}
.entries tr td:first-child{border-left:1px solid #eef2f7;border-radius:10px 0 0 10px}
.entries tr td:last-child{border-right:1px solid #eef2f7;border-radius:0 10px 10px 0}

.batch-table{width:100%;border-collapse:separate;border-spacing:0 6px}
.batch-table th{
  padding:6px 8px;
  color:var(--muted);
  font-size:.8rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-align:left;
}
.batch-table td{
  padding:8px;
  background:#f8fafc;
  border-top:1px solid #eef2f7;
  border-bottom:1px solid #eef2f7;
}
.batch-table tr td:first-child{border-left:1px solid #eef2f7;border-radius:10px 0 0 10px}
.batch-table tr td:last-child{border-right:1px solid #eef2f7;border-radius:0 10px 10px 0}
.batch-row.row-error input,
.batch-row.row-error select{
  border-color:var(--danger);
  box-shadow:0 0 0 3px rgba(239,68,68,.2);
}

.table-wrap{overflow-x:auto}
.report-table{width:100%;border-collapse:separate;border-spacing:0}
.report-table th{
  padding:10px 12px;
  color:var(--muted);
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-align:left;
  border-bottom:1px solid #e5e7eb;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9);
}
.report-table td{
  padding:10px 12px;
  border-bottom:1px solid #eef2f7;
  background:#fff;
}
.report-table tbody tr:nth-child(even) td{background:#f8fafc}
.report-table .num{text-align:right;font-variant-numeric:tabular-nums}
.report-table tbody tr:last-child td:first-child{border-bottom-left-radius:12px}
.report-table tbody tr:last-child td:last-child{border-bottom-right-radius:12px}

.user-total-wrap{margin-top:10px}
.user-total-list{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.user-total{display:block}
.user-total-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#f8fafc;
  color:#0f172a;
  border:1px solid #e5e7eb;
  padding:12px 14px;
  border-radius:12px;
  font-weight:700;
  min-height:48px;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.user-total-toggle:focus{
  outline:none;
  box-shadow:0 0 0 3px var(--ring);
  border-color:var(--accent);
}
.user-row-main{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.user-row-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#ffffff;
  border:1px solid #e5e7eb;
  padding:6px 10px;
  border-radius:999px;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.user-row-name{font-weight:800}
.user-row-total{color:#0f172a;font-variant-numeric:tabular-nums}
.user-row-chevron{
  width:10px;
  height:10px;
  border-right:2px solid #64748b;
  border-bottom:2px solid #64748b;
  transform:rotate(45deg);
  transition:transform .2s ease;
  margin-left:auto;
}
.user-total.is-open .user-row-chevron{transform:rotate(-135deg)}
.user-total-entries{
  margin-top:8px;
  padding:6px 0 2px;
}

.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:20px;
  background:#0f172a;
  color:#fff;
  padding:10px 14px;
  border-radius:10px;
  display:none;
  box-shadow:0 10px 24px rgba(2,6,23,.3);
}

.nav-panel{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(8px);
  border-radius:16px;
  padding:12px 14px;
  margin-bottom:14px;
  box-shadow:var(--shadow);
  border:1px solid rgba(148,163,184,.2);
}
.nav-group{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.nav-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;color:var(--muted);font-weight:700}
.nav-links{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.nav-link{background:#f1f5f9}

.bottom-nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  padding:12px 14px;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(8px);
  border-radius:16px;
  box-shadow:var(--shadow);
  border:1px solid rgba(148,163,184,.2);
  margin-bottom:14px;
}
.bottom-nav .btn-ghost{background:#f1f5f9}
.btn-ghost{
  background:#fff;
  color:#0f172a;
  border:1px solid #e5e7eb;
  padding:8px 12px;
  border-radius:999px;
  font-weight:700;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.btn-ghost:hover{border-color:#cbd5e1;box-shadow:0 4px 12px rgba(15,23,42,.12)}

.site-footer{
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  width:100%;
  padding:10px 16px 24px;
}
.site-footer .footer-logout{
  padding:4px 8px;
  min-height:28px;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.03em;
}

@media (min-width:800px){
  .wrap{padding:22px}
  .form-row select,input{flex:1}
}

@media (max-width:560px){
  .header{flex-direction:column;align-items:flex-start}
  .logo img{height:84px}
  .nav-panel{padding:10px}
  .bottom-nav{padding:10px}
}
