/* ============================================
   ALWA Marketing - Zeiterfassung & Urlaub
   Design System v2 — "Refined Warmth"
   Typography: Syne (display) + Outfit (body)
   ============================================ */

/* ---------- DESIGN TOKENS ---------- */

:root {
    /* Brand — unchanged */
    --primary: #E86A2A;
    --primary-dark: #CC5A1E;
    --primary-light: #F5A66E;
    --primary-bg: #FFF5EE;
    --secondary: #1E293B;
    --secondary-light: #334155;

    /* Accents — unchanged */
    --accent-green: #22C55E;
    --accent-green-dark: #16A34A;
    --accent-green-bg: #F0FDF4;
    --accent-red: #EF4444;
    --accent-red-bg: #FEF2F2;
    --accent-yellow: #F59E0B;
    --accent-yellow-bg: #FFFBEB;
    --accent-blue: #3B82F6;
    --accent-blue-bg: #EFF6FF;

    /* Neutrals — warmed up */
    --text-primary: #1A1D23;
    --text-secondary: #5C6370;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --bg-page: #F7F6F3;
    --bg-white: #FFFFFF;
    --bg-sidebar: #151921;
    --bg-sidebar-hover: rgba(255,255,255,0.06);
    --bg-sidebar-active: var(--primary);

    /* Shadows — layered for depth */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
    --shadow-primary: 0 4px 16px rgba(232,106,42,0.25);

    /* Radii — rounder for modern feel */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s;
    --t-base: 0.25s;
    --t-slow: 0.4s;

    /* Fonts */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --sidebar-w: 272px;
    --header-h: 64px;
}

/* ---------- RESET & BASE ---------- */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(232,106,42,0.15);
    color: var(--primary-dark);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232,106,42,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232,106,42,0.08) 0%, transparent 50%),
        linear-gradient(160deg, #12151C 0%, #1A1E28 40%, #1E2230 100%);
    overflow: hidden;
}

/* Geometric decorations */
.login-screen::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(232,106,42,0.1);
    border-radius: 50%;
    top: -120px;
    right: -80px;
    animation: floatSlow 20s ease-in-out infinite;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(232,106,42,0.06);
    border-radius: 50%;
    bottom: -60px;
    left: -60px;
    animation: floatSlow 25s ease-in-out infinite reverse;
}

.login-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
    animation: cardEnter 0.6s var(--ease-out) both;
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 68px;
    height: 68px;
    background: var(--bg-white);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    border: 2px solid rgba(232,106,42,0.15);
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* ---------- FORMS ---------- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #D1D5DB;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,106,42,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%235C6370'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Workday chips — multi-select toggle buttons */
.workday-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.workday-chip {
    width: auto;
    min-width: 48px;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}
.workday-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.workday-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.workday-chip.active:hover {
    background: var(--primary-dark, #d05a1f);
}

/* Safety override: prevent .form-group input rules from breaking checkboxes */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    -webkit-appearance: auto;
    appearance: auto;
    margin: 0 6px 0 0;
}

.login-error {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: 1px solid rgba(239,68,68,0.15);
    animation: shake 0.4s ease;
}

.login-demo-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.8;
}

.login-demo-info p {
    margin-bottom: 2px;
}

.login-demo-info strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--t-base) var(--ease-out);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-success:hover {
    background: var(--accent-green-dark);
    box-shadow: 0 4px 16px rgba(34,197,94,0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 16px rgba(239,68,68,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
}

.btn-xs {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
    padding: 13px 22px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- SIDEBAR ---------- */

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--t-slow) var(--ease-out);
    border-right: 1px solid rgba(255,255,255,0.04);
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-w)));
}

.sidebar-header {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-sm {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(232,106,42,0.3);
    overflow: hidden;
    padding: 5px;
}

.logo-icon-sm img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    display: none;
    transition: color var(--t-fast);
}

.sidebar-toggle:hover {
    color: rgba(255,255,255,0.8);
}

