/* =============================================================
   panel.css — stilovi za osoblje (login, hostesa, admin)
   Ista crno-zlatna tema kao ostatak sajta (style.css se učitava pre)
   ============================================================= */

/* ---------- LOGIN ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 0%, #14120a 0%, var(--bg) 60%);
}
.login-card {
  width: min(400px, 94vw); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px 28px; text-align: center;
}
.login-card .logo-hero {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 16px; border: 2px solid var(--gold-dark); box-shadow: var(--glow-gold);
  display: grid; place-items: center; background: #000;
}
.login-card .logo-hero img { width: 150%; height: 150%; object-fit: cover; }
.login-card h1 { font-family: var(--serif); letter-spacing: 3px; margin: 0 0 4px; font-size: 26px; }
.login-card .sub { color: var(--muted); font-size: 12.5px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 24px; }
.login-card .form { text-align: left; }
.login-error {
  display: none; background: #2c1114; border: 1px solid #55232a; color: #ff9da8;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 4px;
}
.login-error.show { display: block; }

/* ---------- ZAJEDNIČKO ZA PANELE ---------- */
.app-header {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: rgba(7,7,8,.92); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
}
.app-header .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who .uname { font-weight: 800; font-size: 13px; }
.who .urole { font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 1.5px; }
.icon-btn {
  position: relative; background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer; font-size: 17px;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn .bubble {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 900;
  display: grid; place-items: center; padding: 0 4px;
}

.tabs { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; }
.tabs button {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 13.5px;
  white-space: nowrap;
}
.tabs button.active { background: var(--grad); color: #141005; border-color: transparent; }

.content { padding: 12px 14px 90px; max-width: 1500px; margin: 0 auto; }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800;
  padding: 4px 11px; border-radius: 999px; letter-spacing: .4px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.14); color: #fff;
}
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* kartica rezervacije (mobilni prikaz) */
.res-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 10px;
}
.res-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.res-card .guest { font-weight: 800; font-size: 16px; }
.res-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.6; }
.res-card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.res-card .actions .btn { padding: 9px 13px; font-size: 12.5px; flex: 0 0 auto; }
a.tel-link { color: var(--gold); font-weight: 800; }

/* filteri */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 700; }
.filters input, .filters select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 10px 11px; font-size: 13.5px; min-width: 120px;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); }

/* ---------- ADMIN LAYOUT ---------- */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 61px); }
@media (min-width: 960px) { .admin-shell { grid-template-columns: 225px 1fr; } }
.side {
  background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 10px;
  display: flex; flex-direction: row; gap: 4px; overflow-x: auto;
}
@media (min-width: 960px) { .side { flex-direction: column; overflow-x: visible; } }
.side button {
  display: flex; align-items: center; gap: 10px; width: auto; text-align: left;
  background: transparent; border: 0; color: var(--muted); padding: 11px 14px;
  border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
@media (min-width: 960px) { .side button { width: 100%; } }
.side button:hover { color: var(--gold-light); background: var(--panel); }
.side button.active { background: var(--panel2); color: var(--gold); }
.main { padding: 18px 16px 80px; min-width: 0; }
.main h2 { font-family: var(--serif); letter-spacing: 1px; margin: 4px 0 18px; font-size: 24px; }

/* kartice statistike */
.stat-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat-card .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.stat-card .val { font-size: 26px; font-weight: 900; font-family: var(--serif); margin-top: 6px; }
.stat-card .val.gold { color: var(--gold); }
.stat-card .sub2 { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* horizontalne trakice (mini grafikon) */
.bar-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.bar-row .bar { height: 12px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.bar-row .bar > div { height: 100%; background: var(--grad); border-radius: 999px; }
.bar-row b { text-align: right; }

/* tabele */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th {
  text-align: left; padding: 11px 12px; color: var(--muted); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--line);
  background: var(--bg2); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--panel2); }

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 14px 0; color: var(--muted); font-size: 13px; }

/* obaveštenja fioka */
#notifDrawer {
  position: fixed; right: 0; top: 0; height: 100%; width: min(380px, 94vw);
  background: var(--panel); border-left: 1px solid var(--line); z-index: 60;
  transform: translateX(100%); transition: transform .22s ease; overflow-y: auto;
  box-shadow: -14px 0 50px rgba(0,0,0,.6);
}
#notifDrawer.open { transform: translateX(0); }
.notif-item { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.notif-item.unread { background: rgba(212,175,55,.06); border-left: 3px solid var(--gold); }
.notif-item h5 { margin: 0 0 4px; font-size: 13.5px; }
.notif-item p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.notif-item .t { font-size: 10.5px; color: var(--muted); margin-top: 5px; }

/* istorija (audit) */
.log-diff { font-size: 11.5px; color: var(--muted); font-family: Consolas, monospace; word-break: break-word; }
.log-diff .old { color: #ff9da8; }
.log-diff .new { color: #9ae6b4; }

/* modal potvrde */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 80;
  display: grid; place-items: center; padding: 16px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  width: min(430px, 94vw); padding: 22px; max-height: 88vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 10px; font-family: var(--serif); letter-spacing: .5px; }

/* prazno stanje */
.empty {
  text-align: center; color: var(--muted); padding: 42px 16px;
  border: 1px dashed var(--line); border-radius: 14px; font-size: 14px;
}

/* mobilna dugmad — dovoljno velika za palac */
@media (max-width: 700px) {
  .btn { padding: 13px 16px; }
  .res-card .actions .btn { padding: 12px 14px; font-size: 13px; }
  .tabs button { padding: 12px 20px; }
}
