/* ============================================
   UPT E-Računi — Base CSS
   Brand color: #1B4D89 (dublja plava)
   Family: Inter (sans-serif)
   ============================================ */

/* Reset i osnove */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Varijable */
:root {
  --brand: #1B4D89;
  --brand-dark: #0C447C;
  --brand-light: #E6F1FB;

  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #999;
  --text-inverse: #fff;

  --surface-1: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #eef1f5;

  --border: #e0e4e8;
  --border-strong: #cbd0d6;

  --success: #1D9E75;
  --success-bg: #E1F5EE;
  --success-text: #085041;

  --warning: #EF9F27;
  --warning-bg: #FAEEDA;
  --warning-text: #633806;

  --danger: #993C1D;
  --danger-bg: #FAECE7;
  --danger-text: #66200B;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.15);
}

/* Tipografija */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Utility klase */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-brand { color: var(--brand); }

/* Flash poruke */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-info {
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1px solid #B8D6EE;
}

.flash-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #E5A99C;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #A8DDC7;
}
/* ============================================
   Layout — App shell sa sidebar-om
   ============================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--surface-2);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  width: 240px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

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

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: white;
  font-size: 13px;
}

.sidebar-brand-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-brand-domain {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 0 12px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 8px 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 16px;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-item:hover {
  background: var(--surface-3);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-item.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 500;
}

.sidebar-item-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-item-badge {
  margin-left: auto;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.sidebar-help {
  margin: 20px 12px;
  padding: 12px;
  background: var(--brand-light);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.sidebar-help:hover {
  text-decoration: none;
}

.sidebar-help-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.sidebar-help-text {
  font-size: 11px;
  color: var(--brand);
}

.sidebar-user {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-user-menu {
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* ============================================
   Main content area
   ============================================ */

.main-content {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.page-heading {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

.page-subheading {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-pill-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
