/* ============================================================
   style.css  |  Cestná sieť – minimalistický dizajn
   ============================================================ */

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:   #1a4fa0;
    --primary-d: #0f3070;
    --accent:    #e8a020;
    --bg:        #f5f6fa;
    --white:     #ffffff;
    --text:      #1e2532;
    --muted:     #6b7280;
    --border:    #dde1ea;
    --success:   #16a34a;
    --danger:    #dc2626;
    --radius:    8px;
    --shadow:    0 2px 8px rgba(0,0,0,.08);
    --nav-h:     64px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Navigation ────────────────────────────────────────── */
nav {
    background: var(--primary);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo-badge {
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: .5px;
}
.nav-title {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.nav-links a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: background .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,.15);
    color: var(--white);
}
.nav-user {
    color: rgba(255,255,255,.8);
    font-size: 13px;
    border-left: 1px solid rgba(255,255,255,.2);
    padding-left: 16px;
}

/* ─── Layout ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 26px; font-weight: 600; color: var(--text); }
.page-header p  { color: var(--muted); margin-top: 4px; font-size: 14px; }

/* ─── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.card-header h2 { font-size: 17px; font-weight: 600; }

/* ─── Stats grid ─────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
    background: var(--bg);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
}
tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f9faff; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-A { background: #dbeafe; color: #1e40af; }
.badge-B { background: #d1fae5; color: #065f46; }
.badge-C { background: #fef3c7; color: #92400e; }
.badge-D { background: #f3f4f6; color: #374151; }
.badge-yes { background: #fee2e2; color: #991b1b; }
.badge-no  { background: #f0fdf4; color: #166534; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,79,160,.12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger  { background: var(--danger);  color: var(--white); }
.btn-danger:hover  { background: #b91c1c; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ─── Filter bar ─────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ─── Alert ──────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }

/* ─── Hero (dashboard) ───────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
    color: var(--white);
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 32px;
}
.hero h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.hero p   { font-size: 16px; opacity: .85; }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}
.pagination a, .pagination span {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
    background: var(--white);
}
.pagination a:hover   { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination .current  { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ─── Slider (responsive effects) ───────────────────────── */
.info-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 28px;
    height: 140px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-slider .slide {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    width: 100%;
    padding: 24px;
    animation: fadeIn .5s;
}
.info-slider .slide.active { display: flex; }
.info-slider .slide h3  { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.info-slider .slide p   { font-size: 14px; opacity: .85; }
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: -10px;
    padding-bottom: 12px;
}
.slider-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background .2s;
}
.slider-dots span.active { background: var(--primary); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Login page ─────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-box .logo-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    nav { gap: 12px; }
    .nav-title { font-size: 15px; }
    .hero h1 { font-size: 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .container { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
}
