:root{
  /* PlayStation-ish light theme */
  --bg: #f4f8ff;
  --bg2:#eaf2ff;

  --card:#ffffff;
  --text:#0b1b33;
  --muted:#5a6b86;

  --accent:#0070f3;     /* PS blue */
  --accent2:#2d9cff;    /* light blue */

  --danger:#d7263d;
  --ok:#12b981;

  --border: rgba(11,27,51,.10);
  --shadow: 0 18px 40px rgba(0, 60, 140, .12);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(0,112,243,.14), transparent 55%),
    radial-gradient(700px 420px at 85% 10%, rgba(45,156,255,.16), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1050px; margin:0 auto; padding:28px 18px}

.topbar{
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  margin-bottom:18px;
}

.brand{
  font-weight:800;
  letter-spacing:.2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.brand::before{
  content:"";
  width:10px; height:10px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 14px rgba(0,112,243,.25);
}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(8px);
  font-size:12px;
}

.grid{display:grid; grid-template-columns: 1.2fr .8fr; gap:16px}
@media (max-width: 900px){ .grid{grid-template-columns:1fr} }

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px;
  box-shadow: var(--shadow);
}

.h1{font-size:28px; margin:0 0 6px 0; letter-spacing:-.2px}
.h2{font-size:15px; margin:0 0 10px 0; color:var(--muted); line-height:1.5}

.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}

.kpi{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:16px;
  min-width:160px;
  background: linear-gradient(180deg, rgba(0,112,243,.06), rgba(255,255,255,0));
}
.kpi b{font-size:18px}

.muted{color:var(--muted)}
.small{font-size:13px}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: #fff;
  color:var(--text);
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(0,112,243,.25);
  box-shadow: 0 10px 22px rgba(0,112,243,.12);
}
.btn:active{transform: translateY(0)}

.btn.primary{
  color:#fff;
  border-color: rgba(0,112,243,.35);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 28px rgba(0,112,243,.18);
}
.btn.primary:hover{
  box-shadow: 0 18px 34px rgba(0,112,243,.22);
}

.btn.danger{
  color:#fff;
  border-color: rgba(215,38,61,.35);
  background: linear-gradient(135deg, #d7263d, #ff4d6d);
}

.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.input{
  font-size: 16px !important;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--text);
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus{
  border-color: rgba(0,112,243,.45);
  box-shadow: 0 0 0 4px rgba(0,112,243,.12);
}

textarea.input{resize:vertical}

.hr{
  height:1px;
  background: rgba(11,27,51,.10);
  margin:14px 0;
}

.progress{
  height:11px;
  border-radius:999px;
  background: rgba(0,112,243,.10);
  overflow:hidden;
  border:1px solid rgba(0,112,243,.16);
}
.progress > div{
  height:100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width:0%;
  border-radius:999px;
}

.notice{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(0,112,243,.05);
  color: var(--text);
}
.notice.ok{
  border-color: rgba(18,185,129,.25);
  background: rgba(18,185,129,.10);
}
.notice.bad{
  border-color: rgba(215,38,61,.22);
  background: rgba(215,38,61,.08);
}

.table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  overflow:hidden;
  border-radius:14px;
}
.table th{
  text-align:left;
  color: var(--muted);
  font-weight:700;
  padding:10px;
  border-bottom:1px solid var(--border);
  background: rgba(0,112,243,.05);
}
.table td{
  padding:10px;
  border-bottom:1px solid var(--border);
}
.table tr:hover td{
  background: rgba(0,112,243,.04);
}

.pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
  background: rgba(255,255,255,.75);
}

/* ===== Admin layout (left sidebar) ===== */
.admin-layout{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:16px;
  align-items:start;
}
@media (max-width: 980px){
  .admin-layout{ grid-template-columns: 1fr; }
  .admin-sidebar{ position:relative; top:auto; }
}

.admin-sidebar{
  position: sticky;
  top: 18px;
  background: rgba(255,255,255,.85);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow);
  overflow:hidden;
}

