:root {
    --color-primary: #1a365d;
    --color-primary-700: #153e75;
    --color-primary-50: #ebf8ff;
    --color-bg: #F3F4F6;
    --color-text: #111111;
    --color-text-muted: #374151;
    --color-border: #D1D5DB;
    --color-surface: #FFFFFF;
    --color-surface-alt: #E5E7EB;
    --color-accent: #2C5282;
    --color-success: #059669;
    --color-warning: #d69e2e;
    --color-needed: #dc2626;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-700) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.header h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.date-badge {
    background: white;
    color: var(--color-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    font-size: 0.95rem;
}

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

.summary-section {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
}

.summary-section h2 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.credentials-grid {
    display: grid;
    gap: 1.5rem;
}

.credential-card {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.credential-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 15px 40px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.credential-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary-50) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--color-border);
}

.credential-header:hover {
    background: linear-gradient(135deg, var(--color-primary-50) 0%, #f0f9ff 100%);
}

.credential-info {
    flex: 1;
}

.credential-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.credential-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.credential-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.needed {
    background: #fee2e2;
    color: var(--color-needed);
}

.status-badge.completed {
    background: #d1fae5;
    color: var(--color-success);
}

.expand-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.credential-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.credential-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.credential-card.expanded .credential-body {
    max-height: 2000px;
}

.credential-content {
    padding: 2rem;
}

.instructions {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 1.5rem;
}

.instructions h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.instructions pre {
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.8;
    color: var(--color-text);
}

.credential-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-700) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.upload-options {
    margin: 2rem 0;
}

.upload-option {
    margin-bottom: 1.5rem;
}

.upload-option h3 {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.upload-option textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.upload-option textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.upload-option input[type="file"] {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    cursor: pointer;
}

.file-hint {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.upload-divider {
    text-align: center;
    color: var(--color-text-muted);
    font-weight: 600;
    margin: 1.5rem 0;
    position: relative;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--color-border);
}

.upload-divider::before {
    left: 0;
}

.upload-divider::after {
    right: 0;
}

/* Calendar Styles */
.calendar-container {
    margin: 2rem 0;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.2s ease;
    font-weight: 500;
}

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

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

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.footer {
    background: var(--color-primary);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-radius: 12px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Success Message */
.success-message {
    background: #d1fae5;
    color: var(--color-success);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-success);
}

.error-message {
    background: #fee2e2;
    color: var(--color-needed);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-needed);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .credential-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .credential-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

