/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-sidebar: #1e293b;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.admin-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.admin-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

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

.sidebar-menu li {
    margin: 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link .icon {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-name {
    color: white;
    font-weight: 500;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-header {
    background: var(--bg-primary);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

.top-header h1 {
    font-size: 24px;
    font-weight: 600;
    flex: 1;
}

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

.token-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    width: 250px;
}

.content-wrapper {
    padding: 32px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
    font-size: 40px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Dashboard Section */
.dashboard-section {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.dashboard-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

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

.btn-filter {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm {
    background: var(--success-color);
    color: white;
}

.btn-confirm:hover {
    background: #059669;
}

.btn-reschedule {
    background: var(--warning-color);
    color: white;
}

.btn-reschedule:hover {
    background: #d97706;
}

.btn-edit {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    margin-right: 8px;
}

.btn-edit:hover {
    background: #d97706;
}

/* Tables */
.table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

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

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

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

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

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

.status-badge.available {
    background: #f3f4f6;
    color: #374151;
}

/* Bookings Layout */
.bookings-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.bookings-calendar {
    background: #ffffff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.bookings-list {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-height: 800px;
    overflow-y: auto;
}

/* Forms */
.input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s;
}

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

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

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

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

/* Availability Controls */
.availability-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-end;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

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

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

.modal-body {
    padding: 24px;
}

/* FullCalendar Customization - Google Calendar Style */
.fc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fc-header-toolbar {
    margin-bottom: 1em;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fc-toolbar-title {
    font-size: 22px;
    font-weight: 400;
    color: #3c4043;
    margin: 0;
}

.fc-button-group {
    display: flex;
    gap: 0.5rem;
}

.fc-button {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    color: #5f6368 !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover {
    background: #f8f9fa !important;
    border-color: #dadce0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.fc-button:active,
.fc-button-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: #ffffff !important;
}

.fc-daygrid-day-frame,
.fc-timeGridDay-view .fc-daygrid-day-frame,
.fc-timeGridWeek-view .fc-daygrid-day-frame {
    border: none;
}

.fc-col-header-cell {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    background: #ffffff;
    padding: 8px 4px;
}

.fc-col-header-cell:last-child {
    border-right: none;
}

.fc-col-header-cell-cushion {
    color: #5f6368;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 8px 4px;
    line-height: 1.4;
}

.fc-daygrid-day {
    border: none;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.fc-daygrid-day:last-child {
    border-right: none;
}

.fc-daygrid-day-top {
    padding: 4px 8px;
}

.fc-daygrid-day-number {
    color: #3c4043;
    font-size: 13px;
    font-weight: 400;
    padding: 4px;
}

.fc-day-today .fc-daygrid-day-number {
    background: #1a73e8;
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.fc-timegrid-slot {
    border-top: 1px solid #e8eaed;
    height: 48px;
}

.fc-timegrid-slot-label {
    border-right: 1px solid #e0e0e0;
    padding: 0 8px;
    color: #5f6368;
    font-size: 12px;
}

.fc-timegrid-slot-label-cushion {
    color: #5f6368;
}

.fc-timegrid-col {
    border-right: 1px solid #e0e0e0;
}

.fc-timegrid-col:last-child {
    border-right: none;
}

.fc-timegrid-now-indicator-line {
    border-color: #ea4335;
    border-width: 2px;
}

.fc-timegrid-now-indicator-arrow {
    border-left-color: #ea4335;
}

.fc-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: box-shadow 0.2s ease;
    margin: 1px 2px;
}

.fc-event:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.fc-event-title {
    font-weight: 500;
    padding: 0;
}

.fc-event-time {
    font-weight: 500;
    margin-right: 4px;
}

.fc-event.pending {
    background: #fbbc04 !important;
    color: #202124 !important;
}

.fc-event.confirmed {
    background: #34a853 !important;
    color: #ffffff !important;
}

.fc-event.cancelled {
    background: #ea4335 !important;
    color: #ffffff !important;
}

.fc-daygrid-event {
    border-radius: 4px;
}

.fc-timegrid-event {
    border-radius: 4px;
}

.fc-scrollgrid {
    border: none;
}

.fc-scrollgrid-section-header {
    border: none;
}

.fc-scrollgrid-section-body {
    border: none;
}

.fc-daygrid-body {
    border: none;
}

.fc-scroller {
    overflow-y: auto;
}

.fc-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Month view improvements */
.fc-daygrid-day-frame {
    min-height: 100px;
}

.fc-daygrid-day-events {
    margin-top: 4px;
}

.fc-daygrid-event {
    margin: 1px 2px;
    padding: 2px 6px;
    font-size: 12px;
}

.fc-daygrid-day-number {
    padding: 4px 8px;
    font-size: 13px;
}

.fc-day-other .fc-daygrid-day-number {
    color: #9aa0a6;
}

.fc-day-other {
    background: #f8f9fa;
}

/* Week view improvements */
.fc-timegrid-axis {
    border-right: 1px solid #e0e0e0;
}

.fc-timegrid-axis-cushion {
    color: #5f6368;
    font-size: 12px;
    padding: 0 8px;
}

.fc-timegrid-event-harness {
    cursor: pointer;
}

.fc-timegrid-event {
    border-left-width: 4px;
    padding: 4px 8px;
}

.fc-timegrid-event-title {
    font-weight: 500;
    margin-top: 2px;
}

/* Day view improvements */
.fc-timeGridDay-view .fc-daygrid-day-frame {
    min-height: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .bookings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

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

    .content-wrapper {
        padding: 16px;
    }

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

    .token-input {
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    gap: 8px;
}




/* Tabs for Reminders Page */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

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

.tab-content {
    display: none;
}

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

.settings-form,
.templates-form,
.history-section,
.bulk-notification-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.bookings-selector {
    margin: 1rem 0;
}

.bulk-results {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.bulk-results h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.bulk-results ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.bulk-results li {
    margin: 0.25rem 0;
    color: var(--danger-color);
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary) !important;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
}

.time-slot.selected {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
    color: var(--text-secondary) !important;
}

