@import url('../fonts/fonts.css');

:root {
    --bg-base: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #334155;
    --border-color: #334155;
    --border-focus: #6366f1;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);

    --secondary: #0d9488;
    --secondary-hover: #0f766e;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-sans: 'Gotham', sans-serif;
    --font-title: 'Gotham', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Setup Arabic Font */
html[dir="rtl"] body {
    font-family: var(--font-arabic), var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    font-weight: 600;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    font-family: var(--font-arabic);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
    transform: translateY(-2px);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
aside.sidebar {
    background: rgba(15, 23, 42, 0.85);
    border-inline-end: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

/* Brand logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header styling */
header.app-header {
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(6px);
}

.room-selector-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main content wrapper */
main.main-content {
    display: flex;
    flex-direction: column;
    background-color: #0b0f19;
}

.calendar-viewport {
    padding: 2rem;
    flex-grow: 1;
}

/* UI Form Controls */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-input,
select,
textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    width: 100%;
}

.form-input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
}

/* Language & Admin selectors */
.lang-selector,
.admin-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.lang-selector:hover,
.admin-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-focus);
}

/* Room List */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
}

.room-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.room-item:hover,
.room-item.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
}

.room-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

html[dir="rtl"] .room-item.active {
    box-shadow: inset -3px 0 0 var(--primary);
}

.room-check-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.room-check-item:hover,
.room-check-item.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.room-check-item.active {
    background: rgba(255, 255, 255, 0.06);
}

.room-check-item input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
}

.room-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-item-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}

.room-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.room-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.status-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.available {
    color: var(--success);
}

.status-indicator.available::before {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-indicator.busy {
    color: var(--danger);
}

.status-indicator.busy::before {
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

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

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

html[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-main);
}

/* Catering Selection UI in Modal */
.catering-category-box {
    margin-bottom: 1.5rem;
}

.catering-category-title {
    font-size: 1rem;
    color: var(--secondary);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 0.85rem;
}

.catering-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .catering-items-grid {
        grid-template-columns: 1fr;
    }
}

.catering-item-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.catering-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.catering-item-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.catering-item-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.catering-item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.catering-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
}

.quantity-picker {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.quantity-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 28px;
    height: 28px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.quantity-val {
    width: 32px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.catering-item-notes {
    font-size: 0.75rem;
    padding: 0.35rem;
    margin-top: 0.4rem;
}

/* Order summary in details view */
.order-summary-list {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.order-summary-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-summary-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* Hide Catering Cost when show_cost_to_users is unchecked */
body.hide-catering-cost .catering-item-price,
body.hide-catering-cost .order-total-row {
    display: none !important;
}

body.hide-catering-cost .order-summary-item {
    grid-template-columns: 1fr auto !important;
}

body.hide-catering-cost .order-summary-item>div:last-child {
    display: none !important;
}

/* FullCalendar styling overrides to fit our dark theme */
.fc {
    --fc-border-color: #334155 !important;
    --fc-daygrid-event-dot-width: 8px !important;
    --fc-today-bg-color: rgba(99, 102, 241, 0.08) !important;
    background: rgba(30, 41, 59, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    font-family: inherit !important;
}

.fc .fc-toolbar-title {
    font-family: var(--font-title) !important;
    font-size: 1.35rem !important;
    font-weight: 700;
}

html[dir="rtl"] .fc .fc-toolbar-title {
    font-family: var(--font-arabic) !important;
}

.fc .fc-list-sticky .fc-list-day>* {
    background: var(--bg-surface) !important;
}

.fc .fc-button-primary {
    background-color: var(--bg-surface-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    text-transform: capitalize;
}

.fc .fc-button-primary:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.fc .fc-button-active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc .fc-col-header-cell-cushion {
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0 !important;
}

.fc-event {
    cursor: pointer;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    transition: transform 0.1s ease;
}

.fc-event:hover {
    transform: scale(1.02);
}

.catering-badge-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    margin-inline-end: 4px;
}

/* Admin Dashboard Table */
.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.85rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}

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

/* Responsive layout adjustments */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    aside.sidebar {
        height: auto;
        position: relative;
        border-inline-end: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Alert system */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* ── Calendar Source Filter Pills ──────────────────────────────────────────── */
.cal-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 5px;
}

.cal-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.cal-filter-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
}

.cal-filter-pill.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

/* Room legend strip */
#room-legend {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 0;
    transition: min-height 0.2s;
}

/* ── Admin Sidebar Layout ──────────────────────────────────────────── */
.admin-layout-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: hidden;
    flex-shrink: 0;
    z-index: 100;
}

