.d-none{display:none!important;}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg:#0b1220;
  --panel:#0f172a;
  --panel2:#111b33;
  --card:#ffffff;
  --muted:#6b7280;
  --border: rgba(15, 23, 42, 0.10);
  --accent:#4f46e5;
}

html,body{height:100%;}
body{
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f7fb;
  margin:0;
}

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

.login-overlay{
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 20% 15%, rgba(79,70,229,0.28), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(56,189,248,0.22), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  padding: 24px;
  overflow: auto;
  z-index: 2000;
}

.login-overlay .card{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  backdrop-filter: blur(10px);
}

.login-overlay .form-control{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color:#fff;
}
.login-overlay .form-control::placeholder{ color: rgba(255,255,255,0.65); }
.login-overlay .btn-dark{
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
  border: 0;
}
.login-overlay .btn-dark:hover{ filter: brightness(1.05); }

/* FIXED SIDEBAR */
.sidebar{
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);
  border-right: 1px solid rgba(255,255,255,0.06);

  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.content{
  min-height: 100vh;
  background: transparent;

  margin-left: 260px;
  width: calc(100% - 260px);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-mark{
  width:44px;
  height:44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing: .5px;
  background: linear-gradient(135deg, rgba(79,70,229,1) 0%, rgba(124,58,237,1) 100%);
  box-shadow: 0 10px 24px rgba(79,70,229,0.25);
}
.brand-name{ font-weight: 700; line-height:1; }
.brand-sub{ font-size: 12px; color: rgba(255,255,255,0.65); margin-top:2px; }

.sidebar .nav-link{
  border-radius: 12px;
  padding: .55rem .75rem;
  color: rgba(255,255,255,0.86) !important;
  transition: all .15s ease;
}
.sidebar .nav-link:hover{
  background: rgba(255,255,255,0.08);
  color:#fff !important;
}
.sidebar .nav-link.active{
  background: rgba(79,70,229,0.25);
  color:#fff !important;
  border: 1px solid rgba(79,70,229,0.35);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,247,251,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  padding: 16px 22px;
}
.topbar-title{ font-size: 18px; font-weight: 700; }
.topbar-sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.content-inner{
  background: transparent;
}

.card{
  border: 1px solid var(--border);
  border-radius: 16px;
  background:#fff;
}
.shadow-sm{ box-shadow: 0 10px 24px rgba(15,23,42,0.06) !important; }

.table{
  background:#fff;
  border-radius: 16px;
  overflow: hidden;
}
.table thead th{ white-space: nowrap; border-top: 0; }
.table td, .table th{ border-color: rgba(15,23,42,0.08); }

.sticky-actions{
  position: sticky;
  top: 86px;
  z-index: 20;
  background: rgba(246,247,251,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 16px;
  padding: 14px 14px;
  margin-bottom: 14px;
}

.money-input { min-width: 110px; }
.name-input { min-width: 220px; }

.cell-paid { background-color: rgba(34,197,94,0.12) !important; }
.cell-unpaid { background-color: rgba(245,158,11,0.14) !important; }

.badge{ border-radius: 999px; }

.btn{ border-radius: 12px; }
.btn-outline-light{ border-color: rgba(255,255,255,0.24) !important; }

/* Compact tables */
.table-sm td, .table-sm th { padding: .35rem .45rem; }
.table { font-size: 13px; }
.form-control-sm { height: calc(1.4em + .5rem + 2px); padding: .2rem .4rem; font-size: 13px; border-radius: 10px; }
.btn-sm { padding: .25rem .55rem; border-radius: 10px; }
.table tbody tr:hover { background: rgba(15,23,42,0.03); }

/* Simple checkbox */
.mt-check { width: 16px; height: 16px; cursor: pointer; }
.mt-check-wrap { display:flex; align-items:center; justify-content:center; }

/* Numeric inputs narrower */
.money-input { min-width: 92px; width: 92px; }
.name-input { min-width: 190px; }

/* Premium headers + stat cards */
.page-hero{
  border-radius: 18px;
  padding: 16px 16px;
  border: 1px solid rgba(15,23,42,0.08);
  background:
    radial-gradient(900px 380px at 12% 10%, rgba(79,70,229,0.18), transparent 55%),
    radial-gradient(900px 380px at 88% 0%, rgba(56,189,248,0.14), transparent 52%),
    linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.86) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 42px rgba(15,23,42,0.08);
  margin-bottom: 14px;
}
.page-hero-title{
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.page-hero-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.page-hero-actions .btn{ box-shadow: 0 10px 22px rgba(15,23,42,0.08); }

.kpi-row{ margin-top: 10px; }
.kpi-pill{
  border-radius: 999px;
  padding: 8px 15px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.88);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  margin-top: 6px;
}
.kpi-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(79,70,229,0.9);
  box-shadow: 0 8px 18px rgba(79,70,229,0.25);
}
.kpi-dot.green{ background: rgba(34,197,94,0.9); box-shadow: 0 8px 18px rgba(34,197,94,0.22); }
.kpi-dot.orange{ background: rgba(245,158,11,0.9); box-shadow: 0 8px 18px rgba(245,158,11,0.22); }
.kpi-dot.red{ background: rgba(239,68,68,0.9); box-shadow: 0 8px 18px rgba(239,68,68,0.22); }

