:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.cabin-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--glass);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    overflow-x: auto;
    max-width: 100vw;
    scrollbar-width: none;
}

.cabin-selector::-webkit-scrollbar {
    display: none;
}

.cabin-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.cabin-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.calendar-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow-x: auto;
}

/* FullCalendar Customization */
.fc {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-page-bg-color: transparent;
    --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.05);
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.fc .fc-button-primary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    text-transform: capitalize;
}

.fc .fc-button-primary:hover {
    background: var(--primary);
}

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

.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid var(--glass-border);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: all 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.75rem 1rem;
}

.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--glass); color: var(--text-main); border: 1px solid var(--glass-border); }
.btn-danger { background: var(--danger); color: white; }

.btn:hover { 
    transform: translateY(-2px); 
    filter: brightness(1.1); 
}
.btn:active {
    transform: translateY(0);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.error { border-left: 4px solid var(--danger); }
.toast.success { border-left: 4px solid var(--success); }
.toast.warning { border-left: 4px solid var(--warning); }

.toast.fade-out {
    animation: fadeOut 0.3s forwards;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body { padding: 1rem; }
    header { flex-direction: column; align-items: flex-start; }
    .header-controls { width: 100%; justify-content: space-between; }
    .btn-group { flex-direction: column; }
    .btn { width: 100%; }
    .fc .fc-toolbar { flex-direction: column; gap: 1rem; }
    .toast-container { bottom: 1rem; right: 1rem; left: 1rem; align-items: center; }
    
    .btn-text { display: none; }
    .btn-icon { padding: 0.75rem; border-radius: 50%; width: 45px; height: 45px; flex: none; }
    
    /* Make forms stack on mobile */
    .modal-content > form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}
