/* === PPAP Pro — modern blue/white theme (wider layout + footer-safe space) === */
:root{
  --blue:#1f6feb; --blue-600:#1a5bcc;
  --grey:#6b7280; --bg:#ffffff; --text:#0f172a;
  --muted:#f1f5f9; --border:#e5e7eb;
  --shadow:0 8px 24px rgba(0,0,0,0.08);
  --footer-h:64px;                 /* footer height */
  --page-pad:24px;                 /* side padding */
  --row-hover:#f8fafc; --row-stripe:#fafbff;
}

/* Base */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text);
  padding-bottom:calc(var(--footer-h) + 56px);  /* extra safety below fixed footer */
}
a{color:inherit;text-decoration:none}
a:hover{color:var(--blue-600)}

/* Header */
.site-header{
  position:sticky; top:0; z-index:1000;
  background:#fff; border-bottom:1px solid var(--border);
  box-shadow:0 2px 8px rgba(0,0,0,0.03);
}
.site-header .wrap{
  max-width:1600px; margin:0 auto; padding:12px var(--page-pad);
  display:flex; align-items:center; gap:16px;
}
.brand{font-weight:800;font-size:20px;color:var(--blue)}
.tagline{margin-left:auto;color:#0f172a;font-weight:500;opacity:.9;white-space:nowrap}
nav{display:flex;align-items:center;gap:16px;margin-left:16px}
nav a{color:var(--blue);font-weight:600}

/* Main */
.site-main{
  max-width:1600px; margin:24px auto; padding:0 var(--page-pad);
}

/* Cards */
.card{
  background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:24px 22px; margin-bottom:24px;
  box-shadow:var(--shadow);
}

/* Login-only centering */
.auth-card{ max-width:420px; margin:80px auto }

/* Forms */
.input,select{
  width:100%; padding:12px;
  border:1px solid #cbd5e1; border-radius:10px; background:#fff; font-size:15px;
}
.input:focus,select:focus{
  outline:none; border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(31,111,235,.15);
}
.btn{
  display:inline-block; padding:12px 18px;
  background:var(--blue); color:#fff; border:none; border-radius:10px;
  cursor:pointer; font-weight:700;
}
.btn:hover{ background:var(--blue-600) }

/* Footer (fixed) */
.site-footer{
  position:fixed; left:0; right:0; bottom:0; height:var(--footer-h);
  background:#fafafa; border-top:1px solid var(--border); color:var(--grey);
  display:flex; align-items:center;
}
.site-footer .wrap{ max-width:1600px; margin:0 auto; padding:0 var(--page-pad); width:100%; text-align:center }

/* ---- Table containers (wider, airy, footer-safe) ---- */
.table-container{
  background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:22px; margin:24px 0;
  box-shadow:var(--shadow);
}
.table-container h2{ margin-bottom:8px }
.table-container .muted{ margin-bottom:8px; display:block }

/* Extra space so long tables never sit under the fixed footer */
.table-container, .table-responsive{ margin-bottom:calc(var(--footer-h) + 32px) }

/* Optional: edge-to-edge wide section wrapper */
.wide{ max-width:1600px; }

/* ---- Modern tables ---- */
.table-responsive{
  width:100%; overflow:auto; -webkit-overflow-scrolling:touch;
  border-radius:14px; box-shadow:var(--shadow);
  background:#fff; border:1px solid var(--border);
}

/* “Not cramped” defaults */
.table{
  width:100%;
  min-width: 1200px;           /* gives breathing room on desktop for many columns */
  border-collapse:separate; border-spacing:0;
  background:#fff; border-radius:14px; overflow:hidden; display:table;
  table-layout:auto;
}

/* Make it more fluid on smaller screens */
@media (max-width:1200px){ .table{ min-width: 980px } }
@media (max-width:900px){ .table{ min-width: 760px } }

/* Utility to allow fully fluid tables if needed (add class="table table--fluid") */
.table--fluid{ min-width: 0 }

/* Sticky header */
.table thead th{
  position:sticky; top:0; z-index:2;
  background:linear-gradient(180deg,#f8fafc 0%, #f3f6fb 100%);
  color:#0f172a; font-weight:700; font-size:13px; letter-spacing:.02em; text-transform:uppercase;
  padding:14px 18px; border-bottom:1px solid var(--border); text-align:left;
}
.table thead th:first-child{ border-top-left-radius:14px }
.table thead th:last-child{ border-top-right-radius:14px }

/* Body */
.table tbody tr:nth-child(even){ background:var(--row-stripe) }
.table tbody tr:hover{ background:var(--row-hover) }
.table td{
  padding:14px 18px; border-bottom:1px solid var(--border);
  vertical-align:middle; line-height:1.45; color:#0f172a; text-align:left;
}
.table tbody tr:last-child td{ border-bottom:none }
.table th,.table td{ word-break:break-word; white-space:normal }

/* Optional compact + grid utilities */
.table--compact thead th{ padding:10px 12px }
.table--compact td{ padding:10px 12px }
.table--grid td{ border-right:1px dashed #e6eaf1 }
.table--grid td:last-child{ border-right:none }

/* Badges */
.badge{
  display:inline-block; padding:4px 10px; border-radius:999px;
  background:var(--muted); color:#111827; font-size:12px; font-weight:600;
}

/* Alerts */
.alert{
  padding:12px 14px; border-radius:10px;
  background:#fef2f2; border:1px solid #fecaca; color:#991b1b;
}

/* Dashboard grid */
.muted{ color:#64748b }
.dash-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:24px; margin-top:12px;
}
.dash-card{
  background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:20px; box-shadow:var(--shadow);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  color:inherit; display:block;
}
.dash-card:hover{ transform:translateY(-2px); box-shadow:0 10px 30px rgba(0,0,0,.10); border-color:#d1d5db }
.dash-card .icon{
  width:48px; height:48px; line-height:48px; border-radius:12px; background:var(--muted);
  text-align:center; font-size:22px; margin-bottom:10px;
}
.dash-card h3{ margin:6px 0 4px; font-size:18px; color:#0f172a }
.dash-card p{ margin:0; color:#475569; font-size:14px }
.dash-card.disabled{ opacity:.6; cursor:not-allowed }

.alert-success{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;padding:12px 14px;border-radius:10px}
.alert-info{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;padding:12px 14px;border-radius:10px}

/* Small screens */
@media (max-width:720px){
  .tagline{ display:none }
  nav a{ font-size:14px }
}
