/* ==========================================================================
   ROOT VARIABLES (Colors, Spacing, Shadows)
   ========================================================================== */
:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Status Colors (Ticketing) */
    --status-new-bg: #dbeafe;
    --status-new-text: #1e40af;
    --status-progress-bg: #fef3c7;
    --status-progress-text: #92400e;
    --status-resolved-bg: #dcfce7;
    --status-resolved-text: #166534;
    --status-accepted-bg: #e0f2fe;
    --status-accepted-text: #0369a1;
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.5; }

/* ==========================================================================
   GLOBAL HEADER (MAIN-HEADER)
   ========================================================================== */
.main-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1250px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.brand:hover { transform: translateY(-1px); opacity: 0.9; }

.brand-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    color: white;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.brand-name { 
    font-weight: 900; 
    font-size: 1.4rem; 
    letter-spacing: -0.04em; 
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav { display: flex; align-items: center; gap: 1rem; }

.user-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 1.25rem;
    border-right: 1.5px solid var(--border-color);
    margin-right: 0.5rem;
    line-height: 1.3;
}

.user-name { font-weight: 800; font-size: 0.9rem; color: var(--text-main); }

.user-role {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
}



/* ==========================================================================
   SHARED UI COMPONENTS (Buttons, Cards, Forms)
   ========================================================================== */

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none !important;
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost { background: #f1f5f9; color: var(--text-main); border-color: var(--border-color); }
.btn-ghost:hover { background: #e2e8f0; }
.btn-warning { background-color: var(--warning); color: white; }
.btn-danger { background-color: var(--danger); color: white; }

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 2rem; /* Zvětšena mezera pod kartou */
    padding: 2.5rem; /* Zvětšen vnitřní prostor */
}

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

/* Tables */
.table-responsive { overflow-x: auto; }
.ticket-table { width: 100%; border-collapse: collapse; }
.ticket-table th, .ticket-table td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.ticket-table th { background-color: #f8fafc; font-weight: 700; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Forms */
input, select, textarea {
    width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 10px;
    font-family: inherit; font-size: 0.95rem; background: #fff; transition: 0.2s;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* ==========================================================================
   MOBILE RESPONSIVENESS (Shared Header & Basic Layout)
   ========================================================================== */
@media (max-width: 768px) {
    .header-content { padding: 0 1rem; }
    .brand-name { font-size: 1.1rem; }
    .user-pill { padding: 0 0.5rem; border-right: none; margin-right: 0; }
    .user-role { display: none; }
    .header-nav { gap: 0.5rem; }
    .btn { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
    .container { padding: 1rem; }
    .brand { gap: 0.5rem; }
}

@media (max-width: 500px) {
    .user-pill { display: none; }
    .brand-name { font-size: 1rem; }
    .brand-icon { width: 34px; height: 34px; font-size: 1.2rem; }
}

@media (max-width: 400px) {
    .brand-name { display: none; }
    .header-nav { gap: 0.4rem; }
    .btn span { display: none; }
}