/* assets/css/style.css */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2563a8 100%);
    color: white;
    padding: 28px 30px;
    text-align: left;
}

.header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 20px;
    text-align: left;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    padding: 4px;
    display: block !important;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: left;
}

.header p {
    opacity: 0.88;
    font-size: 1rem;
    text-align: left;
    margin: 0;
}

/* Form Styles */
.booking-form {
    padding: 30px;
}

.form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-100);
}

.form-section h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--gray-900);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Meeting Type Cards */
.meeting-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.type-card {
    position: relative;
    padding: 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.type-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.type-card input[type="radio"]:checked + .type-icon,
.type-card input[type="radio"]:checked ~ .type-label,
.type-card input[type="radio"]:checked ~ .type-desc {
    color: var(--primary);
}

.type-card input[type="radio"]:checked ~ .type-icon {
    transform: scale(1.1);
}

.type-card:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.type-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.type-label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.type-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Calendar Styles */
.calendar-container {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h4 {
    font-size: 1.1rem;
    color: var(--gray-800);
}

.nav-btn {
    background: white;
    border: 2px solid var(--gray-200);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.day-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    padding: 8px;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.date-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid transparent;
    font-weight: 500;
}

.date-cell:hover:not(.disabled):not(.empty) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.date-cell.selected {
    background: var(--primary);
    color: white;
}

.date-cell.disabled {
    color: var(--gray-300);
    cursor: not-allowed;
    background: var(--gray-100);
}

.date-cell.empty {
    cursor: default;
}

.date-cell.has-slots::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    margin-top: 4px;
}

.date-cell.selected.has-slots::after {
    background: white;
}

/* Time Slots */
.time-slots {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--gray-200);
}

.time-slots h5 {
    margin-bottom: 15px;
    color: var(--gray-800);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
}

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

.time-slot.disabled {
    background: var(--gray-100);
    color: var(--gray-300);
    cursor: not-allowed;
    text-decoration: line-through;
}

.selected-slot {
    margin-top: 15px;
    padding: 15px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    display: none;
}

.selected-slot.show {
    display: block;
}

.selected-slot strong {
    color: var(--primary-dark);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    padding: 50px 30px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease 0.2s both;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-message h2 {
    color: var(--gray-900);
    margin-bottom: 15px;
    font-size: 1.75rem;
}

.success-details {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 25px 0;
    text-align: left;
    display: inline-block;
}

.success-details p {
    margin: 8px 0;
}

.email-notice {
    color: var(--success);
    font-weight: 500;
    margin: 20px 0;
}

.admin-notice {
    color: var(--gray-600);
    margin-bottom: 25px;
}

.secondary-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.admin-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
}

.admin-link:hover {
    color: var(--primary);
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 2px solid var(--danger);
    color: #991b1b;
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header-inner {
        gap: 14px;
    }

    .logo-img {
        width: 60px;
        height: 60px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .booking-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .meeting-types {
        grid-template-columns: 1fr;
    }

    .type-card {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
    }

    .type-icon {
        margin-bottom: 0;
        font-size: 2rem;
    }

    .days-grid,
    .dates-grid {
        gap: 4px;
    }

    .date-cell {
        font-size: 0.875rem;
    }

    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Admin Panel Styles */
.admin-body {
    background: var(--gray-100);
}

.admin-container {
    max-width: 1200px;
}

.admin-header {
    background: var(--gray-900);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

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

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.stat-card h4 {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.bookings-table {
    width: 100%;
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.bookings-table th,
.bookings-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.bookings-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--gray-600);
}

.bookings-table tr:hover {
    background: var(--gray-50);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

.btn-cancel {
    background: var(--danger);
    color: white;
}

.btn-view {
    background: var(--primary);
    color: white;
}

.login-form {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--gray-900);
}

.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid var(--danger);
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid var(--success);
    color: #065f46;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .bookings-table {
        overflow-x: auto;
    }

    .bookings-table table {
        min-width: 800px;
    }
}
