/* ADMIN MODULE STYLES */
/* Extends common.css with admin-specific styling */

:root {
    /* Admin-specific colors */
    --admin-primary: #9C27B0;
    --admin-secondary: #7B1FA2;
    --admin-success: #4CAF50;
    --admin-danger: #F44336;
    --admin-warning: #FF9800;
    --admin-info: #2196F3;
    
    /* Status colors */
    --status-online: #4CAF50;
    --status-offline: #F44336;
    --status-warning: #FF9800;
    
    /* Card colors */
    --card-shadow: 0 2px 12px rgba(0,0,0,0.1);
    --card-hover-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Main Background - Gradient stejné jako v quiz.html */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Header Styling - Glass Morphism Design */
.header {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    color: white;
    padding: 1rem 0;
    margin: 1rem;
    border-radius: 15px;
}

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

.header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.user-role {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Navigation Breadcrumbs / Status Bar - Glass Morphism Design */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    margin: 0 1rem 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: white;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

#navigation-links-container {
    max-width: 280px; /* Reduced from 400px to prevent overlap */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

#navigation-links-container a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.75rem;
    margin: 0 0.2rem;
}

#navigation-links-container a:hover {
    color: #ff5722;
    text-shadow: 0 0 5px rgba(255, 87, 34, 0.5);
}

.status-right {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.breadcrumbs a:hover {
    color: #ff5722;
    background: rgba(255, 87, 34, 0.1);
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.7);
}

.current {
    font-weight: 600;
    color: #ff5722;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent text wrapping */
}

.server-status.online {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

.server-status.offline {
    background-color: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.3);
}

.server-status.checking {
    background-color: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.3);
}

.status-indicator {
    font-size: 12px;
    font-weight: 500;
}

.status-text {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.status-mode {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Access Warning - Glass Morphism */
.access-warning {
    background: rgba(255, 87, 34, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 87, 34, 0.3);
    box-shadow: 0 8px 32px rgba(255, 87, 34, 0.2);
    color: white;
    padding: 2rem;
    text-align: center;
    margin: 2rem;
    border-radius: 15px;
}

.warning-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.warning-content p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Main Content - Glass Container */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 120px);
}