.stat-card{
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background:
    radial-gradient(800px 360px at 10% 0%, rgba(79,70,229,0.14), transparent 55%),
    radial-gradient(700px 320px at 90% 0%, rgba(56,189,248,0.12), transparent 50%),
    #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,0.08);
  overflow: hidden;
}
.stat-card .stat-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 8px;
}
.stat-card .stat-label{ font-size: 17px; color: var(--muted);font-weight: 800; }
.stat-card .stat-value{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
}
.stat-card .stat-meta{ font-size: 12px; color: var(--muted); }
.stat-badge{
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.88);
}
.stat-icon{
  width: 42px; height: 42px; border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(79,70,229,1) 0%, rgba(124,58,237,1) 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(79,70,229,0.22);
  font-weight: 900;
}

.premium-table thead{
  background: linear-gradient(90deg,#eef2ff,#f0f9ff);
}
.premium-table th{
  font-weight:600;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.4px;
  color:#475569;
}
.premium-table tbody tr{
  transition:all .15s ease;
}
.premium-table tbody tr:hover{
  background:#f8fafc;
}

.stat-value, .kpi-pill { font-variant-numeric: tabular-nums; }

/* Mobile fallback: sidebar ide gore (da ne pojede ekran) */
@media (max-width: 767.98px){
  .sidebar{
    position: static;
    width: 100%;
    height: auto;
    min-height: auto;
  }
  .content{
    margin-left: 0;
    width: 100%;
  }
}
.table td, .table th {
  border-top: none;
}


/* ===== Premium delete X button ===== */
.delete-x-btn{
  width:34px;height:34px;
  border-radius:10px;
  border:1px solid rgba(220,53,69,.55);
  background:rgba(220,53,69,.06);
  color:#dc3545;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  line-height:1;
  transition:all .12s ease;
}
.delete-x-btn:hover{
  background:#dc3545;
  color:#fff;
  border-color:#dc3545;
  transform:translateY(-1px);
}
.delete-x-btn:active{transform:translateY(0);}

/* ===== Lightweight modal (no Bootstrap JS needed) ===== */
.mt-modal-backdrop{
  position:fixed; inset:0;
  background:rgba(10,15,25,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:2000;
}
.mt-modal{
  width:100%;
  max-width:460px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  overflow:hidden;
}
.mt-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.mt-modal-title{font-weight:900;}
.mt-modal-close{
  width:34px;height:34px;border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  font-size:22px; line-height:1;
  display:flex; align-items:center; justify-content:center;
}
.mt-modal-close:hover{background:rgba(0,0,0,.04);}
.mt-modal-body{padding:14px 16px; color:#222;}
.mt-modal-footer{
  padding:12px 16px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top:1px solid rgba(0,0,0,.06);
}
/* ===== Mobile polish ===== */
@media (max-width: 991.98px) {
  /* Sidebar kao top bar */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    height: auto;
    min-height: auto;
    padding: 10px 12px;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Content full width */
  .content {
    margin-left: 0 !important;
    padding: 14px !important;
  }

  /* Nav linkovi kompaktniji */
  .sidebar .nav-link {
    padding: 10px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
  }

  /* Page hero */
  .page-hero {
    padding: 14px !important;
  }

  .page-hero-actions .btn,
  .page-hero .btn {
    width: 100%;
  }

  /* KPI pills u dve kolone */
  .kpi-row {
    gap: 8px !important;
  }
  .kpi-pill {
    width: calc(50% - 4px);
    justify-content: space-between;
  }

  /* Tabele: malo manji font + padding */
  .premium-table th,
  .premium-table td {
    padding: .55rem .55rem;
    font-size: 13px;
  }

  /* Inputi u tabelama uži */
  .premium-table .form-control-sm {
    height: calc(1.4em + .5rem + 2px);
    padding: .25rem .5rem;
    font-size: 13px;
  }

  /* Delete X dugme malo manje */
  .delete-x-btn {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 575.98px) {
  /* KPI u jednu kolonu na baš malim ekranima */
  .kpi-pill {
    width: 100%;
  }
}
/* ===== Mobile app drawer ===== */
.sidebar-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 1040;
}

@media (max-width: 991.98px){
  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  }

  /* content full width on mobile */
  .content{
    width: 100%;
  }

  /* when open */
  body.sidebar-open .sidebar{
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-overlay{
    opacity: 1;
    pointer-events: auto;
  }

  /* nav links more "app-like" */
  .sidebar .nav-link{
    padding: .75rem .85rem;
    border-radius: 14px;
    margin-bottom: 8px;
    font-weight: 600;
  }
}