/* 
 * Hearth Team - Hlavní stylopis (Světlý režim / Light Mode)
 * Kompletně přepracováno pro rozvržení s postranním panelem (Sidebar Layout).
 */

/* --- CSS Proměnné & Design System --- */
:root {
    --bg-darker: #f8fafc;      /* Pozadí sidebaru, vstupů a sekundárních karet */
    --bg-dark: #f1f5f9;        /* Hlavní pozadí obsahu */
    --bg-card: #ffffff;        /* Pozadí karet, hlavního panelu */
    --border-color: #cbd5e1;    /* Standardní okraje */
    --border-light: #e2e8f0;    /* Jemné dělicí čáry */
    
    --primary: #ea580c;        /* Oranžová / měděná (Hearthstone krb) */
    --primary-hover: #c2410c;
    --primary-glow: rgba(234, 88, 12, 0.12);
    
    --secondary: #f1f5f9;
    --secondary-hover: #e2e8f0;
    --text-main: #0f172a;      /* Hlavní tmavý text */
    --text-muted: #475569;     /* Šedý doplňkový text */
    
    /* Písma */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Ostatní */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -1px rgba(0,0,0,0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
}

body.dark-theme {
    --bg-darker: #0f172a;      /* Pozadí sidebaru, vstupů a sekundárních karet */
    --bg-dark: #020617;        /* Hlavní pozadí obsahu */
    --bg-card: #1e293b;        /* Pozadí karet, hlavního panelu */
    --border-color: #334155;    /* Standardní okraje */
    --border-light: #1e293b;    /* Jemné dělicí čáry */
    
    --primary: #f97316;        /* Oranžová / měděná (Hearthstone krb) */
    --primary-hover: #ea580c;
    --primary-glow: rgba(249, 115, 22, 0.15);
    
    --secondary: #1e293b;
    --secondary-hover: #334155;
    --text-main: #f8fafc;      /* Hlavní světlý text */
    --text-muted: #94a3b8;     /* Šedý doplňkový text */
}

/* --- Reset & Základní styly --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
}

body.logged-in {
    overflow: hidden; /* Skrolování se přesouvá do .main-viewport */
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

/* --- Tlačítka --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #c2410c 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(234, 88, 12, 0.25);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #9a3412 100%);
}

.btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-block {
    width: 100%;
}

/* =================================================================
 * APPLIKAČNÍ LAYOUT (Sidebar vlevo, obsah vpravo)
 * ================================================================= */

.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* --- SIDEBAR PANEL --- */
.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.01);
}

.sidebar-brand {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-brand .logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.sidebar-brand .logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-section-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    opacity: 0.75;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    padding-left: 1rem;
}

.sidebar-section-title:first-child {
    margin-top: 0;
}

.sidebar-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.sidebar-tab .tab-icon {
    font-size: 1.1rem;
}

.sidebar-tab:hover {
    color: var(--text-main);
    background-color: var(--bg-darker);
}

.sidebar-tab.active {
    color: var(--primary);
    background-color: rgba(234, 88, 12, 0.06);
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-darker);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-container {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-details .username {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: #ef4444;
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background-color: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.1);
    transition: var(--transition);
}

.btn-logout:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

/* --- PRAVÝ HLAVNÍ VIEWPORT --- */
.main-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-dark);
}

.main-content {
    flex: 1;
    padding: 2.5rem;
}