/* Dashboard Stats */
.admin-dashboard {
    margin-bottom: 2rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-content p {
    margin: 0.25rem 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Tabs - Glass Morphism */
.admin-tabs {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 87, 34, 0.1);
    color: #ff5722;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ff5722;
    border-bottom-color: #ff5722;
}

.tab-content {
    display: none;
    padding: 2rem;
    color: white;
}

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-header h2 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tab-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Tables - Glass Morphism */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    color: white;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.users-table-container,
.questions-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

/* User Role Badges - Glass Style */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.role-badge.admin {
    background: rgba(255, 87, 34, 0.15);
    color: #ff5722;
    border-color: rgba(255, 87, 34, 0.3);
}

.role-badge.user {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
    border-color: rgba(33, 150, 243, 0.3);
}

/* Action Buttons - Glass Style */
.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 0.25rem;
    font-size: 0.8rem;
    color: white;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
    background: rgba(255, 87, 34, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.action-btn.danger:hover {
    border-color: #f44336;
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Tables Grid - Glass Morphism Cards */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.table-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-card:hover {
    border-color: #ff5722;
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.table-card h3 {
    margin: 0 0 0.5rem 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.table-card p {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.table-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Analytics - Glass Morphism Cards */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
}

.analytics-card h3 {
    margin: 0 0 1.5rem 0;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-stats,
.top-users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.battle-stat,
.top-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-user {
    border-left: 4px solid #ff5722;
}

/* System - Glass Morphism Cards */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.system-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
}

.system-card h3 {
    margin: 0 0 1.5rem 0;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.system-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.system-actions .btn {
    justify-content: flex-start;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.metric-value {
    color: white;
    font-weight: 500;
}

/* Server Status */
.server-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1.1rem;
}

.server-management {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.status-details p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.status-details span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Modal Enhancements */
.modal-content.large {
    max-width: 600px;
    width: 90%;
}

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

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Difficulty Badges */
.difficulty-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.easy {
    background: rgba(76, 175, 80, 0.1);
    color: var(--admin-success);
}

.difficulty-badge.medium {
    background: rgba(255, 152, 0, 0.1);
    color: var(--admin-warning);
}

.difficulty-badge.hard {
    background: rgba(244, 67, 54, 0.1);
    color: var(--admin-danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-right-color: var(--admin-primary);
        border-bottom: none;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .tab-actions {
        width: 100%;
        justify-content: center;
    }
    
    .tables-grid,
    .analytics-grid,
    .system-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .table-card,
    .analytics-card,
    .system-card {
        padding: 1rem;
    }
    
    .system-actions {
        gap: 0.5rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.loading::after {
    content: '⏳ Načítání...';
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Button Styling - Glass Morphism with Orange Theme */
.btn {
    background: rgba(255, 87, 34, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 87, 34, 0.3);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.2);
    color: #ff5722;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    background: rgba(255, 87, 34, 0.25);
    border-color: rgba(255, 87, 34, 0.5);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
    transform: translateY(-2px);
    color: #e64a19;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.btn.btn-danger {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.btn.btn-danger:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.5);
    color: #d32f2f;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Form Elements - Glass Morphism */
.form-input,
.form-select,
.form-textarea {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ff5722;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-label {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Collapsed Panels - Admin Specific */
.admin-panel {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-panel .panel-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.admin-panel .panel-header:hover {
    background: rgba(255, 87, 34, 0.1);
}

.admin-panel .panel-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.admin-panel .panel-toggle {
    color: #ff5722;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.admin-panel.collapsed .panel-toggle {
    transform: rotate(-90deg);
}

.admin-panel .panel-content {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.4s ease;
}

.admin-panel.collapsed .panel-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border-top: none;
}

.panel-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .table-card,
    .tab-btn,
    .action-btn,
    .btn {
        transition: none;
    }
    
    .stat-card:hover,
    .table-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .admin-table {
        border: 2px solid #000;
    }
    
    .admin-table th {
        border-bottom: 2px solid #000;
    }
    
    .admin-table td {
        border-bottom: 1px solid #666;
    }
    
    .tab-btn.active {
        border-bottom-width: 4px;
    }
}

/* Print Styles */
@media print {
    .header,
    .tab-buttons,
    .tab-actions,
    .system-actions,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 1rem;
    }
    
    .tab-content {
        display: block !important;
        padding: 0;
        page-break-inside: avoid;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
}

/* Enhanced Panel Visual Hierarchy - August 2025 */
.admin-panel.collapsed .panel-header {
    background: rgba(255, 87, 34, 0.05) !important;
    border-bottom: none !important;
}

.admin-panel.collapsed .panel-header:hover {
    background: rgba(255, 87, 34, 0.1) !important;
}

.admin-panel.collapsed .panel-header h3::after {
    content: " (klikněte pro rozbalení)";
    font-size: 0.8rem;
    opacity: 0.6;
    font-weight: normal;
}

.admin-panel .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-panel .panel-header h3::before {
    content: "⚙️";
    font-size: 0.9rem;
}

.admin-panel.collapsed {
    margin-bottom: 0.8rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Table Management Modal Styles - Glass Morphism */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 2rem 2rem 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 87, 34, 0.2);
    color: #ff5722;
}

.modal-body {
    padding: 0 2rem 2rem 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
}

/* Table Creation Options */
.creation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.creation-option-btn {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.creation-option-btn:hover {
    background: rgba(255, 87, 34, 0.15);
    border-color: rgba(255, 87, 34, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.3);
}

.option-icon {
    font-size: 3rem;
}

.option-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: white;
}

.option-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Manual Table Creation */
.questions-section {
    margin-top: 2rem;
}

.questions-section h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: white;
}

.question-row {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.question-header h5 {
    margin: 0;
    color: #ff5722;
    font-size: 1.1rem;
}

/* Database Import Styles */
.import-section {
    margin-bottom: 2rem;
}

.import-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.file-upload-area {
    text-align: center;
    padding: 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.file-info {
    margin-top: 1rem;
}

.file-selected {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #4CAF50;
}

.file-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #f44336;
}

.loading-indicator {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-top: 0.5rem;
}

.tables-section {
    margin-top: 2rem;
}

.tables-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.available-tables {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.table-option {
    margin-bottom: 1rem;
}

.table-checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-checkbox:hover {
    background: rgba(255, 87, 34, 0.1);
}

.table-info {
    flex: 1;
}

.table-name {
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.table-details {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.import-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Table Stats in Edit Modal */
.table-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.table-stats p {
    margin: 0 0 0.5rem 0;
    color: white;
    font-weight: 600;
}

.table-stats ul {
    margin: 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.table-stats li {
    margin-bottom: 0.25rem;
}

/* Form Styling for Modals */
.modal .form-input,
.modal .form-select,
.modal .form-textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal .form-input:focus,
.modal .form-select:focus,
.modal .form-textarea:focus {
    outline: none;
    border-color: #ff5722;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.2);
}

.modal .form-input::placeholder,
.modal .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 500;
}

.modal .form-group {
    margin-bottom: 1.5rem;
}

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

/* Responsive Design for Modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .creation-options {
        grid-template-columns: 1fr;
    }
    
    .creation-option-btn {
        padding: 1.5rem 1rem;
    }
    
    .modal .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 0 1.5rem;
    }
    
    .modal-body {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* DATABASE IMPORT PREVIEW STYLES */
.import-summary {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.summary-header h4 {
    color: #ff5722;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.summary-header p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
}

.table-preview-card {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0.5rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-preview-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 92, 34, 0.3);
}

.table-preview-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
}

.table-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #ff5722;
}

.table-main-info {
    flex: 1;
}

.table-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-compatible {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: normal;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.table-stats {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.preview-toggle-btn {
    background: rgba(255, 92, 34, 0.1);
    border: 1px solid rgba(255, 92, 34, 0.3);
    color: #ff5722;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.preview-toggle-btn:hover {
    background: rgba(255, 92, 34, 0.2);
    border-color: rgba(255, 92, 34, 0.5);
}

.table-preview-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #ff5722;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.columns-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.column-tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.column-tag.primary-key {
    background: rgba(255, 92, 34, 0.2);
    border-color: rgba(255, 92, 34, 0.3);
    color: #ff5722;
}

.sample-data-preview {
    margin: 1rem 0;
}

.sample-header {
    color: #ff5722;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.sample-table {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sample-row {
    display: flex;
}

.sample-row.header-row {
    background: rgba(255, 92, 34, 0.2);
}

.sample-row.header-row .sample-cell {
    color: white;
    font-weight: 600;
}

.sample-cell {
    flex: 1;
    padding: 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    word-break: break-word;
    min-width: 0;
}

.sample-cell:last-child {
    border-right: none;
}

.sample-row:not(.header-row):nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.compatibility-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.compatibility-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #FF9800;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.selection-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.selection-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-left: auto;
}

.no-tables-found {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .preview-toggle-btn {
        align-self: flex-end;
    }
    
    .sample-cell {
        min-width: 60px;
        font-size: 0.75rem;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .selection-info {
        margin-left: 0;
        text-align: center;
    }
}