.sidebar-profile {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(232,106,42,0.3);
    overflow: hidden;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.profile-role {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 2px 10px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--t-base) var(--ease-out);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.sidebar-nav li a:hover {
    color: rgba(255,255,255,0.95);
    background: var(--bg-sidebar-hover);
}

.sidebar-nav li a.active {
    color: white;
    background: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(232,106,42,0.3);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    opacity: 0.85;
}

.sidebar-nav li a.active i {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    min-width: 22px;
    text-align: center;
    line-height: 1.4;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 14px 24px;
}

.nav-section-label {
    padding: 12px 26px 6px;
    font-family: var(--font-display);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25);
    font-weight: 600;
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    width: 100%;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-body);
    transition: all var(--t-base) var(--ease-out);
}

.btn-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #FCA5A5;
    border-color: rgba(239,68,68,0.2);
}

/* ---------- MAIN CONTENT ---------- */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    transition: margin-left var(--t-slow) var(--ease-out);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

.top-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 32px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    margin-right: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
    background: var(--border-light);
}

.header-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-date {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--t-fast);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.header-user:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.header-user i {
    font-size: 22px;
}

.content-wrapper {
    padding: 32px;
    flex: 1;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow var(--t-base), transform var(--t-base);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-page);
}

.mb-4 { margin-bottom: 16px; }

/* ---------- STATS GRID ---------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--t-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-light);
    transition: background var(--t-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card:hover::before {
    background: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.orange { background: var(--primary-bg); color: var(--primary); }
.stat-icon.green { background: var(--accent-green-bg); color: var(--accent-green); }
.stat-icon.red { background: var(--accent-red-bg); color: var(--accent-red); }
.stat-icon.blue { background: var(--accent-blue-bg); color: var(--accent-blue); }
.stat-icon.yellow { background: var(--accent-yellow-bg); color: var(--accent-yellow); }

.stat-content h4 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

.stat-positive { color: var(--accent-green) !important; }
.stat-negative { color: var(--accent-red) !important; }

/* ============================================
   TABLES
   ============================================ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 14px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: middle;
}

table tbody tr {
    transition: background var(--t-fast);
}

table tbody tr:hover {
    background: rgba(232,106,42,0.02);
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tfoot td {
    padding: 14px 18px;
}

/* Status labels */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.status-pending {
    background: var(--accent-yellow-bg);
    color: #B45309;
}

.status-approved {
    background: var(--accent-green-bg);
    color: #15803D;
}

.status-rejected {
    background: var(--accent-red-bg);
    color: #B91C1C;
}

.status-active {
    background: var(--accent-blue-bg);
    color: #1D4ED8;
}

.status-completed {
    background: #F0FDF4;
    color: #15803D;
}

.status-cancelled {
    background: var(--border-light);
    color: var(--text-muted);
}

/* ============================================
   TIME TRACKER
   ============================================ */

.time-tracker {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

/* Subtle diagonal line texture */
.time-tracker::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(232,106,42,0.015) 20px,
            rgba(232,106,42,0.015) 21px
        );
    pointer-events: none;
}

.timer-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
    position: relative;
    z-index: 1;
}

.timer-unit {
    text-align: center;
}

.timer-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--t-base) var(--ease-out);
    background: var(--bg-white);
}

.timer-circle.running {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.1), 0 0 24px rgba(34,197,94,0.15);
    animation: timerPulse 2s ease-in-out infinite;
}

.timer-circle.paused {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 4px rgba(245,158,11,0.1);
}

.timer-number {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.timer-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    font-weight: 500;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 28px 0;
    position: relative;
    z-index: 1;
}

.btn-timer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    transition: all var(--t-base) var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-timer.start {
    background: var(--accent-green);
    box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}
.btn-timer.start:hover {
    background: var(--accent-green-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34,197,94,0.4);
}

.btn-timer.pause {
    background: var(--accent-yellow);
    box-shadow: 0 4px 16px rgba(245,158,11,0.35);
}
.btn-timer.pause:hover {
    background: #D97706;
    transform: scale(1.1);
}

.btn-timer.stop {
    background: var(--accent-red);
    box-shadow: 0 4px 16px rgba(239,68,68,0.35);
}
.btn-timer.stop:hover {
    background: #DC2626;
    transform: scale(1.1);
}

.btn-timer:active {
    transform: scale(0.95) !important;
}

.timer-info {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 1;
}

.timer-info-item {
    text-align: center;
}

.timer-info-label {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-weight: 500;
}

.timer-info-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: -0.02em;
}

.timer-schedule {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-grid .full-width {
    grid-column: 1 / -1;
}

/* ============================================
   CALENDAR
   ============================================ */

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-nav button {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--t-fast);
}