.main-content-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header {
    display: none; /* Skryto na desktopu */
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.app-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

/* =================================================================
 * MECHANISMUS ZÁLOŽEK (Tab Switching)
 * ================================================================= */

.dashboard-tab-content {
    display: none; /* Skryto ve výchozím stavu */
}

.dashboard-tab-content.active {
    display: block; /* Zobrazeno, pokud je záložka aktivní */
    animation: fadeIn 0.2s ease-out;
}

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

/* =================================================================
 * ZÁLOŽKA 1: KANBAN BOARD
 * ================================================================= */

.kanban-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-info h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.header-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.kanban-board {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 270px;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kanban-column.drag-over {
    background-color: var(--secondary-hover);
    border-color: var(--primary);
    transform: scale(1.01);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.column-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.column-count {
    background-color: var(--border-color);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
}

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 400px;
}

.empty-column-placeholder {
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
    text-align: center;
    padding: 2.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-style: italic;
    background-color: rgba(255, 255, 255, 0.1);
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
    opacity: 0.4;
}

.col-todo .kanban-card { border-left: 4px solid #3b82f6; }
.col-progress .kanban-card { border-left: 4px solid #ea580c; }
.col-review .kanban-card { border-left: 4px solid #f59e0b; }
.col-done .kanban-card { border-left: 4px solid #10b981; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.card-id {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--bg-darker);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
}

.btn-delete-task {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.15rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-delete-task:hover {
    background-color: #fee2e2;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px dashed var(--border-light);
    padding-top: 0.6rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-text-author {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.due-date.overdue {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
}

.due-date.overdue .meta-text {
    color: #b91c1c;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.85rem;
    border-top: 1px solid var(--border-light);
    padding-top: 0.6rem;
}

.btn-move-left, .btn-move-right {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-move-left:hover, .btn-move-right:hover {
    background-color: var(--secondary-hover);
    color: var(--primary);
    border-color: var(--primary);
}

/* =================================================================
 * ZÁLOŽKA 2: SOUPISKA ČLENŮ TÝMU
 * ================================================================= */

.team-list-section {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header-compact h2 {
    font-size: 2rem;
    font-weight: 800;
}

.member-count-badge {
    background-color: rgba(234, 88, 12, 0.1);
    color: var(--primary);
    border: 1px solid rgba(234, 88, 12, 0.2);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    background-color: var(--bg-darker);
    padding: 1.25rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    vertical-align: middle;
}

.member-row {
    transition: var(--transition);
}

.member-row:hover {
    background-color: rgba(234, 88, 12, 0.01);
}

.member-row:last-child td {
    border-bottom: none;
}

.member-profile-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar-container {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background-color: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.member-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.member-name {
    font-weight: 600;
    color: var(--text-main);
}

.badge-member {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* =================================================================
 * ZÁLOŽKA 3: TURNAJE & KALENDÁŘ
 * ================================================================= */

.tournaments-section {
    max-width: 1100px;
    margin: 0 auto;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

.tournament-list-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.tournament-list-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.75rem;
}

.events-list, .results-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.event-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed var(--border-light);
}

.event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-date-box {
    width: 60px;
    height: 65px;
    border-radius: var(--radius-md);
    background-color: var(--primary-glow);
    border: 1px solid rgba(234, 88, 12, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-date-box .day {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.event-date-box .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-details h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.event-details .time-loc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge-training { background-color: rgba(59, 130, 246, 0.1); border: 1px solid #93c5fd; color: #1d4ed8; }
.badge-cup { background-color: rgba(245, 158, 11, 0.1); border: 1px solid #fcd34d; color: #b45309; }
.badge-war { background-color: rgba(139, 92, 246, 0.1); border: 1px solid #c7d2fe; color: #4338ca; }

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background-color: var(--bg-darker);
}

.result-item.win { border-left: 4px solid #10b981; }
.result-item.loss { border-left: 4px solid #ef4444; }

.match-info {
    display: flex;
    flex-direction: column;
}

.match-info .opponent {
    font-weight: 700;
    font-size: 0.95rem;
}

.match-info .format {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.match-score {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
}

.badge-win { background-color: rgba(16, 185, 129, 0.1); border: 1px solid #a7f3d0; color: #047857; }
.badge-loss { background-color: rgba(239, 68, 68, 0.1); border: 1px solid #fca5a5; color: #b91c1c; }

/* =================================================================
 * ZÁLOŽKA 4: SPRÁVA DATABÁZE & ADMINER
 * ================================================================= */

.database-section {
    max-width: 1000px;
    margin: 0 auto;
}

.db-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

.db-status-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.db-status-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.75rem;
}

.db-details-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.db-details-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-light);
}

.db-details-list li span {
    color: var(--text-muted);
}

.db-action-block {
    text-align: center;
    background-color: var(--bg-darker);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.db-action-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.warning-card {
    border-left: 4px solid #f59e0b;
}

.warning-card h3 {
    color: #b45309;
}

.warning-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.warning-bullets {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =================================================================
 * PŘIHLAŠOVACÍ OBRAZOVKA (Vždy vycentrovaná bez sidebaru)
 * ================================================================= */

.logged-out .main-content-full {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.03) 0%, var(--bg-dark) 70%);
}

/* =================================================================
 * MODÁLNÍ DIALOGY A FORMULÁŘE (Zůstávají shodné)
 * ================================================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-close-modal:hover {
    color: var(--primary);
}

.task-form textarea, .task-form select {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}

.modal-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* =================================================================
 * RESPONSIVITA PRO SIDEBAR LAYOUT
 * ================================================================= */

@media (max-width: 992px) {
    .tournaments-grid, .db-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -280px; /* Skrytý sidebar ve výchozím stavu na mobilu */
        top: 0;
        height: 100vh;
        transition: var(--transition);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        left: 0; /* Vysunutí sidebaru */
    }
    
    .main-viewport {
        height: calc(100vh - 60px); /* Odečteme výšku mobilní hlavičky */
    }
    
    .mobile-header {
        display: flex;
        height: 60px;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

/* =================================================================
 * MINECRAFT SERVER STATUS & PROJEKTY (MACHINIMA TRACKER)
 * ================================================================= */

.tournaments-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Styl pro projekty a jejich progres */
.progress-bar-container {
    width: 100%;
    background-color: var(--bg-dark);
    height: 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #ea580c 100%);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

/* Badge pro fáze projektů */
.badge-idea { background-color: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; }
.badge-script { background-color: rgba(245, 158, 11, 0.1); border: 1px solid #fcd34d; color: #d97706; }
.badge-building { background-color: rgba(59, 130, 246, 0.1); border: 1px solid #93c5fd; color: #2563eb; }
.badge-recording { background-color: rgba(239, 68, 68, 0.1); border: 1px solid #fca5a5; color: #dc2626; }
.badge-voiceover { background-color: rgba(139, 92, 246, 0.1); border: 1px solid #c7d2fe; color: #7c3aed; }
.badge-editing { background-color: rgba(14, 165, 233, 0.1); border: 1px solid #bae6fd; color: #0284c7; }
.badge-published { background-color: rgba(16, 185, 129, 0.1); border: 1px solid #a7f3d0; color: #059669; }

/* Kanban karty s označením projektu */
.card-project-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Oznámení (Inbox) widget */
.inbox-card {
    position: relative;
}

.inbox-widget {
    margin-top: 1rem;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Custom scrollbar pro inbox */
.inbox-list::-webkit-scrollbar {
    width: 6px;
}
.inbox-list::-webkit-scrollbar-track {
    background: transparent;
}
.inbox-list::-webkit-scrollbar-thumb {
    background-color: var(--border-light);
    border-radius: 3px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.25s ease;
}

.notification-item:hover {
    border-color: var(--primary);
    background-color: rgba(234, 88, 12, 0.02);
}

.notification-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.notification-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.notification-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.notification-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
}

.btn-read-notification {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-top: 0.1rem;
}

.btn-read-notification:hover {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.inbox-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.inbox-empty-state .empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: bounce-slow 3s infinite ease-in-out;
}

.inbox-empty-state p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Animace pro odstraňování zprávy */
.notification-item.fade-out {
    opacity: 0;
    transform: translateX(30px);
    margin-top: -50px; /* Collapse space */
    padding-top: 0;
    padding-bottom: 0;
    height: 0;
    border-top: none;
    border-bottom: none;
    pointer-events: none;
    overflow: hidden;
}

/* List souřadnic */
.coordinates-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coords-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.coords-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.coords-info strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.coords-info code {
    font-family: monospace;
    font-size: 0.8rem;
    background-color: var(--bg-dark);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

.btn-copy-coords {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-coords:hover {
    border-color: var(--primary);
    background-color: var(--primary-glow);
    color: var(--primary);
}

.btn-copy-coords.copied {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* =================================================================
 * OSOBNÍ PŘEHLED / USER SUMMARY WIDGET
 * ================================================================= */

.user-summary-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 992px) {
    .user-summary-widget {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
}

.widget-user-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.widget-avatar-container {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.widget-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.widget-user-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.widget-user-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.widget-tasks-summary {
    flex-grow: 1;
    max-width: 600px;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

@media (max-width: 992px) {
    .widget-tasks-summary {
        width: 100%;
        max-width: none;
    }
}

.summary-status {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.summary-status .status-icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-details strong {
    font-size: 1.05rem;
    color: var(--text-main);
}

.status-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.my-tasks-list {
    list-style: none;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0;
}

.my-tasks-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.my-task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.my-task-dot.col-todo { background-color: #3b82f6; }
.my-task-dot.col-in_progress { background-color: #ea580c; }
.my-task-dot.col-review { background-color: #8b5cf6; }

.my-task-title {
    font-weight: 600;
    color: var(--text-main);
}

.my-task-project {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* =================================================================
 * VEŘEJNÁ NÁBOROVÁ STRÁNKA & FORMULÁŘ
 * ================================================================= */

.recruitment-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.recruitment-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(234,88,12,0.05) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 1;
}

.recruitment-container {
    width: 100%;
    max-width: 750px;
    z-index: 2;
}

.recruitment-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.recruitment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.recruitment-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.recruitment-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.recruitment-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.recruitment-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 576px) {
}

/* Progress kroky náboru */
.recruit-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    background-color: var(--bg-darker);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.recruit-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.recruit-step .step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
}

.recruit-step.active {
    color: var(--primary);
}

.recruit-step.active .step-num {
    border-color: var(--primary);
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 10px var(--primary-glow);
}

.recruit-step.done {
    color: #10b981;
}

.recruit-step.done .step-num {
    border-color: #10b981;
    background-color: #10b981;
    color: #ffffff;
}

.recruit-step-divider {
    flex-grow: 1;
    height: 2px;
    background-color: var(--border-light);
    margin: 0 1rem;
    max-width: 50px;
}

@media (max-width: 576px) {
    .recruit-steps {
        padding: 0.75rem;
    }
    .recruit-step .step-label {
        display: none;
    }
    .recruit-step-divider {
        margin: 0 0.5rem;
    }
}

/* Sekce a bloky formuláře */
.recruit-section-block {
    display: none;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.recruit-section-block.active {
    display: block;
}

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

.recruit-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    border-bottom: 1.5px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.rs-icon {
    font-size: 1.25rem;
}

/* Citát / Pokyn box */
.field-quote-box {
    background-color: var(--bg-darker);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.field-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.15rem;
}

/* Rozcestník - radio karty */
.destination-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.destination-card {
    cursor: pointer;
    display: block;
}

.destination-card input[type="radio"] {
    display: none;
}

.dest-card-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.destination-card:hover .dest-card-inner {
    border-color: var(--primary);
    background-color: var(--bg-card);
}

.destination-card.selected .dest-card-inner {
    border-color: var(--primary);
    background-color: var(--primary-glow);
    box-shadow: 0 0 0 1px var(--primary);
}

.dest-icon {
    font-size: 2.2rem;
    background-color: var(--bg-card);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.dest-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex-grow: 1;
    text-align: left;
}

.dest-info strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-main);
}

.dest-info span {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.dest-check {
    opacity: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
    flex-shrink: 0;
}

.destination-card.selected .dest-check {
    opacity: 1;
}

/* Tlačítka navigace formuláře */
.recruit-nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
}

/* Rolové podsekce */
.role-subsection {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    animation: fadeInFast 0.25s ease-out forwards;
}

.role-subsection-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes fadeInFast {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Radio & Checkbox grupy pro volby */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    position: relative;
    user-select: none;
}

.radio-option input[type="radio"], .checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-option span::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: text-bottom;
    background-color: var(--bg-darker);
    transition: var(--transition);
}

.radio-option input[type="radio"]:checked + span::before {
    border-color: var(--primary);
    background-color: var(--primary);
    box-shadow: inset 0 0 0 3px var(--bg-darker);
}

.checkbox-option {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    transition: var(--transition);
}

.checkbox-option:hover {
    border-color: var(--primary);
    background-color: var(--bg-card);
}

.checkbox-option input[type="checkbox"]:checked ~ .cb-box {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-option input[type="checkbox"]:checked ~ .cb-box::after {
    content: "✓";
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
}

.checkbox-option input[type="checkbox"]:checked {
    border-color: var(--primary);
}

.checkbox-option .cb-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
    transition: var(--transition);
}

.checkbox-option .cb-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
}

.checkbox-option .cb-info strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.checkbox-option .cb-info small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Počítadlo slov a chyby */
.word-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
    font-weight: 600;
    transition: var(--transition);
}

.word-counter.ok {
    color: #10b981;
}

.word-counter.warn {
    color: #f59e0b;
}

/* Invalid vstup */
input.is-invalid, textarea.is-invalid, select.is-invalid {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.02) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-error-msg {
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
    animation: fadeInFast 0.2s ease-out;
}

/* Souhrnný box na konci náboru */
.recruit-summary-box {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.recruit-summary-box .summary-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.recruit-summary-box .summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recruit-summary-box .summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    line-height: 1.4;
}

.recruit-summary-box .summary-row span {
    color: var(--text-muted);
}

.recruit-summary-box .summary-row strong {
    color: var(--text-main);
    text-align: right;
}

/* Náborový úspěch */
.recruitment-success-view {
    text-align: center;
    padding: 2rem 1rem;
}

.recruitment-success-view .success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.recruitment-success-view h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 1rem;
}

.recruitment-success-view p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.recruitment-success-view .success-note {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* =================================================================
 * ADMIN SEKCE - NÁBORY (APPLICATIONS LIST)
 * ================================================================= */

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.application-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

/* Status border-left indicators */
.application-card.app-pending { border-left: 5px solid #f59e0b; }
.application-card.app-approved { border-left: 5px solid #10b981; opacity: 0.85; }
.application-card.app-rejected { border-left: 5px solid #ef4444; opacity: 0.85; }

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    gap: 1rem;
}

@media (max-width: 768px) {
    .app-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.app-applicant-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-avatar-container {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.app-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.app-applicant-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.app-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.app-card-badge-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

@media (max-width: 768px) {
    .app-card-badge-status {
        align-items: flex-start;
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
}

.app-status-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.app-pending .app-status-text { color: #d97706; }
.app-approved .app-status-text { color: #059669; }
.app-rejected .app-status-text { color: #dc2626; }

.app-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.app-text-block strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.app-text-block p {
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    line-height: 1.4;
}

.app-card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-approve-app {
    background-color: #10b981;
    color: #ffffff;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.btn-approve-app:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-reject-app {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.btn-reject-app:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-delete-app-icon {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: #ef4444;
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
}

.btn-delete-app-icon:hover {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

/* =================================================================
 * FORMY A VSTUPY (Login, Nábory, Úkoly, Admin tvorba)
 * ================================================================= */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* Sjednocený styl pro všechny inputy, textarey a selecty */
.login-form input,
.recruitment-form input,
.recruitment-form select,
.recruitment-form textarea,
.task-form input[type="text"],
.task-form input[type="password"],
.task-form input[type="number"],
.task-form input[type="date"],
.task-form textarea,
.task-form select,
#createUserForm input,
#createUserForm select,
#locationForm input,
#locationForm select {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.login-form input:focus,
.recruitment-form input:focus,
.recruitment-form select:focus,
.recruitment-form textarea:focus,
.task-form input:focus,
.task-form textarea:focus,
.task-form select:focus,
#createUserForm input:focus,
#createUserForm select:focus,
#locationForm input:focus,
#locationForm select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: var(--bg-card);
}

/* =================================================================
 * PŘIHLAŠOVACÍ STRÁNKA (Login)
 * ================================================================= */

.login-section {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    z-index: 1000;
}

.login-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.04) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 450px;
    z-index: 2;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    border-top: 1px dashed var(--border-light);
    padding-top: 1rem;
}

.login-footer-note a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.login-footer-note a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =================================================================
 * RESPONSIVNÍ MŘÍŽKA SOUPISKY TÝMU (Grid pro Adminy)
 * ================================================================= */

@media (max-width: 992px) {
    .members-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* =================================================================
 * PŘEPÍNAČ TÉMATU (Dark / Light Mode Toggle)
 * ================================================================= */

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
    line-height: 1;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-glow);
}

.theme-toggle-btn .theme-icon-dark { display: inline; }
.theme-toggle-btn .theme-icon-light { display: none; }
body.dark-theme .theme-toggle-btn .theme-icon-dark { display: none; }
body.dark-theme .theme-toggle-btn .theme-icon-light { display: inline; }

/* =================================================================
 * REAL-TIME TOAST OZNAČENÍ
 * ================================================================= */

#toastContainer {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 360px;
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-item.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100px); }
}

.toast-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.2; }

.toast-body {
    flex-grow: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.toast-message {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    transition: var(--transition);
}

.toast-close:hover { color: var(--primary); }

/* =================================================================
 * SUBTASKY / CHECKLISTY NA KANBAN KARTÁCH
 * ================================================================= */

.subtask-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0.1rem 0;
    border-radius: 4px;
}

.subtask-item:hover { color: var(--text-main); }

.subtask-item.done {
    text-decoration: line-through;
    opacity: 0.55;
}

.subtask-checkbox {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    transition: var(--transition);
    background: transparent;
}

.subtask-item.done .subtask-checkbox {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

/* Progress bar podúkolů na kartě */
.subtask-progress-bar {
    margin-top: 0.4rem;
    height: 4px;
    background-color: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.subtask-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.subtask-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.15rem;
    display: block;
    text-align: right;
}

/* Formulář podúkolů v modalu */
.subtask-inputs-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.subtask-input-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.subtask-input-row input {
    flex-grow: 1;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-darker);
    color: var(--text-main);
}

.btn-remove-subtask {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0.2rem;
    transition: var(--transition);
}

.btn-remove-subtask:hover { color: #ef4444; }

.btn-add-subtask {
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-subtask:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =================================================================
 * VÍCE ŘEŠITELŮ (Assignee Avatar Stack)
 * ================================================================= */

.assignee-stack {
    display: flex;
    align-items: center;
    gap: 0;
}

.assignee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    overflow: hidden;
    border: 1.5px solid var(--bg-card);
    margin-left: -6px;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}

.assignee-avatar:first-child { margin-left: 0; }

.assignee-avatar:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 2;
}

.assignee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

/* Multiselect checkboxy pro assignees v modalu */
.assignee-multiselect {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 150px;
    overflow-y: auto;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.assignee-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.assignee-option:hover {
    background-color: var(--primary-glow);
}

.assignee-option img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    image-rendering: pixelated;
}

.assignee-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* =================================================================
 * KALENDÁŘ ZOBRAZENI
 * ================================================================= */

.calendar-view-wrapper {
    margin-top: 1.5rem;
}

.calendar-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.calendar-nav-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-month-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

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

.calendar-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.4rem 0;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 50px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.3rem;
    background-color: var(--bg-card);
    transition: var(--transition);
    cursor: default;
    position: relative;
}

.calendar-day.other-month {
    background-color: var(--bg-darker);
    opacity: 0.5;
}

.calendar-day.today {
    border-color: var(--primary);
    background-color: var(--primary-glow);
}

.calendar-day-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.calendar-day.today .calendar-day-num {
    color: var(--primary);
}

.calendar-event-dot {
    display: block;
    font-size: 0.58rem;
    background-color: var(--primary-glow);
    color: var(--primary);
    border-radius: 2px;
    padding: 0.05rem 0.25rem;
    margin-bottom: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
    border-left: 2px solid var(--primary);
    line-height: 1.4;
}

.calendar-event-dot.type-task {
    color: #2563eb;
    background-color: rgba(59,130,246,0.1);
    border-left-color: #2563eb;
}

.calendar-event-dot.type-recording {
    color: #dc2626;
    background-color: rgba(239,68,68,0.1);
    border-left-color: #dc2626;
}

.calendar-event-dot.type-building {
    color: #059669;
    background-color: rgba(16,185,129,0.1);
    border-left-color: #059669;
}

/* Toggler seznam/kalendář */
.view-toggle-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.btn-view-toggle {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-view-toggle.active,
.btn-view-toggle:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}
