/* ============================================
   SZKTR Admin - Bootstrap 5 Admin Dashboard
   Modern, letisztult admin felület
   ============================================ */

:root {
    --primary: #4f6ddf;
    --primary-dark: #3a54b5;
    --primary-light: #6e88e6;
    --secondary: #2e3b5e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-50: #f9fafb;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --border-radius: 16px;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === ÁLTALÁNOS === */
body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--dark);
    overflow-x: hidden;
}

/* === ADMIN LAYOUT === */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.sidebar.collapsed .logo span {
    display: none;
}

/* Sidebar menü */
.sidebar-menu {
    padding: 1.5rem 0;
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 0;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu .menu-item:hover {
    background: var(--gray-100);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu .menu-item.active {
    background: linear-gradient(90deg, rgba(79, 109, 223, 0.1) 0%, rgba(79, 109, 223, 0.02) 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar-menu .menu-item i {
    width: 24px;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
}

/* Fő tartalom */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.content-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* === DASHBOARD KÁRTYÁK === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(79, 109, 223, 0.1) 0%, rgba(79, 109, 223, 0.2) 100%);
    color: var(--primary);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
    color: var(--success);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: var(--warning);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-content p {
    color: var(--gray-600);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Progress bar */
.progress-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress {
    height: 10px;
    border-radius: 10px;
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* === TÁBLÁZATOK === */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.table-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* === BADGE-ek === */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 30px;
}

.badge.bg-primary { background: var(--primary) !important; }
.badge.bg-success { background: var(--success) !important; }
.badge.bg-warning { background: var(--warning) !important; color: var(--dark); }
.badge.bg-danger { background: var(--danger) !important; }
.badge.bg-info { background: var(--info) !important; }

/* Státusz badge-ek */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge i {
    font-size: 0.8rem;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.closed {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* === ŰRLAPOK === */
.form-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
}

.form-label {
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 109, 223, 0.1);
}

/* Radio gombok - Bootstrap 5 toggle */
.btn-check:checked + .btn-outline-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* === GOMBOK === */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 109, 223, 0.2);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

/* === LAPOZÁS === */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--gray-600);
    background: var(--gray-100);
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--primary);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

/* === ALERTS / ÜZENETEK === */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* === TIMELINE (rendszernaplóhoz) === */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    border-left: 2px solid var(--gray-200);
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.timeline-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

/* === RESPONZIVITÁS === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--gray-200);
        border-radius: var(--border-radius);
    }
    
    .table tbody td {
        display: flex;
        padding: 0.75rem 1rem;
        border: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        width: 120px;
        flex-shrink: 0;
    }
}