html[dir="rtl"] .admin-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.admin-sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-sidebar.collapsed .sidebar-brand-text {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand-text {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
}

.sidebar-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
}

.admin-sidebar.collapsed .sidebar-nav {
    padding: 1.25rem 0.5rem;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    width: 100%;
    white-space: nowrap;
}

html[dir="rtl"] .sidebar-nav-btn {
    text-align: right;
}

.admin-sidebar.collapsed .sidebar-nav-btn {
    justify-content: center;
    padding: 0.65rem 0;
}

.admin-sidebar.collapsed .sidebar-nav-btn span {
    display: none;
}

.sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-nav-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Sidebar Nav Sub-Menu / Dropdown Group */
.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    user-select: none;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    width: 100%;
    white-space: nowrap;
}

.sidebar-group-toggle * {
    pointer-events: none;
}

html[dir="rtl"] .sidebar-group-toggle {
    text-align: right;
}

.sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-group-toggle.active-parent {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

.sidebar-group-chevron {
    margin-left: auto;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
    opacity: 0.7;
}

html[dir="rtl"] .sidebar-group-chevron {
    margin-left: 0;
    margin-right: auto;
}

.sidebar-nav-group.open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-sub-nav {
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    padding-left: 0.85rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    margin-left: 1.15rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

html[dir="rtl"] .sidebar-sub-nav {
    padding-left: 0;
    padding-right: 0.85rem;
    margin-left: 0;
    margin-right: 1.15rem;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-group.open .sidebar-sub-nav {
    display: flex;
}

.sidebar-sub-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    width: 100%;
    white-space: nowrap;
}

html[dir="rtl"] .sidebar-sub-btn {
    text-align: right;
}

.sidebar-sub-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-sub-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
    font-weight: 600;
}

/* Collapsed sidebar behavior for sub-menus */
.admin-sidebar.collapsed .sidebar-group-toggle {
    justify-content: center;
    padding: 0.65rem 0;
}

.admin-sidebar.collapsed .sidebar-group-toggle span,
.admin-sidebar.collapsed .sidebar-group-chevron {
    display: none !important;
}

.admin-sidebar.collapsed .sidebar-nav-group:not(.open) .sidebar-sub-nav {
    display: none !important;
}

.admin-sidebar.collapsed .sidebar-nav-group.open .sidebar-sub-nav {
    display: flex;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    border: none;
    gap: 0.3rem;
}

.admin-sidebar.collapsed .sidebar-sub-btn {
    justify-content: center;
    padding: 0.5rem 0;
}

.admin-sidebar.collapsed .sidebar-sub-btn span {
    display: none !important;
}

/* Settings Sub-Navigation Menu Pills */
.settings-sub-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.settings-nav-pill {
    transition: all 0.2s ease;
    border-radius: 20px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
}

.settings-nav-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transform: translateY(-1px);
}

.settings-nav-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-sidebar.collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
    align-items: center;
}

.admin-sidebar.collapsed .sidebar-footer span,
.admin-sidebar.collapsed .sidebar-footer .lang-selector,
.admin-sidebar.collapsed .sidebar-footer .role-switcher {
    display: none;
}

.admin-main-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-base);
}

