:root {
    --color-bg-dark: #080c14;
    --color-bg-mid: #0f172a;
    --color-bg-light: #1e293b;
    --color-pitch: #3b82f6;
    --color-pitch-bright: #60a5fa;
    --color-accent: #fbbf24;
    --color-accent-dark: #f59e0b;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-text: #ffffff;
    --color-glass: rgba(255, 255, 255, 0.05);
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --color-success: #10b981;
    --color-danger: #ef4444;
    --font-main: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shadow-glow: 0 4px 20px rgba(37, 99, 235, 0.2);
    --shadow-accent: 0 4px 20px rgba(251, 191, 36, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.2);
    --color-surface: rgba(255,255,255,0.03);
    --color-surface-hover: rgba(255,255,255,0.06);
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--color-text);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(255, 255, 255, 0.015) 60px,
            rgba(255, 255, 255, 0.015) 120px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(255, 255, 255, 0.02) 80px,
            rgba(255, 255, 255, 0.02) 160px
        ),
        radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
        linear-gradient(160deg, var(--color-bg-dark) 0%, var(--color-bg-mid) 40%, var(--color-bg-light) 100%);
    z-index: -1;
}

/* Logo Styles */
.header-logo {
    max-height: 60px;
    width: auto;
    margin-right: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Aktiver Tag Banner */
.active-day-banner {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
}

.active-day-banner h2 {
    margin: 0;
    color: white;
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.day-filter {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.day-filter .btn {
    flex: 1;
}

.day-filter .btn.active {
    background: linear-gradient(135deg, var(--color-bg-mid) 0%, var(--color-bg-light) 100%);
    border-color: var(--color-accent);
    color: var(--color-accent);
    font-weight: bold;
    box-shadow: var(--shadow-accent);
    transform: scale(1.05);
}

.day-badge {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-pitch) 100%);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--color-accent);
    box-shadow: var(--shadow-accent);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Logo Section - Above Header */
.logo-section {
    text-align: center;
    padding: 20px 0 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

.logo-section img {
    max-width: 120px;
    height: auto;
    opacity: 0.95;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.3));
}

.logo-title {
    color: white;
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 12px;
    letter-spacing: -0.02em;
}

.timezone-fix-card {
    margin-top: 20px;
    padding: 15px;
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 10px;
}

.timezone-fix-card h3 {
    color: white;
    margin-bottom: 10px;
}

.timezone-fix-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.logo-section img:hover {
    opacity: 1;
}

/* Navigation Bar */
.nav-bar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
}

.nav-logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.3));
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-title {
    color: white;
    font-size: 1.25em;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.nav-subtitle {
    color: var(--color-pitch-bright);
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--color-bg-mid) 0%, var(--color-primary) 100%);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-accent);
}

.nav-link.admin {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-color: var(--color-accent);
    color: var(--color-bg-dark);
}

.nav-link.admin:hover {
    box-shadow: var(--shadow-accent);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 20px 0;
        gap: 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
    }

    .nav-title {
        font-size: 1.1em;
    }
}

/* Header adjustments */
header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: 0;
}

h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-card);
    border-left: 3px solid rgba(34, 197, 94, 0.5);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.present {
    background: rgba(40, 167, 69, 0.25);
    border-color: rgba(40, 167, 69, 0.4);
    border-left-color: #22c55e;
}

.stat-card.absent {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.4);
    border-left-color: #ef4444;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 20px;
}

