:root {
    /* Hlavní barvy */
    --bg-body: #f8fafc;       /* Jemná šedá */
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    
    --text-main: #0f172a;     /* Tmavá břidlicová */
    --text-muted: #64748b;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --border: #e2e8f0;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ca8a04;

    --radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    flex-shrink: 0; z-index: 10;
}

.brand {
    height: 64px;
    display: flex; align-items: center; padding: 0 24px;
    font-size: 18px; font-weight: 800; color: var(--text-main);
    border-bottom: 1px solid var(--border);
}

.nav-menu { flex: 1; padding: 20px 12px; overflow-y: auto; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 4px;
    color: var(--text-muted); text-decoration: none;
    font-weight: 500; border-radius: var(--radius);
    transition: all 0.2s;
}
.nav-link:hover { background: #f1f5f9; color: var(--text-main); }
.nav-link.active { background: var(--primary-light); color: var(--primary); }
.nav-link .material-symbols-rounded { font-size: 22px; }

/* Sidebar Footer (Profi vzhled) */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-mini { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-mini-avatar { 
    width: 32px; height: 32px; border-radius: 50%; 
    background: var(--primary); color: white; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 700; font-size: 12px; object-fit: cover;
}
.user-mini-info { display: flex; flex-direction: column; min-width: 0; }
.user-mini-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini-role { font-size: 11px; color: var(--text-muted); }

.sidebar-actions { display: flex; gap: 5px; }

/* --- Layout --- */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; background: var(--bg-body);
}
.top-bar {
    height: 64px; background: white;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 32px;
}
.scroll-area { padding: 32px; overflow-y: auto; flex: 1; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; /* Standardizovaná výška */
    padding: 0 16px;
    font-weight: 600; font-size: 13px;
    border-radius: var(--radius); border: 1px solid transparent;
    cursor: pointer; transition: 0.2s; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline { background: white; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--text-muted); background: #f8fafc; }

.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }

/* Kulatá tlačítka (Icon only) */
.btn-icon {
    width: 36px; height: 36px;
    padding: 0;
    border-radius: 50%; /* Kolečko */
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    border: 1px solid transparent;
}
.btn-icon:hover { background: #f1f5f9; color: var(--text-main); }
.btn-icon.active { background: var(--primary-light); color: var(--primary); }

/* --- TABLE FIXES --- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { 
    text-align: left; padding: 12px 16px; 
    background: #f8fafc; 
    border-bottom: 1px solid var(--border); 
    font-weight: 600; color: var(--text-muted); 
    position: sticky; top: 0; /* Sticky header */
}
.table td { 
    padding: 12px 16px; 
    border-bottom: 1px solid var(--border); 
    background: white; 
    vertical-align: middle; 
}
.table tr:hover td { background-color: #f8fafc; }

/* Akční tlačítka vedle sebe */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Zarovnání doprava */
    gap: 8px; /* Mezera mezi ikonkami */
}

/* Kulatý Avatar v tabulce */
.avatar-group { display: flex; align-items: center; gap: 12px; }
.tbl-avatar {
    width: 36px; height: 36px;
    border-radius: 50%; /* Kolečko */
    object-fit: cover;
    background: #e2e8f0;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- FORMS & INPUTS --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 6px; color: var(--text-main); }
.form-control {
    width: 100%; padding: 10px 12px; font-size: 14px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: white; color: var(--text-main);
    transition: border 0.2s, box-shadow 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* --- RADIO CARDS FIX --- */
.radio-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); 
    gap: 12px; 
}
.rc-item { position: relative; cursor: pointer; }
.rc-item input { position: absolute; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2; }
.rc-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 16px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: white; transition: 0.2s;
    text-align: center; height: 100%;
}
.rc-item input:checked + .rc-content {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.rc-item:hover .rc-content { border-color: var(--text-muted); }

/* --- CHECKBOX (SWITCH) FIX --- */
.switch-wrapper {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: #ffffff;
}
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute; content: "";
    height: 20px; width: 20px;
    left: 2px; bottom: 2px;
    background-color: white; transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* --- Badges --- */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-primary { background: #dbeafe; color: #1e40af; }