:root {
    /* Hlavní paleta - čistý, luxusní look podle specifikace */
    --primary: #32aae1;
    --primary-dark: #2087b7;
    --bg-light: #f4f7fb;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --white: #ffffff;
    --border: #e8ecf1;
    
    /* Sekundární stavové barvy */
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    
    /* Stínování pro hloubku a Glassmorphism */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 8px 16px rgba(50, 170, 225, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, system-ui, sans-serif; background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* GLOBÁLNÍ UTILITY */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.bg-primary-light { background-color: rgba(50, 170, 225, 0.1); }
.bg-success-light { background-color: rgba(46, 204, 113, 0.1); }
.bg-danger-light { background-color: rgba(231, 76, 60, 0.1); }
.bg-warning-light { background-color: rgba(243, 156, 18, 0.1); }
.fs-small { font-size: 0.85em; }

/* TLAČÍTKA */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); border: none; text-decoration: none; gap: 8px; letter-spacing: 0.2px; }
.btn-primary { background: linear-gradient(145deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 15px rgba(50, 170, 225, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(50, 170, 225, 0.35); }

/* AUTH LAYOUT (Login) */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5f7fa 0%, #e1f2fb 100%); padding: 20px; }
.auth-card { background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(20px); max-width: 440px; width: 100%; border-radius: 20px; box-shadow: var(--shadow-md); padding: 48px; border: 1px solid rgba(255,255,255,0.4); }
.auth-header { text-align: center; margin-bottom: 35px; }
.auth-header h1 { color: var(--primary); font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 5px; }
.form-group { margin-bottom: 24px; }
.form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #4a5568; }
.form-control { width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; background-color: #f8fafc; transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--primary); background-color: var(--white); box-shadow: 0 0 0 4px rgba(50, 170, 225, 0.15); }

/* ALERTOVÉ HLÁŠKY */
.alert { padding: 14px 20px; border-radius: 10px; margin-bottom: 25px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 12px; animation: fadeInDown 0.3s ease-out; box-shadow: var(--shadow-sm); }
.alert-danger { background-color: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.alert-success { background-color: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* APP LAYOUT - NÁSTĚNKA A NAVIGACE */
.app-body { background: var(--bg-light); }

/* Top Navigace */
.top-nav { background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 25px; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { font-size: 22px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 12px; letter-spacing: -0.5px; white-space: nowrap; }
.nav-menu { display: flex; list-style: none; gap: 8px; height: 100%; align-items: center; margin-left: 30px;}
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link { color: #5c6b7a; text-decoration: none; font-weight: 500; padding: 10px 16px; border-radius: 8px; transition: var(--transition); display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; }
.nav-link:hover, .nav-item.active .nav-link { background: var(--bg-light); color: var(--primary); }

/* Dropdown v Menu */
.dropdown-menu { display: none; position: absolute; top: calc(100% - 5px); left: 0; background: var(--white); min-width: 240px; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border: 1px solid var(--border); list-style: none; padding: 10px 0; z-index: 1001; }
.dropdown-menu.dropdown-menu-right { left: auto; right: 0; }
.dropdown.active .dropdown-menu { display: block; animation: fadeInUp 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-menu li a { display: flex; padding: 12px 20px; color: var(--text-main); text-decoration: none; font-size: 14px; transition: background 0.2s; align-items: center; gap: 12px; font-weight: 500; white-space: nowrap; }
.dropdown-menu li a:hover { background: var(--bg-light); color: var(--primary); }
.dropdown-menu li a i { width: 20px; text-align: center; color: var(--text-muted); transition: color 0.2s;}
.dropdown-menu li a:hover i { color: var(--primary); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 8px 0; }

/* User Pravý Panel */
.nav-user { display: flex; align-items: center; margin-left: auto; }
.user-info { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 12px; border-radius: 12px; transition: var(--transition); border: 1px solid transparent; white-space: nowrap;}
.user-info:hover { background: var(--bg-light); border-color: var(--border); }
.user-info .user-name-wrapper { text-align: right; line-height: 1.2; }
.user-info .user-name { font-weight: 600; font-size: 14px; color: var(--text-main); display: block; }
.user-info .avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; box-shadow: 0 4px 10px rgba(50, 170, 225, 0.3); flex-shrink: 0; }

/* RESPOZIVITA HLAVIČKY NA LAPTOPY A MENŠÍ MONITORRY */
@media (max-width: 1280px) {
    .nav-container { padding: 0 15px; }
    .nav-menu { gap: 2px; margin-left: 15px; }
    .nav-link { padding: 8px 10px; font-size: 13.5px; gap: 6px; }
    .nav-logo { font-size: 18px; gap: 8px; }
}

@media (max-width: 1024px) {
    .nav-link span, .nav-logo span { display: none; } /* V kritickém stavu skryje text u ikon, pokud je označen */
    .user-info .user-name-wrapper { display: none; } /* Skryje jméno na malém ntb, zbude jen kulatý avatar */
    .user-info { padding: 4px; border: none; }
}

/* MAIN DASHBOARD (Nástěnka) */
.app-main { padding: 35px 20px; }
.container { max-width: 1400px; margin: 0 auto; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 35px; }
.page-title { font-size: 26px; color: var(--text-main); margin-bottom: 6px; font-weight: 700; letter-spacing: -0.5px;}

/* CSS Grid na Karty */
.grid { display: grid; gap: 24px; }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.layout-grid { grid-template-columns: 2fr 1fr; }
@media (max-width: 992px) { .layout-grid { grid-template-columns: 1fr; } }

/* Komponenta Karty/Widgetu */
.card { background: var(--white); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-card); border: 1px solid var(--border); }
.card-title { font-size: 17px; margin-bottom: 24px; color: var(--text-main); font-weight: 600; display: flex; align-items: center; gap: 10px;}
.widget-card { display: flex; align-items: center; gap: 20px; transition: transform 0.2s; }
.widget-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.widget-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.widget-info h3 { font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.widget-value { font-size: 26px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 12px; line-height: 1;}
.trend.up { color: var(--success); font-size: 13px; font-weight: 600; background: var(--bg-success-light); padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;}

/* Tabulky Nástěnky */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; background: #fafbfc;}
.table td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--text-main); font-weight: 500;}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background-color: #f8fafc; }

/* Kompaktní Listy notifikací */
.notification-list { list-style: none; }
.notification-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); transition: background 0.2s;}
.notification-item:first-child { padding-top: 0; }
.notification-item:last-child { padding-bottom: 0; border-bottom: none; }
.notif-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.notif-content p { font-size: 14px; margin-bottom: 6px; line-height: 1.5; color: var(--text-main);}
.notif-time { font-size: 12.5px; color: var(--text-muted); font-weight: 500;}