.admin-top-bar {
    height: 70px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

/* Sidebar Toggle Switch */
.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Table Interactivity: Sorting */
.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

.admin-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.admin-table th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.35;
    font-size: 0.75rem;
}

html[dir="rtl"] .admin-table th.sortable::after {
    right: auto;
    left: 8px;
}

.admin-table th.sortable.sort-asc::after {
    content: '▲';
    opacity: 1;
    color: var(--primary);
}

.admin-table th.sortable.sort-desc::after {
    content: '▼';
    opacity: 1;
    color: var(--primary);
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.25);
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-glow);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Chips Controls */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.2s;
}

.chip-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   Recurring Meetings Visual Distinction & Recurrence Controls
   ========================================================================== */

/* Distinct visual appearance for recurring events on FullCalendar */
.fc-event.fc-event-recurring {
    border-inline-start: 4px solid #fbbf24 !important;
    background-image: repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.14) 0px,
            rgba(255, 255, 255, 0.14) 6px,
            transparent 6px,
            transparent 12px) !important;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.4), 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

.fc-list-event.fc-event-recurring td {
    background-image: repeating-linear-gradient(135deg,
            rgba(251, 191, 36, 0.05) 0px,
            rgba(251, 191, 36, 0.05) 8px,
            transparent 8px,
            transparent 16px);
}

.fc-recurring-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(251, 191, 36, 0.25);
    color: #fef08a;
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 10px;
    padding: 0px 5px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.3;
    margin-inline-end: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Recurrence configuration card inside Booking Modal */
.recurrence-config-card {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
}

.recurrence-config-card:focus-within {
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.recurrence-days-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

.recurrence-day-pill {
    flex: 1;
    min-width: 42px;
    padding: 0.45rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
}

.recurrence-day-pill:hover {
    border-color: #f59e0b;
    color: var(--text-main);
}

.recurrence-day-pill.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #fbbf24;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.recurrence-summary-preview {
    margin-top: 0.9rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Scope selection banner & cards for editing / deleting recurring series */
.recurring-scope-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.recurring-scope-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.65rem;
}

.recurring-scope-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recurring-scope-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.recurring-scope-option:hover {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(30, 41, 59, 0.75);
}

.recurring-scope-option.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

.recurring-scope-option input[type="radio"] {
    accent-color: #f59e0b;
    margin-top: 0.2rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.scope-opt-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.scope-opt-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.details-recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Smart Voice & Chat Assistant (Standard User Role) ─────────────────────── */
.btn-voice-sidebar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.btn-voice-sidebar:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(99, 102, 241, 0.4));
    border-color: #34d399;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.voice-chatbot-widget {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    z-index: 950;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: inherit;
}

.chatbot-fab-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.chatbot-mic-fab {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.25s ease;
}

.chatbot-mic-fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55);
}

.chatbot-mic-fab.listening {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #f87171;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.65);
    animation: micFabPulse 1.3s infinite;
}

@keyframes micFabPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.chatbot-main-fab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
    transition: all 0.25s ease;
}

.chatbot-main-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
}

.chatbot-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
}

.chatbot-panel {
    width: 410px;
    max-width: calc(100vw - 2rem);
    height: 600px;
    max-height: calc(100vh - 6.5rem);
    margin-bottom: 0.85rem;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(99, 102, 241, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatbotSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-panel.open {
    display: flex;
}

@keyframes chatbotSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(16, 185, 129, 0.14));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.chatbot-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.chatbot-subtitle {
    font-size: 0.73rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.chatbot-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.chatbot-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.chatbot-icon-btn.active {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(16, 185, 129, 0.12);
}

/* Voice Listening Waveform Banner */
.chatbot-voice-banner {
    padding: 0.6rem 1rem;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.18), rgba(99, 102, 241, 0.18));
    border-bottom: 1px solid rgba(239, 68, 68, 0.35);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
}

.voice-waveform span {
    display: block;
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: #f87171;
    animation: voiceWaveBar 0.9s infinite ease-in-out;
}