.calendar-nav button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.calendar-month-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
    letter-spacing: -0.01em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 10px 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 70px;
    padding: 6px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 12px;
    position: relative;
    cursor: pointer;
    transition: all var(--t-fast);
}

.calendar-day:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    transform: scale(1.02);
    z-index: 1;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 1px var(--primary);
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.day-number {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.day-event {
    display: block;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.day-event.urlaub { background: #DBEAFE; color: #1E40AF; }
.day-event.krank { background: #FEE2E2; color: #991B1B; }
.day-event.abwesend { background: #FEF3C7; color: #92400E; }
.day-event.homeoffice { background: #D1FAE5; color: #065F46; }
.day-event.feiertag { background: #E0E7FF; color: #3730A3; }

.calendar-day.weekend {
    background: var(--border-light);
}

/* ============================================
   EMPLOYEE PROFILE CARD
   ============================================ */

.profile-card {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.profile-card-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px var(--primary-bg), var(--shadow-primary);
}

/* Avatar images (profile pictures) */
.profile-avatar img,
.profile-card-avatar img,
.emp-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Click-to-upload overlay on profile page */
.avatar-upload {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    opacity: 0;
    transition: opacity var(--t-base) var(--ease-out);
}

.avatar-upload:hover .avatar-upload-overlay {
    opacity: 1;
}

.profile-card-info h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.profile-card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.profile-card-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-card-meta span i {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   VACATION OVERVIEW
   ============================================ */

.vacation-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.vacation-item {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: transform var(--t-base) var(--ease-out);
}

.vacation-item:hover {
    transform: translateY(-2px);
}

.vacation-item-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.vacation-item-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vacation-item-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   ADMIN EMPLOYEE LIST
   ============================================ */

.employee-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.employee-card {
    background: var(--bg-white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--t-base) var(--ease-out);
    cursor: pointer;
}

.employee-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.emp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.emp-info {
    flex: 1;
    min-width: 0;
}

.emp-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

.emp-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.emp-actions {
    display: flex;
    gap: 6px;
}

/* ============================================
   FILTER BAR
   ============================================ */

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input {
    padding: 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    background: var(--bg-white);
    color: var(--text-primary);
    min-width: 160px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%235C6370'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.filter-bar input {
    background-image: none;
    padding-right: 16px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,106,42,0.1);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.2;
}

.empty-state h4 {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 24px;
    gap: 0;
}

.tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--t-base);
    font-family: var(--font-body);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-info {
    background: var(--accent-blue-bg);
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.alert-success {
    background: var(--accent-green-bg);
    color: #15803D;
    border: 1px solid #BBF7D0;
}

.alert-warning {
    background: var(--accent-yellow-bg);
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-danger {
    background: var(--accent-red-bg);
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalEnter 0.35s var(--ease-out) both;
}

.modal-header {
    padding: 24px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-close {
    background: var(--border-light);
    border: none;
    font-size: 15px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent-green);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: toastIn 0.4s var(--ease-out);
    font-size: 14px;
    font-weight: 500;
}

.toast.error { border-left-color: var(--accent-red); }
.toast.warning { border-left-color: var(--accent-yellow); }
.toast.info { border-left-color: var(--accent-blue); }

/* ============================================
   HOURS REPORT
   ============================================ */

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 22px;
    background: var(--bg-page);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.report-summary-item {
    text-align: center;
}

.report-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.report-summary-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.export-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes timerPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.1), 0 0 24px rgba(34,197,94,0.12); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0.06), 0 0 40px rgba(34,197,94,0.18); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(3deg); }
    66% { transform: translate(-10px, 10px) rotate(-2deg); }
}

/* Staggered card entrance on load */
.stats-grid .stat-card {
    animation: fadeInUp 0.5s var(--ease-out) both;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }

/* ============================================
   RESPONSIVE — TABLET (1024px)
   ============================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE — MOBILE (768px)
   ============================================ */

@media (max-width: 768px) {
    :root {
        --sidebar-w: 280px;
        --header-h: 56px;
    }

    /* Sidebar as full-height overlay */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    /* Dark overlay behind sidebar — on main-content so sidebar clicks aren't blocked */
    .sidebar.open ~ .main-content::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 99;
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .top-header {
        padding: 0 16px;
        height: var(--header-h);
    }

    .header-title {
        font-size: 17px;
    }

    .header-date {
        display: none;
    }

    .content-wrapper {
        padding: 16px;
    }

    /* Stats stacked 2-col on tablet, will go 1-col at 480px */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-content h4 {
        font-size: 11px;
    }

    /* Timer responsive */
    .time-tracker {
        padding: 28px 20px;
    }

    .timer-display {
        gap: 10px;
    }

    .timer-circle {
        width: 88px;
        height: 88px;
    }

    .timer-number {
        font-size: 26px;
    }

    .timer-info {
        gap: 24px;
        flex-wrap: wrap;
    }

    .btn-timer {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }

    /* Profile responsive */
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-card-meta {
        justify-content: center;
    }

    .profile-card-avatar {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Calendar */
    .calendar-day {
        min-height: 50px;
        padding: 4px;
    }

    .day-event {
        font-size: 9px;
        padding: 1px 3px;
    }

    /* Safe area padding for notched devices */
    .sidebar {
        padding-top: env(safe-area-inset-top);
    }

    .top-header {
        padding-top: env(safe-area-inset-top);
    }

    /* ===== TABLES → CARD LAYOUT auf Mobile ===== */
    /* Kein Scrollen, kein Zoomen — alles passt auf einen Screen */
    /* Ausnahme: .calendar-table behält klassisches Layout */

    .table-responsive {
        overflow-x: visible;
        overflow: visible;
    }

    .table-responsive::after {
        display: none;
    }

    /* Kalender-Tabelle: weiterhin scrollbar */
    .table-responsive:has(.calendar-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table:not(.calendar-table) {
        display: block;
        width: 100%;
    }

    table:not(.calendar-table) thead {
        display: none;
    }

    table:not(.calendar-table) tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    table:not(.calendar-table) tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 12px;
        background: var(--bg-white);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        padding: 12px 14px;
        position: relative;
    }

    table:not(.calendar-table) tbody tr:hover {
        background: var(--bg-white);
    }

    table:not(.calendar-table) tbody td {
        display: inline-block;
        padding: 0;
        border: none;
        font-size: 13px;
        white-space: normal;
        background: none !important;
        box-shadow: none !important;
        position: static;
    }

    /* Erste Spalte = Karten-Titel (volle Breite) */
    table:not(.calendar-table) tbody td:first-child {
        width: 100%;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-primary);
        padding-bottom: 4px;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: 4px;
        position: static;
        box-shadow: none;
    }

    /* Versteckte Spalten bleiben versteckt */
    table:not(.calendar-table) tbody td.hide-mobile {
        display: none !important;
    }

    /* Letzte Spalte (Aktionen) rechts oben positionieren */
    table:not(.calendar-table) tbody td:last-child {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    /* Touch-friendly action buttons */
    .table-actions .btn-xs,
    table td:last-child .btn-xs {
        padding: 8px 10px;
        min-height: 40px;
        min-width: 40px;
    }

    .table-actions {
        gap: 6px;
    }

    /* Status-Badges */
    .status-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* Tfoot als Summen-Card */
    table:not(.calendar-table) tfoot {
        display: block;
        margin-top: 8px;
    }

    table:not(.calendar-table) tfoot tr {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        background: var(--bg-page);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 12px 14px;
    }

    table:not(.calendar-table) tfoot td {
        display: inline-block;
        padding: 0;
        border: none;
        font-size: 13px;
        font-weight: 700;
        background: none !important;
        box-shadow: none !important;
        position: static;
    }

    table:not(.calendar-table) tfoot td:first-child {
        width: 100%;
        position: static;
        box-shadow: none;
    }

    /* Pendente Einträge: gelber Rand statt Hintergrund (da Card schon weiß) */
    table:not(.calendar-table) tbody tr[style*="background:var(--accent-yellow-bg)"] {
        border-left: 3px solid var(--accent-yellow);
    }

    /* Filter bar full-width */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar select,
    .filter-bar input {
        min-width: auto;
        width: 100%;
    }

    .filter-bar .btn {
        width: 100%;
        justify-content: center;
    }

    /* Quick actions grid: 1 column on mobile */
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    /* Page header stacks on mobile */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal footer: stack buttons on mobile */
    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-footer-split {
        flex-direction: column;
    }

    .modal-footer-split .btn-danger {
        order: 1;
        width: 100%;
        margin-top: 12px;
    }

    .modal-footer-split .flex {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
        width: 100%;
    }

    .modal-footer-split .flex .btn {
        width: 100%;
        justify-content: center;
    }

    /* Calendar legend grid */
    .calendar-legend {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 16px;
    }

    /* Calendar nav buttons: 44px touch target */
    .calendar-nav button {
        width: 44px;
        height: 44px;
    }

    /* Calendar table: smaller min-width for mobile */
    .calendar-table {
        min-width: 600px;
    }

    /* Toast with safe-area inset */
    .toast-container {
        bottom: env(safe-area-inset-bottom, 16px);
    }

    /* Employee cards */
    .employee-card-grid {
        grid-template-columns: 1fr;
    }

    /* Modal fullscreen on mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-container {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        animation: modalSlideUp 0.35s var(--ease-out) both;
    }

    .modal-header {
        padding: 20px 20px 16px;
    }

    .modal-body {
        padding: 20px;
    }

    /* Toasts at bottom on mobile */
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }

    /* Cards */
    .card-header {
        padding: 16px 18px;
    }

    .card-body {
        padding: 18px;
    }

    .card-header h3 {
        font-size: 15px;
    }

    /* Report summary */
    .report-summary {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }

    /* Vacation overview */
    .vacation-overview {
        grid-template-columns: 1fr 1fr;
    }

    /* Login */
    .login-card {
        padding: 36px 28px;
        border-radius: var(--radius-lg);
    }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE — SMALL PHONE (480px)
   ============================================ */

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
        align-items: center;
    }

    .login-card {
        padding: 28px 20px;
    }

    .login-logo h1 {
        font-size: 21px;
    }

    .timer-display {
        gap: 8px;
    }

    .timer-circle {
        width: 78px;
        height: 78px;
        border-width: 2.5px;
    }

    .timer-number {
        font-size: 22px;
    }

    .timer-label {
        font-size: 9px;
    }

    .btn-timer {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .timer-info {
        gap: 16px;
    }

    .timer-info-value {
        font-size: 16px;
    }

    .vacation-overview {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .vacation-item {
        padding: 14px;
    }

    .vacation-item-value {
        font-size: 18px;
    }

    .header-title {
        font-size: 15px;
    }

    .header-user span {
        display: none;
    }

    /* Compact table on small phones */
    table thead th,
    table tbody td {
        padding: 8px 8px;
        font-size: 12px;
    }

    table thead th {
        font-size: 9px;
    }

    /* Card headers stack on small phones */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }

    .card-header .btn {
        width: 100%;
        justify-content: center;
    }

    .card-body {
        padding: 14px;
    }

    .report-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .report-summary-value {
        font-size: 18px;
    }

    .content-wrapper {
        padding: 12px;
    }

    .card-header h3 {
        font-size: 14px;
    }

    /* Quick actions single column on very small */
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Calendar legend 3-col on small */
    .calendar-legend {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px 8px;
        font-size: 10px;
    }

    /* Calendar table cells smaller */
    .calendar-table th {
        font-size: 9px;
        min-width: 28px;
    }

    /* Manual entry save button fullwidth */
    .manual-save-btn {
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar, .top-header, .btn, .filter-bar, .export-actions {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .content-wrapper {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    body {
        font-size: 12px;
        background: white;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* ============================================
   RESPONSIVE HELPER CLASSES
   (moved from inline styles for media query access)
   ============================================ */

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header-text h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.page-header-text p {
    font-size: 13px;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12px;
}

.calendar-table {
    min-width: 800px;
}

.modal-footer-split {
    justify-content: space-between;
}

.emp-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
    display: inline-flex;
    vertical-align: middle;
    margin-right: 8px;
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-warning { color: var(--accent-yellow); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ============================================
   DESIGN POLISH v3 — "Elevated Craft"
   Layered refinements on existing design system.
   No overrides, only additive enhancements.
   ============================================ */

/* ---------- 1. PREMIUM TIMER ---------- */

/* Outer decorative ring for depth */
.timer-circle::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px dashed var(--border);
    opacity: 0.5;
    transition: all var(--t-base) var(--ease-out);
}

.timer-circle.running::before {
    border-color: var(--accent-green);
    opacity: 0.3;
    animation: timerRingSpin 12s linear infinite;
}

.timer-circle.paused::before {
    border-color: var(--accent-yellow);
    opacity: 0.3;
    border-style: dotted;
    animation: none;
}

/* Inner glow on timer numbers */
.timer-circle.running .timer-number {
    color: var(--accent-green-dark);
}

.timer-circle.paused .timer-number {
    color: #B45309;
}

/* Timer schedule badge */
.timer-schedule {
    background: var(--bg-page);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    font-weight: 500;
}

.timer-schedule i {
    color: var(--primary);
}

/* Refined timer info section */
.timer-info-item {
    background: var(--bg-page);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    min-width: 140px;
}

@keyframes timerRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- 2. STAT CARDS DEPTH ---------- */

/* Subtle inner shadow for carved-in feel */
.stat-card {
    background:
        linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(247,246,243,0.4) 100%);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    pointer-events: none;
}

/* Icon gets subtle gradient background on hover */
.stat-card:hover .stat-icon {
    transform: scale(1.08);
    transition: transform var(--t-base) var(--ease-spring);
}

.stat-icon {
    transition: transform var(--t-base) var(--ease-out);
    position: relative;
}

/* Individual accent colors on the top bar */
.stat-card:nth-child(1):hover::before { background: var(--primary); }
.stat-card:nth-child(2):hover::before { background: var(--accent-green); }
.stat-card:nth-child(3):hover::before { background: var(--accent-blue); }
.stat-card:nth-child(4):hover::before { background: var(--accent-red); }

/* ---------- 3. REFINED TABLES ---------- */

/* Zebra-striping — very subtle warm tint on even rows */
table tbody tr:nth-child(even) {
    background: rgba(247,246,243,0.5);
}

table tbody tr:nth-child(even):hover {
    background: rgba(232,106,42,0.03);
}

/* Stronger first column for context anchoring */
table tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Table footer polish */
table tfoot td {
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

table tfoot tr {
    border-top: 2px solid var(--border);
}

/* Better table action buttons — pill shape */
.table-actions .btn-xs {
    border-radius: 50px;
    transition: all var(--t-fast) var(--ease-out);
}

.table-actions .btn-xs:hover {
    transform: translateY(-1px);
}

/* ---------- 4. FILTER BAR CAPSULES ---------- */

.filter-bar {
    background: var(--bg-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.filter-bar select,
.filter-bar input {
    border-radius: 50px;
    padding-left: 18px;
    font-weight: 500;
    background-color: var(--bg-page);
    border-color: var(--border-light);
}

.filter-bar select:hover,
.filter-bar input:hover {
    border-color: var(--border);
    background-color: var(--bg-white);
}

.filter-bar .btn {
    border-radius: 50px;
}

/* ---------- 5. MICRO-ANIMATIONS ---------- */

/* Cards stagger on page change */
.card {
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.dashboard-grid .card:nth-child(1) { animation-delay: 0.06s; }
.dashboard-grid .card:nth-child(2) { animation-delay: 0.12s; }
.dashboard-grid .card:nth-child(3) { animation-delay: 0.18s; }
.dashboard-grid .card:nth-child(4) { animation-delay: 0.24s; }

/* Sidebar active item transition */
.sidebar-nav li a {
    position: relative;
    overflow: hidden;
}

.sidebar-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-light);
    border-radius: 0 4px 4px 0;
    transition: height var(--t-base) var(--ease-out);
}

.sidebar-nav li a:hover::before {
    height: 60%;
}

.sidebar-nav li a.active::before {
    height: 0; /* Active has full bg, no bar needed */
}

/* Button ripple-like press effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--t-fast);
}

.btn:active::after {
    opacity: 1;
}

/* Employee card hover glow */
.employee-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary-light), transparent 60%);
    opacity: 0;
    transition: opacity var(--t-base);
    z-index: -1;
}

.employee-card {
    position: relative;
}

.employee-card:hover::before {
    opacity: 0.15;
}

/* Vacation item subtle lift */
.vacation-item {
    position: relative;
    overflow: hidden;
}

.vacation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: currentColor;
    opacity: 0.15;
    border-radius: 0 2px 2px 0;
}

/* Modal backdrop refined */
.modal-overlay {
    background: rgba(21, 25, 33, 0.55);
}

/* Toast slide-in with subtle bounce */
@keyframes toastInBounce {
    0% { opacity: 0; transform: translateX(40px) scale(0.95); }
    60% { transform: translateX(-4px) scale(1.01); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.toast {
    animation: toastInBounce 0.5s var(--ease-out);
    border-left-width: 3px;
}

/* ---------- 6. PROJECT BADGES ---------- */

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: all var(--t-fast);
    border-width: 1px;
    border-style: solid;
}

.project-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ---------- 7. ADDITIONAL POLISH ---------- */

/* Scrollbar styling for main content */
.content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Profile avatar ring animation on hover */
.profile-card-avatar {
    transition: box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}

.profile-card-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--primary-bg), 0 0 0 8px rgba(232,106,42,0.1), var(--shadow-primary);
}

/* Report summary items — refined */
.report-summary-item {
    position: relative;
    padding: 8px 0;
}

.report-summary-item + .report-summary-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15%;
    height: 70%;
    width: 1px;
    background: var(--border);
}

/* Calendar table hover states */
.calendar-table tbody tr:hover td {
    background: rgba(232,106,42,0.03);
}

/* Header subtle bottom gradient */
.top-header {
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
}

/* Login card floating particles effect */
.login-screen {
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(232,106,42,0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(232,106,42,0.1), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(232,106,42,0.12), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(232,106,42,0.08), transparent),
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232,106,42,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232,106,42,0.08) 0%, transparent 50%),
        linear-gradient(160deg, #12151C 0%, #1A1E28 40%, #1E2230 100%);
}

/* Page header polish */
.page-header-text h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-header-text p {
    color: var(--text-muted);
}

/* Alert icons subtle animation */
.alert i {
    animation: fadeInUp 0.3s var(--ease-out) both;
}

/* Empty table state gets a subtle pattern */
table tbody td[colspan] {
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 12px,
            rgba(0,0,0,0.008) 12px,
            rgba(0,0,0,0.008) 13px
        );
}

/* Mobile Card-Layout Ergänzungen */
@media (max-width: 768px) {
    .filter-bar {
        padding: 12px 14px;
    }

    .timer-circle::before {
        inset: -6px;
    }

    .timer-info-item {
        padding: 10px 16px;
        min-width: auto;
        flex: 1;
    }

    .report-summary-item + .report-summary-item::before {
        display: none;
    }

    /* Versteckte Spalten */
    table .hide-mobile,
    table th.hide-mobile,
    table td.hide-mobile {
        display: none !important;
    }

    /* Zeitspanne unter dem Datum */
    .mobile-time-sub {
        display: inline !important;
    }

    /* Alert-Banner */
    .alert {
        font-size: 13px;
        padding: 14px 16px;
    }

    .alert div[style*="display:flex"] {
        flex-direction: column;
        gap: 6px !important;
    }

    /* Timer-Buttons */
    .timer-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .btn-timer.forgot {
        width: auto;
        height: auto;
        padding: 10px 16px;
        border-radius: 50px;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .btn-timer.forgot::after {
        content: 'Vergessen';
        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 600;
    }

    /* Flex-gap helper */
    .flex.gap-3 {
        flex-direction: column;
        width: 100%;
    }

    .flex.gap-3 select {
        width: 100%;
    }

    /* Kalender-Tabelle behält klassisches Layout (braucht Scroll) */
    .calendar-table,
    .calendar-table thead,
    .calendar-table tbody,
    .calendar-table tr,
    .calendar-table th,
    .calendar-table td {
        display: revert;
    }

    .calendar-table thead {
        display: table-header-group;
    }

    .card-body:has(.calendar-table) {
        overflow-x: auto;
    }

    /* Projekt-Badges inline */
    .project-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .timer-circle::before {
        inset: -4px;
    }

    .filter-bar select,
    .filter-bar input {
        border-radius: var(--radius-sm);
    }

    .timer-schedule {
        font-size: 12px;
        padding: 6px 14px;
        text-align: center;
    }

    /* Karten noch kompakter */
    table tbody tr {
        padding: 10px 12px;
        gap: 4px 8px;
    }

    table tbody td {
        font-size: 12px;
    }

    table tbody td:first-child {
        font-size: 13px;
    }
}
