@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- PREMIUM DESIGN TOKENS --- */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Colors - Deep Rich Dark Slate */
    --bg-app: #090d16;
    --bg-sidebar: rgba(13, 19, 33, 0.95);
    --bg-card: rgba(22, 30, 49, 0.65);
    --bg-card-hover: rgba(30, 41, 67, 0.8);
    --bg-input: rgba(15, 22, 38, 0.8);
    
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    /* Elegant Accents */
    --color-primary: #06b6d4;      /* Cyber Cyan */
    --color-primary-rgb: 6, 182, 212;
    --color-success: #10b981;      /* Emerald */
    --color-success-rgb: 16, 185, 129;
    --color-warning: #f59e0b;      /* Amber Gold */
    --color-warning-rgb: 245, 158, 11;
    --color-danger: #ef4444;       /* Rose Red */
    --color-danger-rgb: 239, 68, 68;
    --color-info: #3b82f6;         /* Sapphire Blue */
    --color-info-rgb: 59, 130, 246;
    
    /* Typography colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-glow: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);

    /* Shadows & Effects */
    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.2);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.2);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- LIGHT MODE VARIANT --- */
body.light-theme {
    --bg-app: #f1f5f9;
    --bg-sidebar: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(226, 232, 240, 0.8);
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-hover: rgba(15, 23, 42, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-premium: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
    --gradient-dark: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* --- RESET & GLOBALS --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.panel, .kpi-card, .sidebar, .btn, .nav-link, .alert-box, .drawer, .page-header, .search-input, .filter-select {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- CORE LAYOUT --- */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* --- SIDEBAR (MENU VĽAVO) --- */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.brand-logo svg {
    width: 22px;
    height: 22px;
    color: white;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.45);
    margin-top: 0.4rem;
    margin-left: 2px;
    display: inline-block;
}

.baseball-number {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 
        -1.5px -1.5px 0 var(--text-primary),  
         1.5px -1.5px 0 var(--text-primary),
        -1.5px  1.5px 0 var(--text-primary),
         1.5px  1.5px 0 var(--text-primary),
         3.5px  3.5px 0 rgba(0, 0, 0, 0.75),
         5px  5px 0 var(--color-success);
    transform: rotate(-10deg) skewX(-10deg);
    display: inline-block;
    letter-spacing: -2px;
    line-height: 1;
    margin-left: 0.5rem;
    filter: drop-shadow(0 4px 10px rgba(6, 182, 212, 0.25));
    user-select: none;
}

/* Navigation Links */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-glow);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
    font-weight: 600;
}

.nav-link.active svg {
    color: var(--color-primary);
    transform: scale(1.1);
}

/* Sidebar Footer Info */
.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-footer .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.sidebar-footer .val {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    min-height: 100vh;
    padding: 2.5rem 3rem;
    width: calc(100% - 280px);
    transition: var(--transition-smooth);
}

/* Header Container */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Top bar interactive elements */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

/* --- TAB PANELS --- */
.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

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

/* --- DASHBOARD WIDGETS --- */
/* Countdown Banner */
.hero-banner {
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-info {
    z-index: 2;
}

.hero-tag {
    background: var(--gradient-glow);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--color-primary);
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.countdown-widget {
    background: rgba(13, 19, 33, 0.85);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 1.5rem;
    text-align: center;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.countdown-segment {
    display: flex;
    flex-direction: column;
}

.countdown-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
    box-shadow: var(--shadow-premium);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon.primary { background: rgba(6, 182, 212, 0.12); color: var(--color-primary); }
.kpi-icon.success { background: rgba(16, 185, 129, 0.12); color: var(--color-success); }
.kpi-icon.warning { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.kpi-icon.danger { background: rgba(239, 68, 68, 0.12); color: var(--color-danger); }
.kpi-icon.info { background: rgba(59, 130, 246, 0.12); color: var(--color-info); }

.kpi-icon svg {
    width: 24px;
    height: 24px;
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Secondary Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title svg {
    color: var(--color-primary);
}

.panel-actions {
    font-size: 0.85rem;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
}

/* Progress bar charts */
.chart-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chart-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.chart-name {
    font-weight: 500;
    color: var(--text-secondary);
}

.chart-count {
    font-weight: 600;
    color: var(--text-primary);
}

.chart-bar-container {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.chart-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    width: 0;
    transition: width 1s ease-out;
}

.chart-item:nth-child(2n) .chart-bar {
    background: var(--gradient-success);
}
.chart-item:nth-child(3n) .chart-bar {
    background: var(--gradient-warning);
}
.chart-item:nth-child(4n) .chart-bar {
    background: var(--gradient-danger);
}

/* --- INTERACTIVE FOOD SELECTOR --- */
.food-tabs-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.food-subtab {
    padding: 0.5rem 1.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.food-subtab:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.food-subtab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.food-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.food-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.food-choice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.food-choice-row:hover {
    transform: translateX(4px);
    border-color: rgba(6, 182, 212, 0.4);
    background-color: var(--bg-card-hover);
}

.food-choice-row.selected {
    border-color: var(--color-primary);
    background: rgba(6, 182, 212, 0.08);
    box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.05);
}

.food-choice-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 80%;
    line-height: 1.4;
}

.food-choice-badge {
    background: rgba(6, 182, 212, 0.15);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    min-width: 32px;
    text-align: center;
}

.food-choice-row.selected .food-choice-badge {
    background: var(--color-primary);
    color: white;
}

/* Classmates list for chosen food */
.food-people-panel {
    background-color: rgba(13, 19, 33, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.food-people-header {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.food-people-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
}

.person-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.person-tag:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-1px);
}

.person-tag-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* --- PARTICIPANT CATALOG (KATALÓG) --- */
.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
}

.search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 480px;
}

.search-wrapper svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.search-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.filter-wrapper {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.participant-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.participant-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-premium);
    background-color: var(--bg-card-hover);
}

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