.card h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.card-hint {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-results {
    margin-top: 20px;
}

.search-input-inline {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.form-hint {
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

.form-result {
    margin-top: 20px;
}

.btn-warning {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.btn-warning:hover {
    background: var(--color-accent-dark);
}

/* Collapsible Cards */
.collapsible-card {
    overflow: hidden;
}

.collapsible-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.collapsible-card .card-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.collapsible-content {
    max-height: 1000px;
    opacity: 1;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scanner-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#scanInput {
    flex: 1;
    padding: 15px;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

#scanInput:focus {
    border-color: var(--color-pitch);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.btn {
    padding: 15px 30px;
    font-size: 1em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-pitch) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

.upload-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#fileInput {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    min-width: 200px;
    color: #333;
}

.scan-result, .upload-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    font-weight: 500;
    animation: fadeIn 0.3s;
}

.scan-details {
    text-align: left;
}

.scan-header {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.scan-info {
    display: grid;
    gap: 8px;
    font-size: 1em;
}

.scan-info div {
    padding: 5px 0;
}

.scan-info strong {
    display: inline-block;
    min-width: 100px;
    color: rgba(0, 0, 0, 0.8);
}

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

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.person-list, .history-list {
    max-height: 400px;
    overflow-y: auto;
}

.person-item, .history-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
}

.person-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.person-item:last-child, .history-item:last-child {
    border-bottom: none;
}

.person-item.absent {
    opacity: 0.8;
}

.person-item.present {
    background: rgba(76, 175, 80, 0.1);
}

.person-details {
    display: block;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.present {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.status-badge.absent {
    background: rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.person-info {
    flex: 1;
}

.person-id {
    font-weight: bold;
    color: white;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.person-name {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 5px;
}

.person-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Statistik Page */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-content {
    display: grid;
    gap: 20px;
}

.card-highlight {
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.stats-summary {
    margin-bottom: 20px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-value {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.summary-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 5px;
}

.stats-table, .stats-list, .people-table {
    overflow-x: auto;
}

.stats-table-content {
    width: 100%;
    border-collapse: collapse;
}

.stats-table-content thead {
    background: rgba(255, 255, 255, 0.2);
}

.stats-table-content th,
.stats-table-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.stats-table-content th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.stats-table-content tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.text-success {
    color: #28a745 !important;
    font-weight: bold;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.progress-complete {
    background: linear-gradient(90deg, #ffd700, #ffed4e) !important;
}

.row-complete {
    background: rgba(255, 215, 0, 0.15) !important;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 0.85em;
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    font-size: 1em;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    outline: none;
    color: white;
    font-family: var(--font-main);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

.search-box input:focus {
    border-color: rgba(34,197,94,0.6);
    background-color: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.search-box input::placeholder { color: rgba(255,255,255,0.4); }

.time-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.time-stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-stat-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.time-stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-success.active {
    background: #1e7e34;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.btn.active {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.row-present {
    background: rgba(40, 167, 69, 0.1);
}

.row-absent {
    background: rgba(220, 53, 69, 0.05);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-mid) 100%);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(251, 191, 36, 0.35);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* Form Styles */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section h3 {
    color: var(--color-accent);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group select option {
    background: var(--color-bg-dark);
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: rgba(15, 30, 20, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
    font-size: 14px;
    font-weight: 500;
    color: white;
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid #3b82f6; }
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-text { flex: 1; line-height: 1.4; }
.toast-close {
    background: none; border: none; color: rgba(255,255,255,0.5);
    cursor: pointer; font-size: 16px; padding: 0; line-height: 1;
    pointer-events: auto;
}
.toast-close:hover { color: white; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.9); }
    to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px) scale(0.9); }
}
.toast.removing { animation: toastOut 0.25s ease forwards; }

/* ── SORTABLE TABLE HEADERS ── */
.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sortable::after {
    content: ' ⇅';
    opacity: 0.4;
    font-size: 0.8em;
}
.sortable.asc::after  { content: ' ↑'; opacity: 1; color: #22c55e; }
.sortable.desc::after { content: ' ↓'; opacity: 1; color: #22c55e; }
.sortable:hover { color: #22c55e; }

/* ── STATISTIK MINI GRID & KPI TRENDS ── */
.stats-grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: center;
}
@media (max-width: 968px) {
    .stats-grid-split {
        grid-template-columns: 1fr;
    }
}
.chart-container-mini {
    position: relative;
    height: 250px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-trend {
    display: block;
    font-size: 0.8em;
    margin-top: 8px;
    font-weight: 500;
}
.stat-trend.success {
    color: #22c55e;
}
.stat-trend.danger {
    color: #ef4444;
}
.stat-trend.neutral {
    color: rgba(255, 255, 255, 0.5);
}
.stat-trend.progress {
    color: #3b82f6;
}
