:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ef4444;
    /* Red for danger/reset actions */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --glow-color: rgba(99, 102, 241, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background Shapes for ambience */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4f46e5, transparent 70%);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Glassmorphism Card */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input:not([type="checkbox"]),
.input-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.input-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-wrapper button:hover {
    color: var(--text-main);
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
    }
}

/* Dashboard Styles */
.dashboard-container {
    text-align: center;
}

.welcome-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(15, 23, 42, 0.5);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-img-placeholder {
    width: 40px;
    height: 40px;
    background: var(--input-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.table-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

/* Action Button */
.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    /* Flex to center */
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Old .close-btn removed, see end of file for new definition */

.input-group-row {
    display: flex;
    gap: 1rem;
}

.input-group-row .input-group {
    flex: 1;
}

/* Dashboard Layout Overrides */
.dashboard-body {
    display: block;
    /* Remove Flex centering of body for dashboard */
    height: 100vh;
}

.app-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.85);
    /* Darker, slightly translucent */
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    z-index: 10;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-header {
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    /* Prevent flicker: hide content until JS reveals it, or manage visibility class */
}

.nav-item {
    display: none;
    /* Default hidden for RBAC, JS will flex them */
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item svg {
    opacity: 0.8;
}

.nav-item.active svg {
    opacity: 1;
}

/* Submenu Styles */
.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin: 1.5rem 1.25rem 0.5rem;
    letter-spacing: 0.05em;
}

.nav-group {
    display: none;
    /* Default hidden for RBAC */
    flex-direction: column;
}

.submenu {
    display: none;
    flex-direction: column;
    padding-left: 2.5rem;
    margin: 0.25rem 0;
}

.submenu.active {
    display: flex;
}

.sub-item {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border-left: none !important;
}

.sub-item:hover,
.sub-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.logout-btn-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.95rem;
}

.logout-btn-sidebar:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    /* Red for logout */
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

/* Option Cards (copied from booking.html for admin usage) */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.selectable-option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.selectable-option-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.selectable-option-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.option-card-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
    /* Fallback for non-image divs */
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-card-text {
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
}

.slot-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: block;
    margin-bottom: 5px;
    text-align: center;
}

.slot-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.slot-pill.selected-slot {
    background: var(--primary);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.modal-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.modal-tab-btn.active {
    background: var(--primary);
    color: #fff;
}

.tab-content-panel {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

.tab-content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.dashboard-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

/* Form Select Override */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
}

select option {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 10px;
}

/* Configuration Modal Styles */
.slot-pill {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    user-select: none;
}

.slot-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.slot-pill.selected-slot {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.selectable-option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.selectable-option-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.selectable-option-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 1px var(--primary);
}

.option-card-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 8px auto;
}

.option-card-text {
    font-size: 0.8rem;
    color: var(--text-main);
}

/* Button Utilities */
.btn {
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Search Bar Styling */
.search-bar {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    transition: all 0.3s ease;
}

.search-bar:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

/* Catalog Grid Refinement */
.catalog-grid {
    display: grid;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
.catalog-grid::-webkit-scrollbar {
    width: 6px;
}

.catalog-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.catalog-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.catalog-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Unified Modal Close Button */
.modal-close,
.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.modal-close:hover,
.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    /* Slight red tint on hover for close */
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
    /* Nice interaction */
}

/* Ensure minimal reset for existing usages if needed */
.modal-close:focus,
.close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        position: relative;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 300px;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 1.5rem;
        left: 1rem;
        z-index: 90;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-color);
        color: white;
        padding: 0.5rem;
        border-radius: 8px;
        cursor: pointer;
    }

    .main-content {
        padding: 1.5rem;
        padding-top: 5rem;
        width: 100%;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
        margin-left: 3rem;
    }

    .content-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .input-group-row {
        flex-direction: column;
        gap: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-right: -1rem;
        padding-right: 1rem;
    }

    .data-table {
        min-width: 600px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
        margin: 10px;
    }

    .modal-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* Searchable Dropdown Results */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    /* Detached with gap */
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #0f172a;
    /* Darker bg for contrast against card */
    border: 1px solid rgba(99, 102, 241, 0.3);
    /* Slight primary tint border */
    border-radius: 12px;
    /* Fully rounded */
    z-index: 1000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
    /* Strong pop-up shadow */
}

/* Arrow indicator for the dropdown */
.search-results-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #0f172a;
    border-left: 1px solid rgba(99, 102, 241, 0.3);
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    transform: rotate(45deg);
    z-index: 1001;
}

/* Scrollbar styling for dropdown */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tmpl-res-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.tmpl-res-item:hover {
    background: rgba(99, 102, 241, 0.15);
    /* Primary tint */
    color: white;
    padding-left: 20px;
    /* Slight slide effect */
    border-left: 3px solid var(--primary);
}

.tmpl-res-item:last-child {
    border-bottom: none;
}

/* Group Chips Styling */
.group-chip {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.group-chip:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    transform: translateY(-1px);
}

.group-chip.active {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tmpl-res-item:hover .hover-icon {
    opacity: 1 !important;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-neu {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.status-in-bearbeitung {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.status-reserviert {
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.3);
}

.status-akzeptiert,
.status-bestätigt {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.status-abgeschlossen {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.status-abgelehnt,
.status-storniert,
.status-stornierte {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Tooltip Styles for Configuration Tab */
.has-tooltip {
    position: relative;
}

.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(15, 23, 42, 0.98);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    max-width: 400px;
    width: max-content;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.has-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.has-tooltip:hover::before,
.has-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.has-tooltip:hover::after {
    transform: translateX(-50%) translateY(-2px);
}