/**
 * Átalányadós EV Adókalkulátor - Stíluslap
 * Modern admin felület stílus (marketgoo inspiráció)
 */

/* ============================================
   CSS Változók
   ============================================ */
:root {
    /* Színek */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f0f1ff;
    --accent: #ec4899;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --black: #000000;
    
    /* Sidebar */
    --sidebar-bg: #f8f9fc;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    
    /* Tipográfia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Árnyékok */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Kerekítések */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Átmenetek */
    --transition: all 0.2s ease;
}

/* ============================================
   Alap reset és tipográfia
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-100);
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-800);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* ============================================
   Layout - Sidebar + Main
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-icon {
    display: none;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: var(--font-size-base);
}

.sidebar-logo-img {
    height: 36px;
    width: auto;
    display: block;
}
.sidebar-logo-text {
    display: none;
    font-weight: 600;
    color: var(--gray-800);
    font-size: var(--font-size-lg);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.25rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    margin: 0 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    border-radius: var(--radius);
    border-left: none;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.nav-item.active {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

.nav-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-200);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.main-header .page-title {
    flex: 1;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.main-body {
    flex: 1;
    padding: 2rem;
}

/* ============================================
   Kártyák
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Stat kártyák */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.primary { background: var(--secondary); color: var(--primary); }
.stat-card-icon.success { background: #d1fae5; color: var(--success); }
.stat-card-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-card-icon.danger { background: #fee2e2; color: var(--danger); }

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-card-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ============================================
   Gombok
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--font-size-base);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    min-width: 32px;
    min-height: 32px;
}

.btn-icon svg {
    flex-shrink: 0;
}

.btn-sm.btn-icon {
    padding: 0.25rem;
    min-width: 28px;
    min-height: 28px;
}

.btn-sm.btn-icon svg {
    width: 14px;
    height: 14px;
}

/* RESPONSIVE GOMBOK - Desktop: szöveg + ikon, Mobil: csak ikon */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-responsive .btn-icon-svg {
    flex-shrink: 0;
    display: none;
}

.btn-responsive .btn-label {
    white-space: nowrap;
}

/* ============================================
   Form elemek
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: var(--font-size-sm);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-50);
    color: var(--gray-800);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-text {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--danger);
    margin-top: 0.375rem;
}

/* Checkbox és Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    cursor: pointer;
}

/* Input csoport */
.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group-text {
    padding: 0.625rem 0.875rem;
    font-size: var(--font-size-sm);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

/* ============================================
   Táblázatok
   ============================================ */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.35rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.table th {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

/* Zebra sorok - váltakozó háttér (erősebb kontraszt) */
.table tbody tr:nth-child(4n+1),
.table tbody tr:nth-child(4n+2) {
    background: #ffffff !important;
}

.table tbody tr:nth-child(4n+3),
.table tbody tr:nth-child(4n+4) {
    background: #effafd !important;
}

/* Normál táblázatoknál (nem expandable) egyszerű zebra */
.table:not(.table-expandable) tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.table:not(.table-expandable) tbody tr:nth-child(even) {
    background: #f3f4f6 !important;
}

.table tbody tr:hover:not(.row-details) {
    background: #e5e7eb !important;
}

/* Row details ne legyen zebra */
.table tbody tr.row-details {
    background: #fefefe !important;
    border-left: 3px solid var(--primary) !important;
}

/* Lenyíló sor stílusok */
.table tbody tr.expandable-row {
    cursor: pointer;
}

.table tbody tr.expandable-row td:first-child::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid var(--gray-500);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.table tbody tr.expandable-row.expanded td:first-child::before {
    transform: rotate(90deg);
}

.table tbody tr.expandable-row.expanded {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.table tbody tr.row-details {
    display: none;
    background: var(--gray-100, #f3f4f6);
    border-left: 3px solid var(--primary);
}

.table tbody tr.row-details.show {
    display: table-row;
}

.table tbody tr.row-details td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.row-details-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.row-details-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.row-details-section {
    flex: 1;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.row-details-section h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary, #4f46e5);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light, #eef2ff);
}

.row-details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.row-details-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.row-details-actions .btn svg {
    width: 16px;
    height: 16px;
}

.row-details-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    font-size: var(--font-size-sm);
}

.row-details-info dt {
    color: var(--gray-500);
}

.row-details-info dd {
    color: var(--gray-700);
    margin: 0;
}

.table td {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
}

.table .text-right {
    text-align: right;
}

.table .text-center {
    text-align: center;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

.badge-primary { background: var(--secondary); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   Progress bar
   ============================================ */
.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* ============================================
   Grid rendszer
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
    gap: 0;
}

.col {
    flex: 1;
    padding: 0.75rem;
}

/* Stat kártyák közötti nagyobb távolság */
.row > .col-3,
.row > .col-4,
.row > .col-6 {
    padding: 0.75rem;
}

.col-auto { flex: 0 0 auto; }
.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================
   Utility osztályok
   ============================================ */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray-500); }

.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-lg { font-size: var(--font-size-lg); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ============================================
   Login oldal
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e8f0fe 0%, #f1f5f9 50%, #dbeafe 100%);
    padding: 1rem;
}

.login-shell {
    width: 100%;
    max-width: 1000px;
}

.login-card {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 0;
    overflow: hidden;
}

.login-card-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 520px;
}

.login-left {
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
}

.login-right {
    padding: 3rem 3.5rem;
    background: linear-gradient(145deg, #1e40af 0%, #1e3a8a 60%, #172554 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-right::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}
.login-right::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}

.login-right-title {
    font-size: 1.75rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: .75rem;
    line-height: 1.25;
}

.login-right-text {
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.login-right-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: var(--font-size-sm);
}

.login-right-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,.95);
    font-size: .95rem;
}

