/* =============================================
   FBF Intranet – Design System
   ============================================= */

:root {
    --navy:       #0f1f3d;
    --navy-light: #1a3260;
    --accent:     #2563eb;
    --bg:         #eef1f6;
    --paper:      #ffffff;
    --text:       #111827;
    --text-muted: #6b7280;
    --border:     #868c9a;
    --radius:     10px;
    --shadow:     0 1px 3px rgba(0,0,0,.10), 0 4px 16px rgba(0,0,0,.09);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; }

body.fbf-body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAVBAR ─────────────────────────────────── */

.fbf-navbar {
    background: var(--navy);
    min-height: 58px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.fbf-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.fbf-brand i { color: #60a5fa; font-size: 1.2rem; }

.fbf-nav-link {
    color: rgba(255,255,255,.72) !important;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.fbf-nav-link:hover { background: rgba(255,255,255,.1); color: #fff !important; }
.fbf-nav-link.active { background: rgba(255,255,255,.15); color: #fff !important; }
.fbf-nav-link.dropdown-toggle::after { margin-left: 4px; }

.fbf-dropdown {
    border-radius: var(--radius) !important;
    min-width: 200px;
    padding: 6px;
    margin-top: 6px !important;
}

.fbf-dropdown .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: .88rem;
    color: var(--text);
}

.fbf-dropdown .dropdown-item:hover { background: #f3f4f6; }
.fbf-dropdown .dropdown-divider { margin: 4px 0; }

.fbf-user-btn {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}

.fbf-user-btn:hover,
.fbf-user-btn.show { background: rgba(255,255,255,.22) !important; color: #fff !important; }

.fbf-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── PAGE / PAPER ────────────────────────────── */

.fbf-page {
    flex: 1;
    padding: 28px 20px;
}

.fbf-paper {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 28px 32px;
    animation: fbfPageIn 0.13s ease;
}

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

/* ── FOOTER ─────────────────────────────────── */

.fbf-footer {
    background: var(--paper);
    border-top: 1px solid var(--border);
    padding: 14px 20px;
    font-size: .8rem;
    color: var(--text-muted);
}

/* ── PAGE HEADER ─────────────────────────────── */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

/* ── CARDS ───────────────────────────────────── */

.card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

.card-header {
    background: #4a5568 !important;
    color: #f8f9fa !important;
    border-bottom: 1px solid #5a6478 !important;
    font-weight: 600;
    font-size: .9rem;
    padding: 12px 18px !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-header .text-muted { color: #adb5bd !important; }
.card-header .stat-label  { color: #adb5bd !important; }
.card-header .stat-value  { color: #f8f9fa !important; }
.card-header .btn-outline-secondary { color:#ced4da; border-color:#6c757d; }
.card-header .btn-outline-secondary:hover { background:#5a6478; color:#fff; border-color:#6c757d; }
.card-header .btn-outline-primary { color:#6ea8fe; border-color:#6ea8fe; }
.card-header .btn-outline-primary:hover { background:#0d6efd; color:#fff; border-color:#0d6efd; }
.card-header .btn-outline-success { color:#75b798; border-color:#75b798; }
.card-header .btn-outline-success:hover { background:#198754; color:#fff; border-color:#198754; }
.card-header .btn-outline-danger { color:#ea868f; border-color:#ea868f; }
.card-header .btn-outline-danger:hover { background:#dc3545; color:#fff; border-color:#dc3545; }
.card-header a { color:#f8f9fa; }
.card-header a:hover { color:#adb5bd; }

/* ── STAT CARDS ──────────────────────────────── */

.stat-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: box-shadow .15s;
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── TABLES ──────────────────────────────────── */

.table { font-size: .88rem; }

.table th {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 14px;
}

.table td {
    padding: 11px 14px;
    vertical-align: middle;
    border-color: var(--border);
}

.table-hover tbody tr:hover { background: #f9fafb; }

/* ── BADGES ──────────────────────────────────── */

.badge-status {
    font-size: .72rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-planned   { background: #eff6ff; color: #1d4ed8; }
.status-active    { background: #f0fdf4; color: #15803d; }
.status-done      { background: #faf5ff; color: #7e22ce; }
.status-cancelled { background: #f9fafb; color: #6b7280; }

.priority-high    { background: #fef2f2; color: #b91c1c; }
.priority-medium  { background: #fffbeb; color: #b45309; }
.priority-low     { background: #f0fdf4; color: #15803d; }

/* ── DOCHÁZKA ────────────────────────────────── */

.attendance-clock {
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    background: #fafafa;
}

.attendance-clock.clocked-in {
    border-color: #86efac;
    background: #f0fdf4;
}

.clock-time {
    font-size: 3.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
    color: var(--navy);
}

/* ── KANBAN ──────────────────────────────────── */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

.kanban-col {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.kanban-col-header {
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: box-shadow .15s, transform .1s;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

.kanban-card-title {
    font-weight: 500;
    font-size: .88rem;
    margin-bottom: 8px;
}

.kanban-card-meta {
    font-size: .76rem;
    color: var(--text-muted);
}

/* ── KALENDÁŘ ────────────────────────────────── */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cal-header-cell {
    text-align: center;
    font-weight: 700;
    font-size: .72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 2px;
    letter-spacing: .04em;
}

.cal-cell {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 82px;
    padding: 6px;
}

.cal-cell.today { border-color: var(--accent); background: #eff6ff; }
.cal-cell.other-month { background: #f9fafb; opacity: .55; }

.cal-day-num {
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 3px;
}

.cal-cell.today .cal-day-num {
    background: var(--accent);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
}

.cal-event {
    font-size: .7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.event-meeting  { background: #dbeafe; color: #1e40af; }
.event-deadline { background: #fee2e2; color: #b91c1c; }
.event-event    { background: #dcfce7; color: #15803d; }
.event-holiday  { background: #fef9c3; color: #854d0e; }

/* ── LOGIN ───────────────────────────────────── */

.fbf-login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--paper);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo i { font-size: 2.6rem; color: var(--accent); }
.login-logo h1 { font-size: 1.4rem; font-weight: 800; margin: 10px 0 4px; color: var(--navy); }

/* ── RESPONSIVE ──────────────────────────────── */

@media (max-width: 991.98px) {
    .fbf-page { padding: 16px 12px; }
    .fbf-paper { padding: 20px 16px; border-radius: 10px; }
    .kanban-board { grid-template-columns: 1fr; }
    .cal-cell { min-height: 50px; padding: 4px; }
}