.voice-waveform span:nth-child(2) {
    animation-delay: 0.15s;
}

.voice-waveform span:nth-child(3) {
    animation-delay: 0.3s;
}

.voice-waveform span:nth-child(4) {
    animation-delay: 0.45s;
}

.voice-waveform span:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes voiceWaveBar {

    0%,
    100% {
        height: 5px;
        opacity: 0.6;
    }

    50% {
        height: 18px;
        opacity: 1;
    }
}

.voice-banner-text {
    flex: 1;
    font-size: 0.8rem;
    color: #fecaca;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-stop-voice {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

/* Messages Stream */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg.bot {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
}

.chat-bubble {
    padding: 0.75rem 0.95rem;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-msg.bot .chat-bubble {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.chat-msg-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 4px;
}

.chat-msg.user .chat-msg-meta {
    text-align: end;
}

/* Interactive Cards Inside Chat */
.chat-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.chat-action-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    transition: border-color 0.15s;
}

.chat-action-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

.chat-action-card-title {
    font-weight: 600;
    font-size: 0.84rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.chat-action-card-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 3px;
}

.chat-card-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.chat-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.65rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transition: all 0.15s;
}

.chat-inline-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.chat-inline-btn.primary {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.55);
    color: #c7d2fe;
}

.chat-inline-btn.primary:hover {
    background: var(--primary);
    color: #fff;
}

.chat-inline-btn.success {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.5);
    color: #a7f3d0;
}

.chat-inline-btn.success:hover {
    background: #10b981;
    color: #fff;
}

.chat-inline-btn.warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fde68a;
}

.chat-inline-btn.warning:hover {
    background: #f59e0b;
    color: #0f172a;
}

.chat-inline-btn.danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.chat-inline-btn.danger:hover {
    background: #ef4444;
    color: #fff;
}

/* Quick Suggestion Chips Bar */
.chatbot-chips-bar {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.55rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(15, 23, 42, 0.6);
    scrollbar-width: none;
}

.chatbot-chips-bar::-webkit-scrollbar {
    display: none;
}

.chatbot-chip {
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.chatbot-chip:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: #818cf8;
    color: #fff;
}

/* Chatbot Input Bar */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.95);
}

.chatbot-mic-input-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.chatbot-mic-input-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    color: #fff;
}

.chatbot-mic-input-btn.listening {
    background: #ef4444;
    border-color: #f87171;
    color: #fff;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
    animation: micFabPulse 1.2s infinite;
}

.chatbot-text-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    color: #fff;
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.15s;
}

.chatbot-text-input:focus {
    border-color: var(--primary);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.chatbot-send-btn:hover {
    background: #4f46e5;
}

/* ── HTML Toast Notification System ────────────────────────────────────────── */
.app-toast-container {
    position: fixed;
    top: 1.5rem;
    inset-inline-end: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 3rem);
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: rgba(17, 24, 39, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.45;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s ease;
}

.app-toast.toast-hiding {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
}

.app-toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-toast-content {
    flex: 1;
    min-width: 0;
}

.app-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
    color: #fff;
}

.app-toast-message {
    color: var(--text-muted);
    font-size: 0.82rem;
    word-break: break-word;
}

.app-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-inline-start: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.app-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Toast Color Variants */
.app-toast.success {
    border-inline-start: 4px solid #10b981;
}

.app-toast.success .app-toast-icon {
    color: #34d399;
}

.app-toast.error {
    border-inline-start: 4px solid #ef4444;
}

.app-toast.error .app-toast-icon {
    color: #f87171;
}

.app-toast.warning {
    border-inline-start: 4px solid #f59e0b;
}

.app-toast.warning .app-toast-icon {
    color: #fbbf24;
}

.app-toast.info {
    border-inline-start: 4px solid #6366f1;
}

.app-toast.info .app-toast-icon {
    color: #818cf8;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}