.login-right-list .check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #10b981;
}

.login-brand {
    margin-bottom: 2rem;
}
.login-logo-img {
    height: 52px;
    width: auto;
    display: block;
}

.login-brand-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.login-brand-highlight {
    color: var(--primary);
    font-weight: 700;
}

.login-welcome {
    margin-bottom: 1.75rem;
}

.login-welcome-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.login-welcome-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    margin: 0;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

.form-control-icon {
    padding-left: 2.75rem;
}
.form-control-icon-r {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
}
.input-icon-btn {
    position: absolute;
    right: .875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    line-height: 1;
}
.input-icon-btn:hover { color: var(--gray-600); }
.login-remember {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.login-remember input[type=checkbox] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}
.login-remember label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.login-footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
}

.login-footer-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-600);
    margin: 0 0 0.25rem 0;
}

.login-footer-text {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin: 0;
}

@media (max-width: 768px) {
    .login-card-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 2rem 1.75rem;
    }
}

/* ============================================
   Mobil menü gomb (hamburger)
   ============================================ */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-600);
    border-radius: 1px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar overlay mobilon */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Táblázat görgetés mobilon */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.table-container .table {
    min-width: 700px;
}

/* ============================================
   Reszponzív
   ============================================ */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-body {
        padding: 0.75rem !important;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.75rem !important;
    }
    
    .table-container {
        margin: 0 -0.75rem !important;
        padding: 0 0.75rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .table {
        min-width: 500px !important;
        font-size: 0.75rem !important;
    }
    
    .stat-card-details {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .col-3, .col-4, .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .page-title {
        font-size: var(--font-size-lg);
    }
    
    .stat-card-icon {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   Sidebar szűrő (Iroda/Vállalkozó választó)
   ============================================ */
.sidebar-filter {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.sidebar-filter-group {
    margin-bottom: 0.75rem;
}

.sidebar-filter-group:last-child {
    margin-bottom: 0;
}

.sidebar-filter-label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.sidebar-filter-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    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='%236b7280'%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.5rem center;
    background-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-filter-select:hover {
    border-color: var(--gray-400);
}

.sidebar-filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sidebar-filter-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.sidebar-filter-selected span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: background-color 0.15s ease;
}

.sidebar-filter-clear:hover {
    background: rgba(255, 255, 255, 0.35);
}

.sidebar-filter-fixed {
    padding: 0.5rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.sidebar-filter-hint {
    padding: 0.5rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-400);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-style: italic;
}

/* ============================================
   Stat card kiegészítések
   ============================================ */
.stat-card-empty {
    opacity: 0.6;
    background: var(--gray-50);
}

.stat-card-empty .stat-card-value {
    color: var(--gray-400);
}

.stat-card-details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-600);
    line-height: 1.6;
}

.stat-card-details small {
    font-size: var(--font-size-xs);
}

.stat-card-icon {
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.text-lg {
    font-size: 1.125rem;
}

.font-semibold {
    font-weight: 600;
}

/* ============================================
   Modal (Bug Report)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   MOBIL-BARÁT RESPONSIVE DESIGN
   ============================================
   Verzió: 1.0
   Utolsó frissítés: 2025-12-19
   ============================================ */

/* STATS GRID - DESKTOP ALAPÉRTELMEZETT */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.stat-card {
    width: 100% !important;
    box-sizing: border-box;
    padding: 1.75rem;
    max-width: none !important;
}

/* TABLET (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1.25rem !important;
    }
    
    .stat-card-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.25rem !important;
    }
    
    .stat-card-value {
        font-size: 1.875rem !important;
    }
}

/* MOBIL (≤768px) */
@media (max-width: 768px) {
    /* MAIN CONTENT - Teljes szélesség */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .main-body {
        padding: 0.5rem !important;
        overflow-x: hidden !important;
    }
    
    /* STATS GRID - 2x2 KOMPAKT */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* STAT KÁRTYÁK - Nagyon kompakt, IKON ELREJTVE */
    .stat-card {
        padding: 0.5rem !important;
        min-height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .stat-card:hover {
        transform: none !important;
    }
    
    /* IKON ELREJTÉSE MOBILON */
    .stat-card-header,
    .stat-card-icon {
        display: none !important;
    }
    
    /* ÉRTÉK ÉS CÍMKE - Kompakt */
    .stat-card-value {
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .stat-card-label {
        font-size: 0.625rem !important;
        margin-top: 0.125rem !important;
        color: var(--gray-500) !important;
    }
    
    /* HEADER - Kompakt, gombok láthatóak */
    .main-header {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .page-title {
        font-size: 0.875rem !important;
        flex: 1 !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
    
    /* HEADER GOMBOK - Láthatóak, kompakt */
    .header-actions {
        display: flex !important;
        gap: 0.25rem !important;
        flex-shrink: 0 !important;
    }
    
    .header-actions .btn {
        padding: 0.375rem !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 0.75rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .header-actions .btn svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .header-actions .btn .btn-text {
        display: none !important;
    }
    
    /* ÜDVÖZLÉS - Kompakt */
    .mb-5 {
        margin-bottom: 0.5rem !important;
    }
    
    .mb-5 h2 {
        font-size: 1rem !important;
    }
    
    .mb-5 p {
        font-size: 0.6875rem !important;
        margin-top: 0.125rem !important;
    }
    
    /* ROW ÉS COL - Egymás alatt, teljes szélesség */
    .row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .col, .col-3, .col-4, .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* KÁRTYÁK - Kompakt */
    .card {
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .card-header {
        padding: 0.5rem !important;
    }
    
    .card-title {
        font-size: 0.875rem !important;
    }
    
    .card-body {
        padding: 0.5rem !important;
    }
    
    /* GOMBOK - Teljes szélesség, NE LÓGJANAK KI */
    .card-body .btn {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.375rem !important;
        padding: 0.5rem !important;
        font-size: 0.8125rem !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .card-body .d-flex {
        flex-direction: column !important;
        gap: 0.375rem !important;
        width: 100% !important;
    }
    
    .card-body .gap-3 {
        gap: 0.375rem !important;
    }
    
    /* RESPONSIVE GOMBOK - Mobilon csak ikon */
    .btn-responsive .btn-icon-svg {
        display: inline-block !important;
    }
    
    .btn-responsive .btn-label {
        display: none !important;
    }
    
    .btn-responsive {
        padding: 0.25rem !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }
    
    .btn-responsive .btn-icon-svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* TÁBLÁZATOK - Horizontal scroll */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .table {
        font-size: 0.6875rem !important;
        min-width: 400px !important;
    }
    
    .table th,
    .table td {
        padding: 0.375rem 0.5rem !important;
        white-space: nowrap !important;
    }
    
    /* SIDEBAR - Rejtett alapból */
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 260px !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 100 !important;
    }
    
    .sidebar.active,
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .sidebar-overlay {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .sidebar-overlay.active,
    .sidebar-overlay.open {
        display: block !important;
    }
    
    /* MOBILE MENU TOGGLE */
    .mobile-menu-toggle {
        display: flex !important;
        width: 32px !important;
        height: 32px !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 4px;
        flex-shrink: 0 !important;
    }
    
    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
        background: var(--gray-700);
        transition: all 0.3s ease;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
    
    .nav-item-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Form Elemek - Kompakt */
    .form-control {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.875rem !important;
        min-height: 36px !important;
    }
    
    .form-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .form-group {
        margin-bottom: 0.5rem !important;
    }
    
    select.form-control {
        min-height: 36px !important;
    }
    
    textarea.form-control {
        min-height: 80px !important;
    }
    
    /* Modal - Kompakt */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        border-radius: 8px !important;
        margin: 5vh auto !important;
    }
    
    .modal-header {
        padding: 0.75rem !important;
    }
    
    .modal-title {
        font-size: 1rem !important;
    }
    
    .modal-body {
        padding: 0.75rem !important;
    }
    
    .modal-footer {
        padding: 0.75rem !important;
        flex-direction: column-reverse;
        gap: 0.375rem;
    }
    
    .modal-footer .btn {
        width: 100% !important;
    }
    
    /* Alert - Kompakt */
    .alert {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .sidebar-filter {
        padding: 0.5rem 0.75rem !important;
    }
    
    .sidebar-filter-group {
        margin-bottom: 0.625rem !important;
    }
    
    .sidebar-filter-label {
        font-size: 0.6875rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .sidebar-filter-select {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
        min-height: 38px;
    }
    
    .user-menu {
        padding: 0.75rem 1rem !important;
    }
    
    .user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
    }
    
    .user-name {
        font-size: 0.875rem !important;
    }
    
    .user-role {
        font-size: 0.75rem !important;
    }
    
    /* Utility Classes */
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

/* TOUCH OPTIMALIZÁLÁS */
@media (hover: none) and (pointer: coarse) {
    .nav-item {
        min-height: 44px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .stat-card:hover {
        transform: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
}
