/* =========================
   Base
========================= */
:root{
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;

  --blue: #2563eb;
  --blue2: #1d4ed8;

  --danger: #ef4444;
  --danger2:#dc2626;

  --radius: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Links */
a{ color:inherit; text-decoration:none; }

/* =========================
   Header (Top)
========================= */
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top:0;
  z-index:10;
}

.brand-wrapper{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-logo{
  height:36px;
  width:auto;
}

.brand-text{
  font-size:20px;
  font-weight:800;
  letter-spacing:-0.3px;
}

.brand-text .kod{ color: var(--blue); }
.brand-text .marina{ color:#475569; font-weight:700; }

/* =========================
   Layout + Sidebar
========================= */
.layout{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding: 18px;
}

.sidebar{
  width: 280px;
  flex: 0 0 280px;
}

.container{
  width: 100%;
  max-width: 1200px;
}

.nav a{
  display:block;
  padding: 10px 12px;
  border-radius: 10px;
  color:#0f172a;
  border: 1px solid transparent;
}

.nav a:hover{
  background:#f1f5f9;
  border-color:#e2e8f0;
}

.nav a.active{
  background:#eff6ff;
  border-color: rgba(37,99,235,.25);
  color: var(--blue);
  font-weight:700;
}

/* =========================
   Cards / separators / text
========================= */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
}

.sep{
  height:1px;
  background: var(--line);
  margin: 14px 0;
}

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

/* =========================
   Forms
========================= */
label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}

input, select, textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  outline: none;
  color: var(--text);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

textarea{ min-height: 110px; }

/* =========================
   Buttons / badges
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor:pointer;
  font-weight: 600;
}

.btn:hover{
  background:#f8fafc;
}

.btn-primary{
  background: var(--blue);
  border-color: var(--blue);
  color:#fff;
}

.btn-primary:hover{
  background: var(--blue2);
  border-color: var(--blue2);
}

.btn-danger{
  background: #fff;
  border-color: rgba(239,68,68,.35);
  color: var(--danger2);
}

.btn-danger:hover{
  background: #fef2f2;
  border-color: rgba(239,68,68,.6);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(37,99,235,.20);
  background: #eff6ff;
  color: var(--blue);
  font-weight:700;
}

/* =========================
   Tables
========================= */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 12px;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  color: #475569;
  font-weight: 800;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.table tbody td{
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.table tbody tr:hover{
  background: #fbfdff;
}

/* =========================
   Grid helpers
========================= */
.grid{
  display:grid;
  gap: 12px;
}

.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }

/* =========================
   Responsive
========================= */
@media (max-width: 980px){
  .layout{ flex-direction: column; }
  .sidebar{ width:100%; flex: 1 1 auto; }
  .container{ max-width: 100%; }
}

@media (max-width: 780px){
  .grid-2{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
}
