/* EPS Scheduler Styles - Matching Landing Page Design */

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

body {
    font-family: 'Raleway', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7f9 0%, #e8ebed 50%, #d8dce0 100%);
    background-attachment: fixed;
    color: #2d3640;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(70, 85, 100, 0.02) 2px,
            rgba(70, 85, 100, 0.02) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(70, 85, 100, 0.02) 2px,
            rgba(70, 85, 100, 0.02) 4px
        );
    pointer-events: none;
    z-index: 1;
}

body > * {
    position: relative;
    z-index: 2;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(70, 85, 100, 0.12);
    border-bottom: 1px solid rgba(120, 135, 150, 0.2);
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.site-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: #3d4852;
    text-shadow: 1px 1px 2px rgba(70, 85, 100, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    color: #64717e;
}

.back-link,
.logout-link,
.view-link {
    color: #64717e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover,
.logout-link:hover,
.view-link:hover {
    color: #3d4852;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.admin-main {
    max-width: 1400px;
}

/* Login Box */
.login-box {
    max-width: 450px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
}

.login-box h2 {
    font-size: 1.8rem;
    color: #3d4852;
    margin-bottom: 10px;
    text-align: center;
}

.login-description {
    text-align: center;
    color: #64717e;
    margin-bottom: 30px;
}

/* Forms */
.login-form,
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-group label {
    font-weight: 500;
    color: #3d4852;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #d8dce0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #8a95a0;
    box-shadow: 0 0 0 3px rgba(138, 149, 160, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Raleway', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #8a95a0 0%, #64717e 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, #e8ebed 0%, #d8dce0 100%);
    color: #3d4852;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-family: 'Raleway', sans-serif;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

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

.btn-danger {
    background: #dc2626;
    color: white;
}

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

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

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

/* Inline Edit Form */
.edit-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.edit-input {
    padding: 6px 10px;
    border: 2px solid #d8dce0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Raleway', sans-serif;
    width: 120px;
}

.edit-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.display-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-cell {
    min-width: 200px;
}

/* Messages */
.error-message,
.info-message,
.no-appointments {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.info-message {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.no-appointments {
    background: #f3f4f6;
    color: #4b5563;
    border-left: 4px solid #9ca3af;
    flex-direction: column;
    text-align: center;
    padding: 40px;
}

.no-appointments i {
    font-size: 3rem;
    opacity: 0.5;
}

.help-text {
    margin-top: 20px;
    text-align: center;
    color: #64717e;
    font-size: 0.9rem;
}

/* Instructions */
.instructions {
    text-align: center;
    margin-bottom: 30px;
}

.instructions h2 {
    font-size: 1.5rem;
    color: #3d4852;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.instructions p {
    color: #64717e;
    font-size: 1.05rem;
}

/* Appointment Grid */
.appointment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.appointment-slot {
    background: white;
    border: 3px solid #8a95a0;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appointment-slot:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(70, 85, 100, 0.25);
}

.slot-date {
    font-size: 1rem;
    font-weight: 500;
    color: #3d4852;
    text-align: center;
}

.slot-time {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3640;
    text-align: center;
}

.slot-activity {
    font-size: 0.9rem;
    color: #64717e;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.slot-button {
    margin-top: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8a95a0 0%, #64717e 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.slot-button:hover {
    background: linear-gradient(135deg, #64717e 0%, #4a5661 100%);
    transform: translateY(-2px);
}

/* Confirmation Box */
.confirmation-box {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 20px;
}

.confirmation-box h2 {
    font-size: 1.8rem;
    color: #3d4852;
    margin-bottom: 30px;
}

.booking-details {
    background: #f9fafb;
    padding: 25px;
    border-radius: 4px;
    margin: 30px 0;
    border: 2px solid #e8ebed;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8ebed;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #64717e;
}

.detail-value {
    font-weight: 600;
    color: #2d3640;
}

.confirmation-message {
    margin: 20px 0;
    color: #64717e;
    line-height: 1.8;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
    text-align: center;
    border-top: 4px solid #8a95a0;
}

.stat-card.booked {
    border-top-color: #10b981;
}

.stat-card.available {
    border-top-color: #3b82f6;
}

.stat-card i {
    font-size: 2rem;
    color: #8a95a0;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3640;
}

.stat-label {
    font-size: 0.95rem;
    color: #64717e;
    font-weight: 500;
}

/* Admin Sections */
.admin-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(70, 85, 100, 0.15);
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 1.4rem;
    color: #3d4852;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ebed;
}

.admin-section h3 {
    font-size: 1.1rem;
    color: #3d4852;
    margin: 25px 0 15px 0;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

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

.admin-table thead {
    background: linear-gradient(135deg, #f8f9fb 0%, #e8ebed 100%);
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #3d4852;
    border-bottom: 2px solid #d8dce0;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e8ebed;
}

.admin-table tr:hover {
    background: #f9fafb;
}

.booked-row {
    background: #f0fdf4;
}

.available-row {
    background: #eff6ff;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

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

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

.text-muted {
    color: #9ca3af;
}

.no-data {
    color: #64717e;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Footer */
.footer {
    background: linear-gradient(to top, #dfe4e9, #f0f2f5);
    padding: 15px 20px;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(70, 85, 100, 0.12);
    border-top: 1px solid rgba(120, 135, 150, 0.25);
    text-align: center;
    color: #4a5661;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .login-box {
        margin: 20px auto;
        padding: 30px 20px;
    }

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

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

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

    .action-buttons {
        flex-direction: column;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}

/* Print Styles */
@media print {
    body::before {
        display: none;
    }

    .header,
    .footer,
    .back-link,
    .logout-link,
    .action-buttons button {
        display: none;
    }

    .confirmation-box {
        box-shadow: none;
        border: 2px solid #d8dce0;
    }
}
