/* ============================================
   Bankó Birtok Kassza - Main Stylesheet
   Mobile-first responsive CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dcdde1;
    --sidebar-width: 260px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Layout: Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid var(--primary-light);
    text-align: center;
    letter-spacing: 0.5px;
}

.sidebar-header a {
    color: #fff;
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    background-color: var(--primary-light);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav a.active {
    background-color: var(--primary-light);
    color: #fff;
    font-weight: 600;
    border-left: 3px solid var(--warning);
}

.sidebar-nav a .nav-icon {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
    text-align: center;
}

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--primary-light);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sidebar-user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}

.sidebar-logout {
    display: block;
    padding: 8px 14px;
    background: rgba(231,76,60,0.15);
    color: #e74c3c;
    border-radius: 6px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-logout:hover {
    background: rgba(231,76,60,0.3);
    text-decoration: none;
}

/* --- Sidebar: Settings section --- */
.nav-section-title {
    padding: 16px 20px 6px 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid var(--primary-light);
    margin-top: 6px;
}

.nav-sub-item a {
    padding-left: 32px !important;
    font-size: 0.9rem;
}

/* --- Layout: Main Content --- */
/* --- Fix Kassza Bar --- */
.kassza-bar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 900;
    display: flex;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: inherit;
}

.kassza-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    line-height: 1.2;
}

.kassza-bar-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.kassza-bar-value {
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}

.kassza-bar-egyenleg {
    flex: 1.3;
}

.kassza-pozitiv {
    background: var(--success);
    color: #fff;
}

.kassza-negativ {
    background: var(--danger);
    color: #fff;
}

.kassza-bar-bef {
    background: #2ecc71;
    color: #fff;
}

.kassza-bar-kif {
    background: #c0392b;
    color: #fff;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 60px 20px 20px 20px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text);
}

/* --- Login Page --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: var(--bg);
}

.login-form {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 24px 0;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.login-form .btn {
    width: 100%;
    margin-top: 8px;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 16px;
}

.card-balance {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 24px;
}

.card-positive {
    background-color: #e8f8f0;
    border-left: 4px solid var(--success);
}

.card-positive .card-balance {
    color: var(--success);
}

.card-negative {
    background-color: #fdecea;
    border-left: 4px solid var(--danger);
}

.card-negative .card-balance {
    color: var(--danger);
}

.card-title {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.summary-cards .card {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* --- Data Tables --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.data-table th {
    background-color: #f0f1f5;
    padding: 12px 10px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.data-table td:first-child {
    white-space: nowrap;
    vertical-align: middle;
}

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

.data-table tr:hover {
    background-color: #f8f9fb;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions a,
.data-table .actions button {
    margin-right: 4px;
}

.text-positive {
    color: var(--success);
    font-weight: 600;
}

.text-negative {
    color: var(--danger);
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
    white-space: nowrap;
}

/* --- Category Badges --- */
.badge-kategoria {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}

/* --- Role Badges --- */
.badge-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}

.badge-superadmin {
    background-color: #8e44ad;
}

.badge-admin {
    background-color: #2980b9;
}

.badge-viewer {
    background-color: #95a5a6;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .help-text {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s, background-color 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

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

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

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background-color: #f0f1f5;
}

/* --- Type Toggle (befizetés / kifizetés) --- */
.type-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.type-toggle .btn {
    flex: 1;
    border-radius: 0;
    text-align: center;
}

.type-toggle .btn:first-child {
    border-radius: 4px 0 0 4px;
}

.type-toggle .btn:last-child {
    border-radius: 0 4px 4px 0;
}

.type-toggle .btn-befizetes {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-light);
}

.type-toggle .btn-befizetes.active {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}

.type-toggle .btn-kifizetes {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-light);
}

.type-toggle .btn-kifizetes.active {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.filter-bar .form-group {
    flex-shrink: 0;
    margin-bottom: 0;
}

.filter-bar .form-group label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.filter-bar .form-group input,
.filter-bar .form-group select {
    padding: 8px;
    font-size: 0.85rem;
}

/* --- Pagination --- */
/* --- Filter Panel (modern flat) --- */
.filter-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.filter-result-count {
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e5ea;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text);
    background: #f8f9fb;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: #5b9bd5;
    box-shadow: 0 0 0 3px rgba(91,155,213,0.15);
    background: #fff;
}

.filter-group-search {
    grid-column: span 2;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    color: var(--danger);
    background: rgba(231,76,60,0.06);
    text-decoration: none;
}

.tranzakcio-summary {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 12px;
    padding-left: 4px;
}

/* --- Pagination (modern pill style) --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 4px 12px;
    border: none;
    border-radius: 10px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--card-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #ebedf2;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(44,62,80,0.3);
}

.pagination-ellipsis {
    background: none !important;
    box-shadow: none !important;
    color: var(--text-light);
    min-width: 24px;
}

.pagination .disabled {
    color: var(--text-light);
    cursor: default;
    opacity: 0.4;
}

/* --- Source List (forrasok.php) --- */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forras-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: background 0.15s, box-shadow 0.15s;
}

