/* style.css - Premium Modern Dark Mode Design System */

:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(20, 26, 42, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --primary-hover: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-glow: rgba(16, 185, 129, 0.25);
    
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --danger-glow: rgba(244, 63, 94, 0.25);
    
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
    
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Authentication pages styling */
.auth-body {
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
                var(--bg-color);
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.checkbox-group label {
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--success-glow);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--danger-glow);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Alert notifications */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Main Dashboard layout */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar navigation */
.app-sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 22, 38, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 30px 24px;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(to right, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 16px;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    gap: 12px;
    transition: all var(--transition-speed) ease;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    transition: all var(--transition-speed) ease;
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.sidebar-link:hover svg, .sidebar-link.active svg {
    stroke: #818cf8;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* App Main Content Area */
.app-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

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

.page-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Dashboard stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #6366f1;
}

.stat-card.stat-success::before {
    background: #10b981;
}

.stat-card.stat-danger::before {
    background: #f43f5e;
}

.stat-card.stat-warning::before {
    background: #f59e0b;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 8px;
}

.stat-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Dashboard dynamic workspace grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Punch-clock card specific styling */
.punch-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.clock-timer {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 20px 0;
    color: #818cf8;
}

.punch-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.working {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse-glow 2s infinite;
}

.status-badge.inactive {
    background: rgba(244, 63, 94, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.punch-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
}

.punch-btn.btn-in {
    background: var(--success-gradient);
    box-shadow: 0 8px 24px var(--success-glow);
}

.punch-btn.btn-in:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px var(--success-glow);
}

.punch-btn.btn-out {
    background: var(--danger-gradient);
    box-shadow: 0 8px 24px var(--danger-glow);
}

.punch-btn.btn-out:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px var(--danger-glow);
}

.punch-btn svg {
    width: 32px;
    height: 32px;
    stroke: white;
    margin-bottom: 8px;
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
}

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

.table tbody tr {
    transition: background-color var(--transition-speed) ease;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-holiday {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-vacation {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-regular {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.text-success {
    color: #10b981;
}

.text-danger {
    color: #f43f5e;
}

.text-warning {
    color: #f59e0b;
}

.actions-cell {
    display: flex;
    gap: 8px;
}

/* Modal and overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal {
    background: rgba(20, 26, 42, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.3s ease-out;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Responsive adjustments */
/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .app-sidebar {
        width: 100%;
        height: 65px;
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--border-color);
        background: rgba(11, 15, 25, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-brand {
        display: none;
    }
    
    .sidebar-menu {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: 100%;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        margin: 0;
    }
    
    .sidebar-menu li {
        margin-bottom: 0;
        flex: 1;
        height: 100%;
    }
    
    .sidebar-link {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px;
        padding: 4px 0;
        font-size: 0.65rem;
        height: 100%;
        border-radius: 0;
        background: transparent !important;
    }
    
    .sidebar-link svg {
        width: 20px;
        height: 20px;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .app-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 90px; /* Platz für die Bottom Bar */
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .page-header {
        margin-bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        order: 1;
    }
    
    .page-title h2 {
        font-size: 1.4rem;
    }
    
    .page-header .page-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    
    .page-header .page-actions button,
    .page-header .page-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
    
    /* Alerts immer oben anzeigen */
    .alert {
        order: 2;
    }
    
    /* Stempel-Dashboard Sortierung: Stempel-Box ganz nach oben, Statistiken drunter */
    .page-dashboard .dashboard-grid {
        order: 3;
    }
    
    .page-dashboard .stats-grid {
        order: 4;
    }
    
    /* Andere Seiten Sortierungsreihenfolge */
    .page-times .card,
    .page-vacations .card,
    .page-users .card,
    .page-settings .card,
    .page-reports .card {
        order: 3;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
        order: 4;
    }
    
    .stat-card {
        padding: 12px 14px;
    }
    
    .stat-value {
        font-size: 1.3rem;
        margin-top: 4px;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .punch-btn {
        width: 120px;
        height: 120px;
        font-size: 1rem;
    }
    
    .clock-timer {
        font-size: 2.2rem;
        margin: 15px 0;
    }
    
    .card {
        padding: 16px;
    }
    
    /* Mobile Spalten-Optimierung für Auswertung (Soll und Ist ausblenden) */
    .page-reports .table th:nth-child(3),
    .page-reports .table td:nth-child(3),
    .page-reports .table th:nth-child(5),
    .page-reports .table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 500px) {
    /* Mobile Spalten-Optimierung für Zeiten (Beschreibung/Notiz ausblenden) */
    .page-times .table th:nth-child(5),
    .page-times .table td:nth-child(5) {
        display: none;
    }
    
    /* Mobile Spalten-Optimierung für Urlaube (Beschreibung/Notiz ausblenden) */
    .page-vacations .table th:nth-child(3),
    .page-vacations .table td:nth-child(3) {
        display: none;
    }
    
    /* Mobile Spalten-Optimierung für Benutzer (Soll/Tag und Urlaub/Jahr ausblenden) */
    .page-users .table th:nth-child(3),
    .page-users .table td:nth-child(3),
    .page-users .table th:nth-child(4),
    .page-users .table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1.15rem;
    }
    
    .table th, .table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
