/* =========================================================
   Coor UI — clean stylesheet
   - Full-width layout on all screens
   - Modern cards, tables, nav, panels, footer
   - No duplicate blocks / tighter cascade
========================================================= */

/* ---------- Theme ---------- */
:root{
  color-scheme: light;
  --coor:#ff7f00;
  --coor-dark:#e56f00;
  --border:#e6e6eb;
  --muted:#6b6f76;
  --bg:#ffffff;
  --ink:#111111;
}

/* ---------- Base / reset ---------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.35;
}

/* Canvas (always wide, no narrow “column”) */
.wrap{
  width:100%;
  max-width:1200px;
  margin-inline:auto;
  padding:28px 16px;
}

/* ---------- Cards ---------- */
.card{
  display:block;
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow:0 8px 28px rgba(0,0,0,.06);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover{ box-shadow:0 10px 34px rgba(0,0,0,.08); transform: translateY(-1px); }

/* ---------- Typography ---------- */
h1{ font-size:22px; margin:4px 0 12px; }
label{ display:block; font-size:14px; margin:8px 0 4px; color:var(--muted); }
.muted{ color:var(--muted); font-size:13px; }

/* ---------- Form controls & buttons ---------- */
input,select{
  width:100%;
  padding:12px;
  background:#fff;
  color:var(--ink);
  border:1px solid var(--border);
  border-radius:12px;
  font-size:16px;
}
button{
  padding:12px 14px;
  background:#fff;
  color:var(--ink);
  border:1px solid var(--border);
  border-radius:12px;
  font-size:16px;
  width:auto;
  cursor:pointer;
  font-weight:600;
}
input:focus,select:focus,button:focus{
  outline:none;
  border-color:#d1d5db;
  box-shadow:0 0 0 2px rgba(255,127,0,.15);
}

/* Buttons */
.btn{ background:var(--coor); border-color:var(--coor); color:#fff; }
.btn:hover{ background:var(--coor-dark); }
.btn:active{ transform: translateY(1px); }
.btn.secondary{ background:#f2f4f7; border-color:var(--border); color:var(--ink); }
.btn.danger{ background:#ff6b6b; border-color:#ff6b6b; color:#fff; }
.btn.danger:hover{ background:#e45a5a; }
.btn.small{ padding:6px 10px; font-size:13px; border-radius:10px; }
.btn.tiny { padding:4px 8px; font-size:12px; border-radius:10px; }

/* Number inputs: hide spinners when disabled (cleaner while not editing) */
input[type=number]{ -moz-appearance:textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{ margin:0; }
input[type=number]:disabled::-webkit-outer-spin-button,
input[type=number]:disabled::-webkit-inner-spin-button{ -webkit-appearance: none; display:none; }

/* Pills */
.pill{
  font-size:12px; padding:6px 10px; border-radius:999px;
  background:#f3f4f6; color:var(--ink); border:1px solid var(--border);
}

/* ---------- Layout helpers ---------- */
.row{ display:grid; grid-template-columns:1fr; gap:12px; }
.row-3{ display:grid; grid-template-columns:1fr; gap:12px; }
.topbar{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.row-actions{ display:flex; gap:8px; margin-top:8px; }
.row-actions .btn{ width:100%; }
.section{ margin-top:20px; }

/* Responsive columns */
@media (min-width:640px){ .row-3{ grid-template-columns:1fr 1fr; } }
@media (min-width:980px){ .row-3{ grid-template-columns:1fr 1fr 1fr; } }
@media (min-width:1200px){ .wrap{ max-width:1200px; } }

/* ---------- Tables ---------- */
table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}
th,td{ padding:10px 8px; border-bottom:1px solid var(--border); text-align:left; font-size:14px; }
th{ background:#fafafa; color:var(--ink); }
tr{ transition: background-color .12s ease; }
tr:hover td{ background:#fafafb; }
.qty{ text-align:right; font-variant-numeric: tabular-nums; }

/* ---------- Nav (desktop + hamburger overlay) ---------- */
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin:12px 0; overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch;
}
.nav-links{ display:flex; gap:10px; }
.nav a{
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  text-decoration:none;
  color:var(--ink);
  flex:0 0 auto;
}
.nav a.active{ background:var(--coor); border-color:var(--coor); color:#fff; }
.logout-btn{
  background:#ff4d4d; border:1px solid #ff4d4d; border-radius:12px; color:#fff;
  font-size:14px; padding:8px 12px; cursor:pointer;
}
.logout-btn.full{ width:100%; padding:12px 14px; font-weight:600; border-radius:14px; }
.hamburger{
  background:#fff; border:1px solid #e6e6eb; border-radius:10px;
  padding:10px 12px; display:flex; flex-direction:column; gap:4px; cursor:pointer;
}
.hamburger span{ display:block; width:20px; height:2px; background:#111; }
.desktop-only{ display:none; }

/* Overlay sheet */
.nav-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.15);
  backdrop-filter:saturate(140%) blur(6px); opacity:0; transition:opacity .18s ease; z-index:40; }
.nav-overlay[hidden]{ display:none; }
.nav-overlay.show{ opacity:1; }
.nav-sheet{ position:absolute; inset:auto 0 0 0; background:#fff; border-radius:16px 16px 0 0;
  box-shadow:0 -8px 30px rgba(0,0,0,.1); transform:translateY(12px); transition:transform .22s ease; padding:12px 14px; }
.nav-overlay.show .nav-sheet{ transform:translateY(0); }
.sheet-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.sheet-title{ font-weight:700; }
.sheet-close{ background:#fff; border:1px solid #e6e6eb; border-radius:10px; padding:6px 10px; font-size:18px; line-height:1; }
.sheet-links{ display:flex; flex-direction:column; gap:10px; margin:8px 0 12px; }
.sheet-link{ display:block; padding:12px 14px; border:1px solid #e6e6eb; border-radius:12px; color:#111; text-decoration:none; }

/* Desktop breakpoint */
@media (min-width:760px){
  .desktop-only{ display:flex; }
  .hamburger{ display:none; }
  .nav-overlay{ display:none; }
}

/* Never let first card hide behind nav on tiny screens */
.wrap > .card:first-child{ margin-top:6px; }

/* ---------- Admin panels (details/summary) ---------- */
.panel-summary{
  list-style:none; cursor:pointer;
  padding:14px 16px; border:1px solid var(--border); border-radius:14px;
  background:#fff; font-weight:800; font-size:18px; display:flex; align-items:center;
  position:relative; user-select:none; margin:12px 0;
}
.panel-summary::after{
  content:""; width:10px; height:10px; border-right:2px solid #999; border-bottom:2px solid #999;
  transform: rotate(-45deg); position:absolute; right:14px; top:50%; translate: 0 -50%;
  transition: transform .18s ease;
}
details[open] > .panel-summary{ background:#fafafa; }
details[open] > .panel-summary::after{ transform: rotate(45deg); }
.panel-body{ margin-top:10px; }

.site-details{ margin-top:10px; }
.site-summary{
  list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px;
  padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:#fff; font-weight:700; position:relative;
}
.site-summary::after{
  content:""; width:8px; height:8px; border-right:2px solid #bbb; border-bottom:2px solid #bbb;
  transform: rotate(-45deg); position:absolute; right:12px; top:50%; translate:0 -50%;
  transition: transform .18s ease;
}
.site-details[open] > .site-summary::after{ transform: rotate(45deg); }
.site-body{ padding:6px 6px 2px 6px; }

.buildRow{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-radius:10px; margin:6px 0;
  transition: background .12s ease, box-shadow .12s ease;
}
.buildRow:hover{ background:#f9fafb; box-shadow: inset 0 0 0 1px #eef0f3; }
.site-summary .btn.danger{ margin-left:auto; }
.site-summary .btn.danger.small{ padding:6px 10px; font-size:12.5px; }

/* ---------- Login card (nice pop) ---------- */
.login-card{
  max-width:480px; margin:16px auto; padding:18px;
  border:1px solid var(--border); border-radius:16px; background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
  animation:popin .18s ease-out;
}
.login-card h1{ text-align:center; margin-bottom:10px; }
.login-card .btn{ width:100%; }
@keyframes popin{ from{opacity:0; transform:translateY(8px) scale(.99)} to{opacity:1; transform:none} }

/* ---------- Footer ---------- */
.site-footer{
  background:#111;         /* mörk bakgrund */
  color:#f5f5f5;           /* ljus text */
  padding:28px 16px;
  margin-top:40px;
}
.footer-inner{
  max-width:1200px;
  margin:0 auto;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.footer-support a{
  color:#ff7f00;
  font-weight:600;
  text-decoration:none;
}
.footer-support a:hover{
  text-decoration:underline;
}
.footer-credit{
  font-size:14px;
  color:#aaa;
}


/* iOS hint bubble */
.ios-hint{
  display:none; margin-top:8px; font-size:13px; color:var(--muted);
  background:#fff; border:1px dashed var(--border); border-radius:12px;
  padding:10px 12px; box-shadow:0 6px 18px rgba(0,0,0,.04);
}
.ios-hint.show{ display:block; animation:fadeSlide .2s ease-out; }
@keyframes fadeSlide{ from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none} }
.ios-share{ display:inline-block; border:1px solid #ccc; border-radius:6px; padding:0 4px; margin:0 4px; }

/* Sticky-ish footer on short pages */
body{ display:flex; flex-direction:column; }
.wrap{ flex:1 0 auto; }
.site-footer{ flex-shrink:0; }


/* checkbox login */
.checkbox{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  color:var(--ink);
  margin:8px 0;
}
.checkbox input{
  width:16px;
  height:16px;
}

/* Footer layout you already have remains; only styling the language bits */
.footer-lang {
  display:flex; align-items:center; gap:8px;
}
.footer-lang-label {
  font-size:13px; color:var(--muted);
}
.footer-lang-select {
  appearance:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:6px 10px;
  font-size:14px;
  color:var(--ink);
}
.footer-lang-select:focus {
  outline:none;
  border-color:#d1d5db;
  box-shadow:0 0 0 2px rgba(255,127,0,.15);
}

/* Keep footer-inner spacing looking good on small screens */
.footer-inner {
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}