.forras-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.forras-item-drag {
    cursor: grab;
    color: var(--text-light);
    font-size: 1.1rem;
    flex-shrink: 0;
    padding: 0 4px;
}

.forras-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forras-nev {
    font-weight: 600;
    font-size: 0.95rem;
}

.forras-nev-inactive {
    text-decoration: line-through;
    color: var(--text-light);
}

.forras-inactive {
    opacity: 0.6;
}

.forras-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.badge-active {
    background: #d4edda;
    color: #155724;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.modal-box h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
}

.modal-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e5ea;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 16px;
    outline: none;
}

.modal-box input:focus {
    border-color: #5b9bd5;
    box-shadow: 0 0 0 3px rgba(91,155,213,0.15);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* --- Toast Notifications --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 0.9rem;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toast-slide-in 0.3s ease forwards;
}

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

.toast-error {
    background-color: var(--danger);
}

.toast-info {
    background-color: var(--primary);
}

.toast .undo-btn {
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    padding: 0;
    white-space: nowrap;
}

.toast .undo-btn:hover {
    opacity: 0.8;
}

.toast-fade-out {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- Flash Messages --- */
.flash {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: opacity 0.5s ease;
}

.flash-success {
    background-color: #e8f8f0;
    border-color: #a3d9b1;
    color: #1e7e45;
}

.flash-error {
    background-color: #fdecea;
    border-color: #f5c6cb;
    color: #c0392b;
}

.flash-warning {
    background-color: #fff8e1;
    border-color: #f7dc6f;
    color: #7d6608;
}

/* --- Hamburger Button --- */
.hamburger {
    display: none;
    position: fixed;
    top: 50px;
    left: 8px;
    z-index: 1500;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    flex-direction: column;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

/* --- Desktop/Mobile visibility defaults --- */
.tranzakcio-mobile {
    display: none;
}

.tranzakcio-desktop {
    display: block;
}

/* --- Mobile Transaction Cards --- */
.tranzakcio-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 14px;
    margin-bottom: 12px;
}

.tranzakcio-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.tranzakcio-card-header .date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.tranzakcio-card-header .amount {
    font-size: 1.1rem;
}

.tranzakcio-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.tranzakcio-card-body .field-label {
    font-weight: 600;
    color: var(--text);
}

.tranzakcio-card-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* --- Sortable (Drag & Drop) --- */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sortable-item {
    cursor: grab;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: box-shadow 0.2s;
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item.dragging {
    opacity: 0.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sortable-item .drag-handle {
    color: var(--text-light);
    font-size: 1rem;
    flex-shrink: 0;
}

/* --- Chart Container --- */
.chart-container {
    position: relative;
    max-height: 400px;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ============================================
   Responsive: Mobile (< 768px)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.open + .sidebar-overlay,
    .sidebar-overlay.active {
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .kassza-bar {
        left: 0;
        height: 44px;
    }

    .kassza-bar-label {
        font-size: 0.5rem;
    }

    .kassza-bar-value {
        font-size: 0.8rem;
    }

    .main-content {
        margin-left: 0;
        padding: 56px 12px 20px 12px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-cards {
        flex-direction: column;
    }

    .summary-cards .card {
        min-width: 100%;
    }

    /* Hide table, show mobile cards */
    .tranzakcio-desktop {
        display: none;
    }

    .tranzakcio-mobile {
        display: block;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-group {
        width: 100%;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    /* Források lista mobilon */
    .forras-item {
        flex-wrap: wrap;
    }

    .forras-item-info {
        flex-basis: calc(100% - 40px);
    }

    .forras-item-actions {
        flex-basis: 100%;
        justify-content: flex-end;
        padding-top: 6px;
        border-top: 1px solid #f0f1f5;
        margin-top: 4px;
    }

    .forras-item-actions .btn-sm {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .filter-group-search {
        grid-column: span 1;
    }

    .filter-panel {
        padding: 16px;
    }

    .type-toggle {
        flex-direction: column;
    }

    .type-toggle .btn:first-child {
        border-radius: 4px 4px 0 0;
    }

    .type-toggle .btn:last-child {
        border-radius: 0 0 4px 4px;
    }

    .login-form {
        padding: 30px 20px;
    }

    .card-balance {
        font-size: 1.5rem;
    }

    .toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: 100%;
    }
}

/* ============================================
   Responsive: Desktop (>= 769px)
   ============================================ */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .sidebar {
        transform: translateX(0);
    }

    .tranzakcio-mobile {
        display: none;
    }

    .tranzakcio-desktop {
        display: block;
    }
}
