:root {
    --bg-dark: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #fe6302;
    --accent-hover: #db5300;
    --danger: #ef4444;
    --success: #10b981;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.dashboard-canvas {
    position: fixed !important;
    top: 0;
    left: 260px !important; /* Sidebar width */
    width: calc(100% - 260px) !important;
    height: 100vh !important;
    z-index: 0 !important;
}

.auth-card {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container p {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 99, 2, 0.15);
    background-color: #ffffff;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-top: 0.5rem;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(254, 99, 2, 0.25);
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-outline:hover {
    background-color: #f1f5f9;
    color: var(--accent);
    box-shadow: none;
    transform: none;
}

/* Dashboard Layout */
.dashboard-layout { display: flex; flex: 1; }

.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sidebar-header img { max-width: 180px; }

.sidebar-nav { list-style: none; flex: 1; }
.sidebar-nav li { margin-bottom: 0.5rem; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.85rem 2rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(254, 99, 2, 0.08);
    color: var(--accent);
    border-right: 3px solid var(--accent);
}

.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    position: relative;
    z-index: 10;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* Tables */
.table-container {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 1.2rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background-color: #f8fafc; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
tr:hover td { background-color: rgba(0,0,0,0.01); }

.badge { padding: 0.35rem 0.6rem; border-radius: 6px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.badge-admin { background: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-zamestnanec { background: rgba(254, 99, 2, 0.1); color: var(--accent); border: 1px solid rgba(254, 99, 2, 0.2); }
.badge-klient { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }

/* Alerts */
.alert { padding: 1.2rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 500; text-align: center;}
.alert-error { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-success { background-color: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: var(--bg-card);
    width: 100%; max-width: 650px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: translateY(-20px);
    transition: transform 0.3s;
    overflow: hidden;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-body { padding: 1.5rem; max-height: 70vh; overflow-y: auto; }
.modal-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
}
.close-modal {
    background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 0;
}
.close-modal:hover { color: var(--danger); }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; gap: 0.5rem; }
.tab-btn {
    padding: 0.75rem 1rem; background: none; border: none;
    border-bottom: 2px solid transparent; color: var(--text-muted);
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

