/* EventPlaner Admin Styles */

:root {
    --primary-color: #141468;
    --primary-hover: #0f0f50;
    --primary-light: rgba(20, 20, 104, 0.08);
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #1f2937;
    --text-muted: #6b7280;

    --sidebar-width: 260px;
    --sidebar-bg: #ADB1B0;
    --sidebar-border: #9a9e9d;
    --header-height: 60px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    --transition-fast: 150ms ease-out;
    --transition-base: 200ms ease-out;
    --transition-slow: 300ms ease-out;
}

/* ── Color Schemes ────────────────────────────────────────── */
body.scheme-light       { --sidebar-bg: #999; --sidebar-border: #aaa; --primary-color: #d64e07; --primary-hover: #b8430a; }
body.scheme-modern      { --sidebar-bg: #1e1e27; --sidebar-border: #2c2c3a; --primary-color: #3858e9; --primary-hover: #2d47c0; }
body.scheme-blue        { --sidebar-bg: #096484; --sidebar-border: #0b799d; --primary-color: #e1a948; --primary-hover: #c99530; }
body.scheme-coffee      { --sidebar-bg: #46403c; --sidebar-border: #59524c; --primary-color: #c7a589; --primary-hover: #b89474; }
body.scheme-ectoplasm   { --sidebar-bg: #413256; --sidebar-border: #523f6d; --primary-color: #a3b745; --primary-hover: #8da13a; }
body.scheme-midnight    { --sidebar-bg: #1e2737; --sidebar-border: #263040; --primary-color: #e14d43; --primary-hover: #c7382e; }
body.scheme-ocean       { --sidebar-bg: #627c83; --sidebar-border: #738e96; --primary-color: #9ebaa0; --primary-hover: #85a487; }
body.scheme-sunrise     { --sidebar-bg: #b43c38; --sidebar-border: #c74e49; --primary-color: #dd823b; --primary-hover: #c5712f; }
body.scheme-aubergine   { --sidebar-bg: #4c4b5f; --sidebar-border: #5d5c72; --primary-color: #e46f76; --primary-hover: #d05a61; }
body.scheme-contrast    { --sidebar-bg: #1d2b42; --sidebar-border: #253754; --primary-color: #4f94d4; --primary-hover: #3a7fc0; }
body.scheme-cruise      { --sidebar-bg: #42525a; --sidebar-border: #536670; --primary-color: #cca33a; --primary-hover: #b58e28; }
body.scheme-kirk        { --sidebar-bg: #bd3854; --sidebar-border: #d04a66; --primary-color: #bd3854; --primary-hover: #a12e46; }
body.scheme-lawn        { --sidebar-bg: #3e4a28; --sidebar-border: #4f5e34; --primary-color: #a7b83a; --primary-hover: #8fa02e; }
body.scheme-primary     { --sidebar-bg: #1e2737; --sidebar-border: #263040; --primary-color: #e67c3e; --primary-hover: #cf6a2e; }
body.scheme-seashore    { --sidebar-bg: #f2f2e6; --sidebar-border: #d8d8c8; --primary-color: #a8a17e; --primary-hover: #94896a; --text-color: #333; }
body.scheme-adderley    { --sidebar-bg: #7ab8b8; --sidebar-border: #68a7a7; --primary-color: #3462c7; --primary-hover: #2852b0; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

/* ================================================================
   SMOOTH SCROLLBAR
   ================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c5cb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c5cb transparent;
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/login-bg.jpg') no-repeat center center;
    background-size: cover;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    animation: loginFadeIn 0.5s ease-out;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 40px;
    backdrop-filter: blur(8px);
}

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

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-primary {
    margin-top: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
}

/* ================================================================
   ADMIN LAYOUT
   ================================================================ */

.admin-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: block;
    text-decoration: none;
}

.sidebar-logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.sidebar-logo-img {
    width: 100%;
    max-width: 200px;
}

.sidebar-clock {
    margin-top: 8px;
    font-size: 14px;
    color: #e0e4e8;
    font-family: inherit;
    letter-spacing: 0;
}

.sidebar-nav {
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 9px 20px;
    color: rgba(255, 255, 255, 0.82);
    transition: all var(--transition-fast);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.nav-item-row {
    display: flex;
    align-items: stretch;
}

.nav-item-row .nav-item {
    flex: 1;
    min-width: 0;
}

.nav-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.nav-add:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}
.nav-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 2px 7px;
    margin-right: 10px;
    height: 22px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    color: #fff;
    background: #10b981;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s;
    flex-shrink: 0;
}
.nav-add-btn:hover {
    background: #059669;
    text-decoration: none;
}
.nav-item-row:has(.nav-add-btn):hover {
    background-color: rgba(255, 255, 255, 0.08);
}
.nav-item-row:has(.nav-add-btn):hover .nav-item {
    background-color: transparent;
}
.nav-item-row:has(.nav-add-btn):hover .nav-item:not(.active) {
    color: white;
    border-left-color: rgba(255, 255, 255, 0.3);
}

/* ── Sidebar Collapse Toggle ─────────────────────────────── */

.sidebar-collapse-toggle {
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.sidebar-collapse-toggle:hover {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--text-muted);
}

.sidebar-collapse-toggle svg {
    transition: transform 0.3s ease;
}

.admin-layout.sidebar-collapsed .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.admin-layout {
    transition: grid-template-columns 0.3s ease;
}

.admin-layout.sidebar-collapsed {
    grid-template-columns: 0 1fr;
}

/* ── Color Scheme Picker ────────────────────────────────── */
.scheme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.scheme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.scheme-option:hover {
    border-color: var(--primary-color);
}

.scheme-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.04);
}

.scheme-radio {
    flex-shrink: 0;
}

.scheme-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.scheme-name {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
}

.scheme-swatches {
    display: flex;
    gap: 0;
    border-radius: 3px;
    overflow: hidden;
}

.scheme-swatch {
    width: 32px;
    height: 16px;
    display: block;
}

.nav-item-new-section {
    color: #9ca3af !important;
    font-size: 13px;
    font-style: italic;
}

.nav-item-new-section:hover {
    color: white !important;
}

.nav-item-new-section svg {
    width: 16px !important;
    height: 16px !important;
    opacity: 0.6;
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */

.main-content {
    grid-column: 2;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ================================================================
   HEADER
   ================================================================ */

.header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.header-left h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}
.header-icon-label {
    gap: 5px;
    width: auto;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
}
.header-icon-link:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-menu:hover {
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.user-menu-wrapper {
    position: relative;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 4px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 140px;
    z-index: 200;
    padding: 4px;
}
.user-menu-wrapper:hover .user-dropdown {
    display: block;
}
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.user-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #ef4444;
}

/* ================================================================
   PAGE CONTENT
   ================================================================ */

.page-content {
    padding: 24px;
    flex: 1;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header-actions {
    display: flex;
    gap: 12px;
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f9fafb;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ================================================================
   STATS CARDS (Dashboard)
   ================================================================ */

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon.blue { background: #e0e0f0; color: #141468; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

/* ================================================================
   TABLES
   ================================================================ */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tbody tr {
    transition: background-color var(--transition-fast);
}

table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

table tbody tr:hover {
    background-color: #eef2ff;
}

table .actions {
    display: flex;
    gap: 8px;
}

/* ================================================================
   FORMS
   ================================================================ */

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    background-color: var(--card-bg);
}

.form-control:hover {
    border-color: #d1d5db;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: #fff;
}

.form-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background-color: var(--card-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:hover {
    border-color: #d1d5db;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    position: relative;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background-color: #059669;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background-color: #dc2626;
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

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

.btn-outline:hover {
    background-color: var(--bg-color);
    border-color: #d1d5db;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
}

/* ================================================================
   ALERTS
   ================================================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    animation: alertSlideIn 0.3s ease-out;
}

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

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ================================================================
   BADGES
   ================================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Offer status badges */
.badge-angebot {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-option {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-beauftragt {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-nicht_beauftragt {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-beendet {
    background-color: #e5e7eb;
    color: #4b5563;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    vertical-align: middle;
    flex-shrink: 0;
}

.room-icon-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    cursor: pointer;
}
.room-icon {
    color: #6b7280;
    vertical-align: middle;
}
.room-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: calc(100% + 8px);
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 400;
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 99999;
    line-height: 1.6;
    box-shadow: 0 4px 16px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
    border: 1px solid #e5e7eb;
}
.room-tooltip-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}
.room-tooltip-header svg {
    color: #9ca3af;
}
.room-tooltip-item {
    padding: 2px 0;
    color: #111827;
    font-weight: 500;
}
.room-icon-wrap:hover .room-tooltip {
    display: block;
}

/* ================================================================
   MODAL SYSTEM
   ================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(8px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal.modal-large {
    max-width: 700px;
}

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

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    color: var(--text-color);
    background: var(--bg-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

/* ================================================================
   TABS
   ================================================================ */

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 0;
}

.tab-btn {
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content.active {
    animation: tabFadeIn 0.2s ease-out;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ================================================================
   PILL SWITCH
   ================================================================ */

.pill-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.pill-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pill-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color, #ccc);
    border-radius: 24px;
    transition: background 0.25s ease-out;
}

.pill-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pill-switch input:checked + .pill-slider {
    background: var(--primary-color, #141468);
}

.pill-switch input:checked + .pill-slider::before {
    transform: translateX(20px);
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease-out;
    font-size: 14px;
    font-weight: 500;
}

.toast-success {
    background-color: #065f46;
    color: white;
}

.toast-error {
    background-color: #991b1b;
    color: white;
}

.toast-info {
    background-color: #1e40af;
    color: white;
}

.toast-warning {
    background-color: #92400e;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ================================================================
   GRID UTILITIES
   ================================================================ */

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ================================================================
   SPACING UTILITIES
   ================================================================ */

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* ================================================================
   TEXT UTILITIES
   ================================================================ */

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ================================================================
   MISC UTILITIES
   ================================================================ */

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

/* ================================================================
   FILTER BAR / SEARCH
   ================================================================ */

.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

/* ================================================================
   PAGINATION
   ================================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background-color: var(--bg-color);
    text-decoration: none;
    border-color: #d1d5db;
}

.pagination .current {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.pagination .disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.35;
    color: var(--primary-color);
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ================================================================
   LOADING SPINNER
   ================================================================ */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================================
   SIDEBAR OVERLAY (mobile)
   ================================================================ */

.sidebar-overlay {
    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;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
        z-index: 1010;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    .sidebar-collapse-toggle {
        display: none !important;
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
        overflow-y: auto;
    }

    .admin-layout.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .main-content {
        grid-column: 1;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .header-right {
        gap: 8px;
    }

    .page-content {
        padding: 12px;
    }

    table th,
    table td {
        padding: 8px 6px;
        font-size: 13px;
    }

    .actions {
        flex-wrap: nowrap;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================================================
   ACCESSIBILITY: Focus visible & Reduced motion
   ================================================================ */

/* Better keyboard focus indicators */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.nav-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: -2px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================
   PAGE CONTENT ENTRY ANIMATION
   ================================================================ */

.page-content {
    animation: pageContentIn 0.25s ease-out;
}

@keyframes pageContentIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   SELECTION STYLING
   ================================================================ */

::selection {
    background: rgba(37, 99, 235, 0.15);
    color: inherit;
}

/* ================================================================
   CARD HEADER REFINEMENT
   ================================================================ */

.card-header h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ================================================================
   SEARCH BOX IMPROVEMENT
   ================================================================ */

.search-box input {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* ================================================================
   USER MENU HOVER
   ================================================================ */

.user-menu {
    transition: all var(--transition-fast);
    border-radius: var(--radius);
}

.user-menu:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* ================================================================
   SIDEBAR CLOCK STYLING
   ================================================================ */

.sidebar-clock {
    font-variant-numeric: tabular-nums;
}

/* ================================================================
   REPORTS (BERICHTE)
   ================================================================ */

.stats-row {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-box {
    background: rgba(142, 202, 230, 0.25);
    border: 1px solid rgba(142, 202, 230, 0.3);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-box.stat-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.stat-box.stat-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.stat-box.stat-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.period-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 3px;
    border-radius: 8px;
}

.period-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
}

.period-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.5);
}

.period-btn.active {
    background: var(--primary-color, #2563eb);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.reports-grid .card {
    margin-bottom: 0;
}

.reports-grid table th,
.reports-grid table td {
    padding: 8px 12px;
    font-size: 13px;
}

.reports-grid .card-header {
    padding: 12px 16px;
}

.reports-grid .card-header h2 {
    font-size: 14px;
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Sort links */
.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.sort-link:hover {
    color: var(--primary-color);
}
.sort-icon {
    font-size: 12px;
    opacity: 0.3;
}
.sort-icon.active {
    opacity: 1;
    color: var(--primary-color);
}

/* Trash tabs */
.trash-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
}
.trash-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}
.trash-tab:hover {
    color: var(--text-color);
}
.trash-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.trash-tab-count {
    background: var(--bg-muted, #f3f4f6);
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.trash-tab.active .trash-tab-count {
    background: var(--primary-color);
    color: #fff;
}
.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}
