/* Windows 11 / Fluent-inspiriertes Design */

:root {
    --accent: #0067C0;
    --accent-dark: #004E8C;
    --accent-light: #E5F1FB;
    --bg: #F3F3F3;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.6);
    --text: #1B1B1B;
    --text-secondary: #5D5D5D;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    --danger: #C42B1C;
    --success: #107C10;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI Variable Text', 'Segoe UI', 'Segoe UI Emoji', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, #d8e9fb 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, #e6d9fb 0%, transparent 40%),
        var(--bg);
    min-height: 100vh;
}

/* Layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 20px;
    font-weight: 600;
    font-size: 17px;
}

.brand-icon { font-size: 22px; }

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: background 0.15s ease;
}

.nav-item:hover { background: rgba(0, 0, 0, 0.05); }

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 600;
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 12px;
    margin-top: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-secondary); }

.logout-link {
    display: block;
    text-align: center;
    padding: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--danger);
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.logout-link:hover { background: rgba(196, 43, 28, 0.08); }

.content {
    flex: 1;
    padding: 28px 36px;
    overflow-y: auto;
}

.content-plain {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Typography */
h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.subtitle { color: var(--text-secondary); margin: 0 0 24px; font-size: 14px; }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

/* Card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--accent-dark); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-row { margin-bottom: 16px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=time], input[type=file], input[type=month],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

fieldset {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 0 0 20px;
}
legend { font-weight: 600; padding: 0 8px; color: var(--accent-dark); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary { background: rgba(0,0,0,0.06); color: var(--text); }
.btn-secondary:hover { background: rgba(0,0,0,0.1); }

.btn-danger { background: #FDE7E5; color: var(--danger); }
.btn-danger:hover { background: #FBD2CE; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,0.08); }
th { color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(0,0,0,0.02); }

/* Employee list photo */
.employee-photo {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--accent-light);
}
.employee-photo-lg {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--accent-light);
    border: 3px solid #fff; box-shadow: var(--shadow);
}

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #FDE7E5; color: var(--danger); }
.alert-success { background: #DFF6DD; color: var(--success); }

/* Login page */
.login-card {
    width: 380px;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 32px;
    text-align: center;
}
.login-logo { font-size: 40px; margin-bottom: 8px; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-blue { background: var(--accent-light); color: var(--accent-dark); }
.badge-green { background: #DFF6DD; color: var(--success); }
.badge-orange { background: #FFF4CE; color: #8A6D00; }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.tab-link {
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}
.tab-link.active { color: var(--accent-dark); border-color: var(--accent); }

.chart-wrap { background: var(--card-bg); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.chart-wrap-compact { max-width: 360px; height: 360px; }
.table-scroll { overflow-x: auto; }
.report-filter { align-items: end; }
.report-filter-action { display: flex; align-items: end; }
.balance-positive { color: var(--success); }
.balance-negative { color: var(--danger); }

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: 32px;
    overflow-y: auto;
}
.modal.is-open { display: flex; align-items: flex-start; justify-content: center; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); }
.modal-dialog {
    position: relative;
    width: min(1280px, 100%);
    margin: auto 0;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-actions { flex-shrink: 0; }
.app-footer {
    position: fixed;
    left: 16px;
    bottom: 12px;
    z-index: 2;
    color: var(--text-secondary);
    font-size: 11px;
}

@media print {
    @page { size: A4 landscape; margin: 10mm; }
    body { background: #fff; color: #000; }
    .sidebar, .content > :not(.modal), .modal-backdrop, .modal-actions, .report-filter { display: none !important; }
    .app-shell, .content { display: block; padding: 0; }
    .modal, .modal.is-open { display: block; position: static; padding: 0; overflow: visible; }
    .modal-dialog { width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .modal-header { display: block; margin-bottom: 10px; }
    .modal-header .subtitle { margin-bottom: 0; }
    .table-scroll { overflow: visible; }
    .work-time-table { width: 100%; font-size: 9px; }
    .work-time-table th, .work-time-table td { padding: 4px; color: #000; background: #fff; border: 1px solid #000; }
    .work-time-table th { font-size: 8px; }
    .work-time-table thead { display: table-header-group; }
    .work-time-table tr { break-inside: avoid; }
    .app-footer { display: block; position: fixed; left: 10mm; bottom: 4mm; z-index: 20; color: #000; font-size: 8px; }
    .print-financial-report .content > :not(.modal) { display: block !important; }
    .print-financial-report .modal { display: none !important; }
    .print-financial-report .print-button { display: none !important; }
    .print-financial-report .card,
    .print-financial-report .chart-wrap,
    .print-financial-report .stat-card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
    .print-financial-report .card-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}

.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
