/**
 * Nyomtató Szervíz Management - Fő Stíluslap
 * Régi rendszer színvilága és design
 * Verzió: 2.0
 */

/* ============================================================
   SZÍNEK ÉS VÁLTOZÓK - RÉGI RENDSZER
   ============================================================ */
:root {
    /* Főbb színek */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    /* Háttérszínek */
    --sidebar-bg: #2c2c2c;          /* Sötét sidebar */
    --main-bg: #e8e8e3;              /* Világos bézs főoldal háttér */
    --card-bg: #ffffff;              /* Fehér kártyák */
    --table-row-even: #f9f9f9;       /* Páros táblázat sorok */
    --table-row-hover: #f1f1f1;      /* Hover táblázat sor */

    /* Szöveg színek */
    --text-dark: #2c2c2c;
    --text-muted: #6c757d;
    --text-light: #ffffff;

    /* Border színek */
    --border-color: #dee2e6;
    --border-light: #e0e0e0;

    /* Layout méretek */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 60px;
}

/* ============================================================
   ÁLTALÁNOS BEÁLLÍTÁSOK
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    background-color: var(--main-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* ============================================================
   WRAPPER ÉS LAYOUT
   ============================================================ */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: var(--sidebar-width);
    background-color: var(--main-bg);
    padding: 20px;
}

#content.active {
    margin-left: 0;
}

/* ============================================================
   SIDEBAR - SÖTÉT DESIGN
   ============================================================ */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--text-light);
    transition: all 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

#sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

/* Sidebar scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar fejléc */
.sidebar-header {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    transition: opacity 0.2s;
}

.sidebar-header img:hover {
    opacity: 0.9;
}

.sidebar-header h3 {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.sidebar-header small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

/* Sidebar navigáció */
#sidebar ul {
    padding: 0;
    list-style: none;
}

#sidebar ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar ul li a {
    padding: 15px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

#sidebar ul li a:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

#sidebar ul li.active > a {
    color: var(--text-light);
    background: var(--primary-color);
    border-left: 3px solid #0056b3;
}

#sidebar ul li a i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .user-info {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-footer .user-info small {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   KÁRTYÁK (Cards)
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 15px 20px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   STATISZTIKA KÁRTYÁK - NAGYIKONOS
   ============================================================ */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card-icon i {
    display: block;
}

.stat-card-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Színes változatok */
.stat-card.blue .stat-card-icon { color: #007bff; }
.stat-card.green .stat-card-icon { color: #28a745; }
.stat-card.orange .stat-card-icon { color: #fd7e14; }
.stat-card.red .stat-card-icon { color: #dc3545; }
.stat-card.purple .stat-card-icon { color: #6f42c1; }
.stat-card.teal .stat-card-icon { color: #20c997; }

/* ============================================================
   TÁBLÁZATOK
   ============================================================ */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

table tbody tr:nth-child(even) {
    background-color: var(--table-row-even);
}

table tbody tr:hover {
    background-color: var(--table-row-hover);
}

table tbody td {
    padding: 12px 15px;
    color: var(--text-dark);
    font-size: 14px;
}

/* ============================================================
   GOMBOK
   ============================================================ */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background-color: #0056b3;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
}

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

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* ============================================================
   BADGE-EK (Címkék)
   ============================================================ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.badge-primary {
    background-color: #cce5ff;
    color: #004085;
}

/* ============================================================
   FORM ELEMEK
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group label.required:after {
    content: ' *';
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Radio & Checkbox gombok */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.form-check input {
    margin-right: 8px;
}

/* Button Groups - Radio gombok inline */
.btn-group-toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group-toggle label {
    margin: 0;
}

.btn-group-toggle input[type="radio"] {
    display: none;
}

.btn-group-toggle label.btn {
    cursor: pointer;
    background-color: #e9ecef;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-group-toggle input[type="radio"]:checked + label.btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--success-color); }
.text-warning { color: #856404; }
.text-primary { color: var(--primary-color); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }

.ml-2 { margin-left: 10px; }
.mr-2 { margin-right: 10px; }

.p-0 { padding: 0; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.font-weight-bold { font-weight: 700; }
.font-weight-normal { font-weight: 400; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #content {
        margin-left: 0;
    }

    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #sidebar.active {
        margin-left: 0;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* ============================================================
   LAPOZÁS (Pagination)
   ============================================================ */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================================
   ALERT ÜZENETEK
   ============================================================ */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ============================================================
   DROPDOWN MENÜK - JAVÍTÁSOK (Select2 kizárásával)
   ============================================================ */
/* Bootstrap dropdown menük - NEM Select2 */
.dropdown-menu:not(.select2-dropdown):not(.select2-results) {
    max-height: none !important;
    overflow: visible !important;
    min-width: 220px !important;
    padding: 8px 0 !important;
}

.dropdown-item:not(.select2-results__option) {
    padding: 12px 20px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    font-size: 14px !important;
}

.dropdown-item i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.dropdown-header:not(.select2-results__group) {
    padding: 12px 20px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    font-size: 13px !important;
}

.dropdown-divider {
    margin: 8px 0 !important;
}

/* Sidebar collapse menük */
.collapse.list-unstyled li a {
    padding: 12px 20px 12px 45px !important;
    line-height: 1.6 !important;
    min-height: auto !important;
    height: auto !important;
}

/* Select2 TELJES FELÜLÍRÁS - MINDENT KIKÉNYSZERÍTÜNK */
.select2-container {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.select2-container * {
    box-sizing: border-box !important;
}

/* Select box wrapper */
.select2-container .select2-selection {
    position: relative !important;
    display: block !important;
}

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    position: relative !important;
    display: block !important;
    overflow: visible !important;
}

/* Kiválasztott szöveg konténere */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    position: static !important;
    display: block !important;
    padding-left: 12px !important;
    padding-right: 50px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 36px !important;
    height: 36px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* Nyíl */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    height: 36px !important;
    width: 20px !important;
    right: 5px !important;
    top: 1px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: block !important;
}

/* X gomb */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 30px !important;
    top: 8px !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    text-align: center !important;
    font-size: 16px !important;
    z-index: 10 !important;
}

/* Dropdown */
.select2-dropdown {
    position: absolute !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    z-index: 9999 !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    line-height: 1.5 !important;
}

/* Elrejtjük a dolgokat amik nem kellenek */
.select2-container--default .select2-selection--multiple,
.select2-selection__choice {
    display: none !important;
}

/* ============================================================
   NATÍV HTML SELECT DROPDOWNOK - JAVÍTÁS
   ============================================================ */
select.form-control {
    height: auto !important;
    min-height: 38px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

select.form-control option {
    padding: 8px 12px !important;
    line-height: 1.8 !important;
    min-height: 32px !important;
    font-size: 14px !important;
}
