* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-text {
    text-align: center;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.admin-login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.admin-login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Bottom Admin Button Styles */
.admin-button-container {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.admin-login-btn-bottom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-login-btn-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.admin-button-container.admin-logged-in {
    display: none;
}

/* Appointment Controls Styles */
.appointment-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.sort-controls {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.appointment-controls .form-group {
    margin-bottom: 0;
}

.appointment-controls label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.appointment-controls input,
.appointment-controls select {
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.appointment-controls input:focus,
.appointment-controls select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

@media (max-width: 768px) {
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.close:hover {
    opacity: 0.7;
}

.modal form {
    padding: 2rem;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Person Toggle Styles */
.person-toggle {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid #e9ecef;
}

.toggle-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.toggle-options input[type="radio"] {
    display: none;
}

.toggle-option {
    display: block;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.toggle-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.toggle-options input[type="radio"]:checked + .toggle-option {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.option-title {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.option-description {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .toggle-options {
        grid-template-columns: 1fr;
    }
}

/* Admin Calendar Styles */
.admin-calendar-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #5a6fd8;
}

.month-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.admin-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.admin-calendar .day-header {
    background: #667eea;
    color: white;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.admin-calendar .day-cell {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    border: 1px solid #eee;
    position: relative;
    display: flex;
    flex-direction: column;
}

.admin-calendar .day-cell.other-month {
    background: #f8f9fa;
    color: #999;
}

.admin-calendar .day-cell.today {
    background: #fff3cd;
    border-color: #ffc107;
}

.admin-calendar .day-number {
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #333;
}

.admin-calendar .appointment-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    overflow: hidden;
    line-height: 1.2;
}

.admin-calendar .appointment-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-calendar .appointment-item.counselor {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.admin-calendar .apt-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-calendar .apt-type {
    font-size: 0.65rem;
    opacity: 0.9;
    font-weight: normal;
}

.appointment-details-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.appointment-details {
    padding: 1.5rem;
}

.appointment-details h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.appointment-details .detail-row {
    display: flex;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.appointment-details .detail-label {
    font-weight: bold;
    width: 120px;
    color: #555;
}

.appointment-details .detail-value {
    flex: 1;
    color: #333;
}

@media (max-width: 768px) {
    .admin-calendar {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.8rem;
    }
    
    .admin-calendar .day-cell {
        min-height: 80px;
        padding: 0.25rem;
    }
    
    .calendar-navigation {
        padding: 0;
    }
    
    .month-display {
        font-size: 1.2rem;
    }
}

.section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.admin-subsection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.admin-subsection h3 {
    color: #555;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    margin-top: 2rem;
}

.data-list {
    margin-top: 2rem;
}

.data-list h4 {
    color: #555;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.time-slot-item,
.appointment-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-slot-info,
.appointment-info {
    flex: 1;
}

.time-slot-info strong,
.appointment-info strong {
    color: #667eea;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    min-width: auto;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: #333;
}

.btn-secondary {
    background: linear-gradient(135deg, #868e96 0%, #6c757d 100%);
    color: white;
}

.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.days-of-week {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.25rem 0.5rem;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 0.875rem;
}

.appointment-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-scheduled {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.calendar-nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.calendar-nav-btn:hover {
    background: #5a6fd8;
}

.calendar-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 0.5rem;
    background: #f8f9fa;
    color: #666;
    font-size: 0.875rem;
}

.calendar-day {
    text-align: center;
    padding: 0.75rem;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: #e3f2fd;
}

.calendar-day.available {
    background: #e8f5e8;
    color: #2e7d32;
    font-weight: bold;
}

.calendar-day.available:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-day.selected {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.calendar-day.past {
    color: #ccc;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Time Slot Button Styles */
.time-slot-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.time-slot-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.875rem;
}

.time-slot-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.time-slot-btn.available {
    background: #e8f5e8;
    border-color: #2e7d32;
    color: #2e7d32;
}

.time-slot-btn.available:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot-btn.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.time-slot-btn.booked {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        padding: 0.5rem;
        min-height: 35px;
        font-size: 0.875rem;
    }
    
    .time-slot-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .time-slot-item,
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Cancellation Information Styles */
.cancellation-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #6c757d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cancellation-info h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 1.2rem;
}

.cancellation-info p {
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    font-weight: 600;
    color: #495057;
    min-width: 50px;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cancellation-info {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .contact-label {
        min-width: auto;
    }
}