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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* Auth Pages */
.auth-card {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-card h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 3px solid #c33;
    font-size: 14px;
}

.error-message strong {
    font-weight: 600;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

input:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

input:valid:not(:placeholder-shown) {
    border-color: #4caf50;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border: 1px solid;
}

.oauth-btn svg {
    flex-shrink: 0;
}

.google-btn {
    background: white;
    color: #3c4043;
    border-color: #dadce0;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.instagram-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.3);
    transform: translateY(-1px);
}

/* OR Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    z-index: 1;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    cursor: pointer;
}

/* Overrides */
.overrides-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.override-item {
    border-left: 3px solid #667eea;
}

.override-item.closed-day {
    border-left-color: #f44336;
    background-color: #fee;
}

.override-time {
    color: #667eea;
    font-weight: 500;
}

.closed-day .override-time {
    color: #f44336;
}

.override-reason {
    color: #888;
    font-size: 14px;
    font-style: italic;
}

.hint {
    color: #888;
    font-size: 14px;
    margin: 10px 0;
}

/* FullCalendar Styles */
#calendar {
    max-width: 100%;
    height: auto;
    min-height: 600px;
    margin: 20px 0;
}

/* Override FullCalendar theme to match dashboard */
.fc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fc .fc-button-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.fc .fc-button-primary:hover {
    background-color: #5568d3;
    border-color: #5568d3;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #4451b8;
    border-color: #4451b8;
}

.fc-theme-standard .fc-scrollgrid {
    border-color: #e0e0e0;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #e0e0e0;
}

.fc .fc-col-header-cell-cushion {
    color: #667eea;
    font-weight: 600;
}

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

/* Calendar event subtitle */
.fc-event-subtitle {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

/* Calendar tooltips */
.fc-event:hover {
    cursor: pointer;
    opacity: 0.9;
}

/* Today column highlight */
.fc .fc-day-today {
    background-color: #f0f4ff !important;
}

/* Now indicator styling */
.fc .fc-timegrid-now-indicator-line {
    border-color: #667eea;
    border-width: 2px;
}

.fc .fc-timegrid-now-indicator-arrow {
    border-color: #667eea;
}

/* Responsive calendar */
@media (max-width: 768px) {
    #calendar {
        min-height: 400px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in;
}

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

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-content form {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-actions .btn {
    min-width: 100px;
}

/* Modal form groups */
.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.dashboard-header h1 {
    color: #333;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.nav-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

.card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: #333;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.integration-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-connected {
    background: #28a745;
}

.status-disconnected {
    background: #dc3545;
}
