/* Reset & Base */
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #EBF5F0; margin: 0; color: #333; }
* { box-sizing: border-box; }

/* Layout */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.content { padding: 20px; max-width: 1200px; margin: 0 auto; width: 100%; flex: 1; }

/* Header */
.topbar { background: #fff; border-bottom: 1px solid #ddd; padding: 0 20px; height: 60px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.topbar-left { display: flex; align-items: center; gap: 20px; }
.brand { font-weight: bold; font-size: 1.2rem; color: #0047AB; }
.topnav a { text-decoration: none; color: #666; margin-right: 15px; font-weight: 500; transition: color 0.2s; }
.topnav a:hover, .topnav a.active { color: #0047AB; }
.userchip { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }

/* Page Head */
.pagehead { margin-bottom: 20px; }
.pagehead h1 { margin: 0; font-size: 1.8rem; }
.muted { color: #888; font-size: 0.9rem; }

/* Cards & Grid */
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: 2fr 1fr; }
@media (max-width: 768px) { .grid.two { grid-template-columns: 1fr; } }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #eee; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.card-head h2 { margin: 0; font-size: 1.2rem; }

/* KPI Specifics */
.card-label { font-size: 0.85rem; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.card-value { font-size: 2.5rem; font-weight: bold; color: #0047AB; line-height: 1.2; }

/* Forms & Inputs */
.form-row { margin-bottom: 15px; }
.form-row label { display: block; margin-bottom: 5px; font-size: 0.9rem; font-weight: 500; }
.form-inline { display: flex; gap: 10px; }
input[type="text"], input[type="date"], select, textarea { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }
.form-inline input { flex: 1; }

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; background-color: #0047AB; color: white; text-decoration: none; border-radius: 4px; font-weight: 500; border: none; cursor: pointer; transition: background 0.2s; font-size: 0.9rem; }
.btn:hover { background-color: #003380; }
.btn-ghost { background-color: transparent; color: #666; border: 1px solid #ccc; }
.btn-ghost:hover { background-color: #f5f5f5; color: #333; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; }
.table th { font-weight: 600; color: #444; background: #f9f9f9; }
.table .right { text-align: right; }

/* Alerts */
.flash-messages { margin-bottom: 20px; }
.alert { padding: 10px 15px; background: #d4edda; color: #155724; border-radius: 4px; border: 1px solid #c3e6cb; }
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

/* Hover efekt za redove tabele */
.table tbody tr:hover {
    background-color: #f9f9f9 !important;
}