.admin-sidebar .side-head{
  padding:16px 16px 12px 16px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,112,243,.12), rgba(45,156,255,.08));
}
.admin-sidebar .side-title{
  font-weight:900;
  letter-spacing:.1px;
  margin:0;
}
.admin-sidebar .side-sub{
  margin-top:6px;
  font-size:12px;
  color: var(--muted);
}

.admin-nav{
  display:flex;
  flex-direction:column;
  padding:10px;
  gap:6px;
}
.admin-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
  color: var(--text);
  text-decoration:none;
}
.admin-nav a:hover{
  background: rgba(0,112,243,.06);
  border-color: rgba(0,112,243,.14);
}
.admin-nav a.active{
  background: linear-gradient(135deg, rgba(0,112,243,.18), rgba(45,156,255,.12));
  border-color: rgba(0,112,243,.22);
  font-weight:800;
}

.admin-nav .nav-sep{
  height:1px;
  background: var(--border);
  margin:8px 6px;
}

.admin-main .page-title{
  margin:0 0 8px 0;
  font-size:22px;
  font-weight:900;
  letter-spacing:-.2px;
}
.admin-main .page-sub{
  margin:0 0 14px 0;
  color: var(--muted);
  line-height:1.5;
}

/* make tables scroll on small screens */
.table-wrap{ overflow:auto; border-radius:14px; border:1px solid var(--border); }
.table{ min-width: 720px; }

/* =========================================
   VIP DASHBOARD MOBILE FIX (preklapanje)
   Nalepi na kraj assets/style.css
========================================= */

/* Long emails / texts should wrap, not overflow */
.badge, .brand, .notice, .h1, .h2, td, th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* On small screens, force grid to 1 column */
@media (max-width: 900px){
  .grid { grid-template-columns: 1fr !important; }
}

/* KPI: remove min-width on mobile so they stack */
@media (max-width: 900px){
  .kpi {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* Topbar: stack properly */
@media (max-width: 700px){
  .topbar { gap: 10px; }
  .topbar .row {
    width: 100%;
    justify-content: flex-start;
  }
  .badge {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Buttons: full width on mobile */
@media (max-width: 520px){
  .row .btn, form .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Radio offers: make label clickable and not cramped */
.notice label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.notice input[type="radio"]{
  margin-top: 4px;
  transform: scale(1.15);
}

/* Reduce card padding a bit on very small screens */
@media (max-width: 420px){
  .card { padding: 14px !important; }
}

/* Ensure table wrapper is effective everywhere */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* LOGIN MOBILE FIX */
.auth-card { max-width: 520px; margin: 0 auto; }
.auth-card .row { width: 100%; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-card .badge { width: 100%; }

/* iOS zoom fix */
input,
textarea,
select {
  font-size: 16px !important;
}

/* Admin table readability */
.table th { white-space: nowrap; }
.table td { vertical-align: top; }
.td-email { max-width: 260px; overflow-wrap: anywhere; }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.actions .input { min-height: 36px; padding: 8px 10px; border-radius: 10px; }
.btn-sm { padding: 7px 10px; border-radius: 10px; font-size: 13px; min-height: 36px; }
@media (max-width: 900px){
  .td-email { max-width: 180px; }
}

.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling: touch; }
.table th{ white-space: nowrap; }
.actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.btn-sm{ padding:7px 10px; border-radius:10px; font-size:13px; min-height:36px; }
.grid3{ display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; }
@media(max-width: 900px){ .grid3{ grid-template-columns: 1fr; } }
.product-card h3{ margin:0 0 6px 0; font-size:16px; }
.price-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:baseline; }
.price-old{ color:#64748b; text-decoration: line-through; }
.price-now{ font-size:18px; font-weight:800; }
.price-vip{ font-size:18px; font-weight:900; }
.tag{ display:inline-flex; padding:6px 10px; border-radius:999px; border:1px solid var(--border); font-size:12px; color:var(--muted); }

.sidebar a.active {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
}