.avatar-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

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

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

.badge-paid { background-color: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-unpaid { background-color: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.badge-day { background-color: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.badge-stay { background-color: rgba(245, 158, 11, 0.15); color: var(--color-warning); }

.card-body {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-phone {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-meal-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.card-meal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-meal-item svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.card-meal-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.card-footer-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-footer-item svg {
    width: 13px;
    height: 13px;
}

/* --- DETAIL DRAWER (PROFIL BOČNÝ PANEL) --- */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(5, 7, 12, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    z-index: 1001;
    padding: 2.5rem 2rem;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.drawer.active {
    right: 0;
}

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

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.drawer-close:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.drawer-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.drawer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.drawer-name-section {
    display: flex;
    flex-direction: column;
}

.drawer-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.drawer-section {
    margin-bottom: 2rem;
}

.drawer-section-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-section-title svg {
    color: var(--color-primary);
    width: 14px;
    height: 14px;
}

.drawer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.drawer-info-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
}

.drawer-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.drawer-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drawer-info-value a {
    color: var(--color-primary);
    text-decoration: none;
}

.drawer-info-value a:hover {
    text-decoration: underline;
}

/* Full Width Drawer Boxes */
.drawer-info-box.full-width {
    grid-column: span 2;
}

.drawer-meal-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.drawer-meal-row {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
}

.drawer-meal-icon {
    color: var(--color-primary);
    display: flex;
    align-items: center;
}

.drawer-meal-icon svg {
    width: 20px;
    height: 20px;
}

.drawer-meal-details {
    display: flex;
    flex-direction: column;
}

.drawer-meal-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.drawer-meal-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Payment controller inside profile */
.payment-controller {
    background: var(--gradient-glow);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 34px;
    transition: .4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .toggle-slider {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: var(--color-success);
}

/* --- ORGANIZER ZONE STYLE --- */
.notes-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.note-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.note-author {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.note-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

.note-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.note-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

/* Finance Table details */
.finance-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

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

.finance-table th {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.finance-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.finance-table tr:hover {
    background-color: rgba(255,255,255,0.01);
}

/* --- MOBILE RESPONSIVENESS --- */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    width: 44px;
    height: 44px;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: var(--shadow-premium);
}

@media (max-width: 1024px) {
    .sidebar {
        left: -280px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 5rem 1.5rem 2rem 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-banner {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .countdown-widget {
        width: 100%;
        justify-content: space-around;
    }
    
    .food-interactive-grid {
        grid-template-columns: 1fr;
    }
    
    .drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        max-width: 100%;
    }
    
    .filter-wrapper {
        flex-direction: column;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .drawer-grid {
        grid-template-columns: 1fr;
    }
    
    .drawer-info-box.full-width {
        grid-column: span 1;
    }
}

/* --- TIMELINE STYLING --- */
.timeline-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.timeline-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-day-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-track {
    position: relative;
    border-left: 2px dashed rgba(255, 255, 255, 0.08);
    margin-left: 1rem;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-event {
    position: relative;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -2.05rem; /* center on dashed line */
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
    border: 2px solid var(--bg-card);
}

.timeline-event.success::before {
    background: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
}
.timeline-event.warning::before {
    background: var(--color-warning);
    box-shadow: 0 0 10px var(--color-warning);
}
.timeline-event.danger::before {
    background: var(--color-danger);
    box-shadow: 0 0 10px var(--color-danger);
}

.timeline-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: var(--transition-smooth);
}

.timeline-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.timeline-time {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(6, 182, 212, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.timeline-card.success .timeline-time {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.12);
}
.timeline-card.warning .timeline-time {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.12);
}
.timeline-card.danger .timeline-time {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.12);
}

.timeline-event-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-event-title svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timeline-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* Alert Box */
.alert-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .timeline-container {
        grid-template-columns: 1fr;
    }
}

/* Memory Timeline Responsiveness */
@media (max-width: 768px) {
    .timeline-memory-container::before {
        display: none;
    }
    .timeline-memory-container {
        padding-left: 0 !important;
    }
    .timeline-memory-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 2rem !important;
    }
    .timeline-memory-row > div {
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
    }
    .timeline-memory-row > div:nth-child(2) {
        position: static !important;
        transform: none !important;
        margin: 0.5rem 0 !important;
        width: fit-content !important;
        height: auto !important;
        padding: 0.25rem 0.75rem !important;
        border-radius: var(--radius-sm) !important;
        background: rgba(255,255,255,0.05) !important;
        display: inline-block !important;
    }
    .timeline-memory-row > div:nth-child(3) {
        display: none !important;
    }
}

/* --- PREMIUM PHOTO GALLERY EFFECT --- */
.gallery-item-card:hover .gallery-img {
    transform: scale(1.05);
}

/* --- SPINNING ANIMATION FOR SYNC ICON --- */
@keyframes spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.icon-spin {
    animation: spin-anim 1s linear infinite !important;
}
