﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-dark: #0f172a;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --error: #ef4444;
    --success: #10b981;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    color-scheme: dark;
}

body.light-mode {
    --bg-dark: #f1f5f9;
    --surface: #ffffff;
    --surface-border: #cbd5e1;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #0891b2;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e293b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #0b0f19 !important;
    background-image:
        linear-gradient(rgba(11, 15, 25, 0.45), rgba(11, 15, 25, 0.65)),
        url('default_dark_bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

body.light-mode {
    background-color: #f8fafc !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.35), rgba(248, 250, 252, 0.5)),
        url('default_light_bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

/* ── Layout ── */
.app-container { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

body.light-mode .sidebar { background: rgba(255, 255, 255, 0.9); }

.sidebar-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.sidebar-header:hover { transform: scale(1.02); }
.sidebar-header img { height: 36px; max-width: 160px; object-fit: contain; }

.nav-menu { flex: 1; padding: 1rem; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.nav-item i { width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
body.light-mode .nav-item:hover { background: rgba(0,0,0,0.05); }
.nav-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    width: calc(100% - 260px);
    min-height: 100vh;
}

/* ── Top Bar ── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 50;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-info h2 { font-size: 1.5rem; font-weight: 700; }
.page-info p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Notification / User Dropdowns ── */
.notifications-dropdown,
.user-dropdown-container { position: relative; }

.modern-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 9999;
}
.modern-dropdown.show { display: flex; }

body.light-mode .modern-dropdown {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modern-dropdown-header {
    padding: 0.75rem 0.75rem 0.5rem;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modern-dropdown-header h6 { margin: 0; font-weight: 700; font-size: 0.875rem; }

.modern-dropdown-item {
    padding: 0.75rem;
    border-radius: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.modern-dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--accent); }
body.light-mode .modern-dropdown-item:hover { background: rgba(0,0,0,0.05); }
.modern-dropdown-item.unread { background: rgba(99,102,241,0.06); }

.modern-dropdown-footer {
    padding: 0.5rem 0.75rem 0.25rem;
    border-top: 1px solid var(--surface-border);
    margin-top: 0.25rem;
    text-align: center;
}
.modern-dropdown-footer a { font-size: 0.75rem; color: var(--accent); text-decoration: none; font-weight: 600; }

/* ── Tables ── */
.table-wrapper { background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--surface-border); border-radius: 20px; overflow: visible; }

table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--surface-border);
}

td {
    padding: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--surface-border);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
body.light-mode tr:hover td { background: rgba(0,0,0,0.02); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
body.light-mode input::placeholder, body.light-mode textarea::placeholder { color: #64748b; opacity: 0.8; }

input:focus, textarea:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: var(--surface);
}

input[type="checkbox"] {
    width: 1.1rem; height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Buttons ── */
.btn-primary, .btn-login {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary:hover, .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.4);
    filter: brightness(1.1);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* ── Login Page ── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}
.login-container { width: 100%; max-width: 420px; }

h1.gradient-text {
    font-size: 1.5rem; font-weight: 700; text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle { color: var(--text-muted); text-align: center; font-size: 0.875rem; margin-bottom: 2rem; }

/* ── Alert ── */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
.alert-danger, .alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #fca5a5;
}
.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: #6ee7b7;
}
.alert-link { color: var(--accent); }

/* ── Badges ── */
.badge {
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.badge-success { background: rgba(16,185,129,0.1); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-error   { background: rgba(239,68,68,0.1);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-info    { background: rgba(59,130,246,0.1);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.badge-secondary { background: rgba(255,255,255,0.08); color: var(--text-muted); border: 1px solid var(--surface-border); }

/* Status Colors */
.status-expired  { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.2); padding: 0.3rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.status-draft    { background: rgba(56,189,248,0.1);   color: #38bdf8; border: 1px solid rgba(56,189,248,0.2); padding: 0.3rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.status-accepted { background: rgba(52,211,153,0.1);   color: #34d399; border: 1px solid rgba(52,211,153,0.2); padding: 0.3rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.status-confirmed{ background: rgba(99,102,241,0.1);   color: #818cf8; border: 1px solid rgba(99,102,241,0.2); padding: 0.3rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.status-archived { background: rgba(148,163,184,0.1);  color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); padding: 0.3rem 0.75rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }

/* ── ORSY Modal System ── */
.orsy-modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.orsy-modal.show { display: flex; }

.orsy-modal-dialog {
    background: #1e293b;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.orsy-modal-dialog.orsy-modal-xl { max-width: 1100px; }
.orsy-modal-dialog.orsy-modal-full { max-height: 95vh; }

.orsy-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.orsy-modal-title { font-weight: 700; font-size: 1.1rem; }

.orsy-modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }

.orsy-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.orsy-modal-close {
    background: none; border: none;
    color: var(--text-muted); font-size: 1.5rem;
    cursor: pointer; line-height: 1;
    transition: color 0.2s;
}
.orsy-modal-close:hover { color: var(--text-main); }

.pdf-modal-iframe { width: 100%; height: 80vh; border: none; }

/* ── Brand / Orsi Modal ── */
.brand-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}
.brand-modal.show { display: flex; }

.brand-modal-content {
    background: #1e293b;
    border: 1px solid var(--surface-border);
    border-radius: 32px;
    width: 90%; max-width: 600px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    text-align: center;
}

.brand-modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: none; border: none;
    color: var(--text-muted); font-size: 1.5rem;
    cursor: pointer; transition: color 0.2s;
}
.brand-modal-close:hover { color: var(--text-main); }

.mascot-container { margin-bottom: 1.5rem; }
.mascot-img {
    width: 160px; height: 160px; object-fit: cover;
    border-radius: 24px;
    border: 2px solid var(--accent);
    padding: 4px;
    box-shadow: 0 0 24px rgba(34,211,238,0.25);
}

.intro-text-content { text-align: left; line-height: 1.7; }
.intro-text-content h2 {
    text-align: center; margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-list { list-style: none; margin-top: 1rem; }
.intro-list li { margin-bottom: 0.75rem; padding-left: 1.5rem; position: relative; color: var(--text-muted); }
.intro-list li::before { content: '✦'; position: absolute; left: 0; color: var(--accent); }

/* ── Custom Select Component ── */
.orsy-hidden {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

.orsy-select-wrapper { position: relative; width: 100%; user-select: none; }

.orsy-select-trigger {
    width: 100%; padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: all 0.2s ease;
    min-height: 46px;
}
.orsy-select-wrapper.open .orsy-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.orsy-select-trigger i { font-size: 0.75rem; transition: transform 0.25s ease; color: var(--text-muted); }
.orsy-select-wrapper.open .orsy-select-trigger i { transform: rotate(180deg); }

.orsy-select-options {
    position: absolute;
    top: calc(100% + 6px); left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 5px;
    z-index: 10000;
    box-shadow: 0 20px 30px rgba(0,0,0,0.35);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 280px; overflow-y: auto;
}
.orsy-select-wrapper.open .orsy-select-options {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.orsy-select-option {
    padding: 0.7rem 1rem; border-radius: 10px;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.12s ease;
    font-size: 0.9rem;
    color: var(--text-main);
}
.orsy-select-option:hover { background: rgba(255,255,255,0.06); }
.orsy-select-option.selected { background: var(--primary-gradient); color: white; font-weight: 600; }

.orsy-select-options::-webkit-scrollbar { width: 5px; }
.orsy-select-options::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }

body.light-mode .orsy-select-trigger { background: white; border-color: #cbd5e1; color: #1e293b; }
body.light-mode .orsy-select-options { background: rgba(255,255,255,0.97); border-color: #e2e8f0; box-shadow: 0 20px 30px rgba(0,0,0,0.1); }
body.light-mode .orsy-select-option { color: #1e293b; }
body.light-mode .orsy-select-option:hover { background: rgba(0,0,0,0.04); }

/* ── Warning Pulse ── */
.warning-pulse {
    display: inline-block; width: 8px; height: 8px;
    background: var(--error); border-radius: 50%;
    margin-right: 8px; vertical-align: middle;
    box-shadow: 0 0 0 rgba(239,68,68,0.4);
    animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fadeIn { animation: fadeIn 0.4s ease-out; }

/* ── Utilities ── */
.text-error { color: var(--error) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.col-6 { flex: 1 1 calc(50% - 0.5rem); }
.col-4 { flex: 1 1 calc(33.333% - 0.67rem); }
.col-3 { flex: 1 1 calc(25% - 0.75rem); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
}

/* --- LOCAL CUSTOM SELECT (sales.php) --- */
.custom-select-container {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 46px;
    position: relative;
}

.custom-select-trigger::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.custom-select-container.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-select-container.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-trigger.urgent {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.4);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 5px;
    z-index: 10000;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.35);
    display: none;
    max-height: 280px;
    overflow-y: auto;
}

.custom-select-container.open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: background 0.12s ease;
    margin-bottom: 2px;
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.custom-select-option.selected {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.custom-select-option.urgent {
    color: #ef4444;
    font-weight: 600;
}

body.light-mode .custom-select-trigger {
    background: white;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.light-mode .custom-select-options {
    background: rgba(255, 255, 255, 0.97);
    border-color: #e2e8f0;
}

body.light-mode .custom-select-option {
    color: #1e293b;
}

body.light-mode .custom-select-option:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* --- LOGIN PAGE FIXES --- */
.logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-section img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
    display: block;
    margin: 0 auto;
}

/* Fix browser autofill yellow background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.9) inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc !important;
    border-color: var(--surface-border) !important;
    transition: background-color 9999s ease-in-out 0s;
}

body.light-mode input:-webkit-autofill,
body.light-mode input:-webkit-autofill:hover,
body.light-mode input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b !important;
}

/* Login page h1 */
.login-container h1 {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    -webkit-text-fill-color: var(--text-main);
    background: none;
}

/* Blob background shapes */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.blob-1 {
    width: 500px; height: 500px;
    background: #6366f1;
    top: -200px; left: -200px;
}
.blob-2 {
    width: 400px; height: 400px;
    background: #a855f7;
    bottom: -150px; right: -100px;
}

.login-page { position: relative; z-index: 1; }
.glass-card { position: relative; z-index: 1; }

/* --- HEADING COLOR FIX --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

/* Override only for explicit gradient text */
h1.gradient-text, .gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Ensure page-info always visible */
.page-info h2 {
    color: var(--text-main) !important;
    -webkit-text-fill-color: var(--text-main) !important;
    background: none !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.page-info p {
    color: var(--text-muted) !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* List container headings */
.list-container h1 {
    color: var(--text-main) !important;
    -webkit-text-fill-color: var(--text-main) !important;
    background: none !important;
}

/* body.modern-theme is same as body */
body.modern-theme {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark) !important;
    color: var(--text-main);
}

/* --- FILTER BAR Z-INDEX FIX (dropdown felett legyen a t�bla) --- */
.filter-bar {
    position: relative;
    z-index: 200;
}

/* Biztos�tsuk, hogy az options kont�ner val�ban fel�lre ker�lj�n */
.orsy-select-wrapper {
    position: relative;
    z-index: 201;
}

.orsy-select-options {
    z-index: 9999 !important;
}

.custom-select-container {
    position: relative;
    z-index: 201;
}

.custom-select-options {
    z-index: 9999 !important;
}

/* A t�bl�zat alacsonyabb stacking contextet kapjon */
.table-wrapper,
.data-table-wrapper {
    position: relative;
    z-index: 1;
}

/* --- BTN-ADD: �J �RAJ�NLAT GOMB --- */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-gradient);
    color: white !important;
    text-decoration: none !important;
    border: none;
    border-radius: 14px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
    filter: brightness(1.1);
}

.btn-add:active {
    transform: translateY(-1px);
}

.btn-add i {
    font-size: 0.85rem;
}

/* --- BTN-SM: Kis akci�gombok (Megnyit�s, Aj�nlat k�sz�t�se) --- */
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent) !important;
    transform: translateY(-1px);
}

/* Ha van background inline override (pl. Aj�nlat k�sz�t�se) */
.btn-sm[style*="background"] {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-sm[style*="background"]:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    color: white !important;
}

body.light-mode .btn-sm {
    background: rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
    color: #1e293b !important;
}

body.light-mode .btn-sm:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary) !important;
}

/* --- MODAL (surveys, �ltal�nos) --- */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

body.light-mode .modal-content {
    background: #ffffff;
}

/* Fix flexbox overflow for wide tables */
.main-content { min-width: 0 !important; }
.table-wrapper { max-width: 100% !important; }

.app-container { max-width: 100vw; overflow-x: hidden; }
.main-content { max-width: calc(100vw - 260px); } @media (max-width: 1024px) { .main-content { max-width: 100vw !important; } }


/* Fix z-index for open select wrappers */
.orsy-select-wrapper.open { z-index: 9999 !important; }
.custom-select-container.open { z-index: 9999 !important; }

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}
.toast {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
}
.toast.hiding {
    animation: toastSlideOut 0.3s forwards;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-icon {
    font-size: 1.5rem;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }
.toast-content { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 0.25rem; font-size: 0.9rem; }
.toast-message { font-size: 0.8rem; color: var(--text-muted); }
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
