/* ExcelENT Medical Brand Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Quicksand:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ExcelENT Brand Colors */
    --primary-purple: #89007a;
    --primary-magenta: #C25BAB;
    --primary-blue: #459fdc;
    --dark-navy: #061b42;
    --light-purple: #f4e6f3;
    --light-blue: #e6f4fb;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(6, 27, 66, 0.1);
    --shadow-md: 0 4px 12px rgba(6, 27, 66, 0.15);
    --shadow-lg: 0 8px 24px rgba(6, 27, 66, 0.2);
    --shadow-xl: 0 12px 48px rgba(6, 27, 66, 0.25);
}

body {
    font-family: 'Quicksand', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-navy);
    background: #f5f5f5;
    min-height: 100vh;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--dark-navy);
}

/* Drag and Drop Styles for Resources */
.resource-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.resource-card.dragging {
    opacity: 0.5;
}

.resource-card[draggable="true"]:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(137, 0, 122, 0.2);
}

.resource-grid.drag-over {
    background-color: rgba(137, 0, 122, 0.05);
    border-radius: 8px;
    border: 2px dashed #89007a;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.header {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-purple);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-purple)(90deg, var(--primary-purple), var(--primary-magenta), var(--primary-blue));
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    color: var(--gray-medium);
    font-weight: 500;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    background: transparent;
    color: var(--dark-navy);
    border: 2px solid transparent;
    padding: 0.8rem 1.8rem;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    background: var(--light-purple);
    color: var(--primary-purple);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
}

/* Navigation Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.card,
.nav-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(137, 0, 122, 0.1);
}

.card:hover,
.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple);
}

.card::after,
.nav-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-purple)(90deg, var(--primary-purple), var(--primary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::after,
.nav-card:hover::after {
    transform: scaleX(1);
}

.card h2,
.nav-card h3 {
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.card h2 {
    font-size: 1.5rem;
}

.nav-card h3 {
    font-size: 1.3rem;
}

.card p,
.nav-card p {
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.nav-card .icon,
.card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    background: var(--primary-purple)(135deg, var(--primary-purple), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles - Matching ExcelENT Brand */
.btn,
.card a {
    display: inline-block;
    background: var(--white);
    color: var(--primary-magenta);
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 99px;
    border: 2px solid var(--primary-magenta);
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn:hover,
.card a:hover {
    background: var(--primary-magenta);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 91, 171, 0.3);
}

/* Checklist Section */
.checklist-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-blue);
}

.checklist-section h2 {
    font-size: 2rem;
    color: var(--primary-purple);
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.checklist-item {
    background: transparent;
    padding: 0.75rem 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checklist-item:hover {
    background: transparent;
    border-color: #f0f0f0;
    transform: none;
}

.checklist-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.3);
    accent-color: var(--primary-purple);
}

.checklist-item label {
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--dark-navy);
    font-size: 0.95rem;
}

.checklist-item.completed {
    background: var(--primary-purple)(135deg, #e8f5e8, #d4edda);
    border-color: var(--success);
}

.checklist-item.completed label {
    text-decoration: line-through;
    color: var(--gray-medium);
}

/* Departments Section */
.departments-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.departments-section h2 {
    font-size: 2rem;
    color: var(--primary-purple);
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dept-card {
    background: var(--primary-purple)(135deg, var(--primary-purple), var(--primary-magenta));
    color: var(--white);
    padding: 1.8rem 1.2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.dept-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(137, 0, 122, 0.3);
}

.dept-card:hover::before {
    transform: rotate(45deg) translate(20%, 20%);
}

.dept-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
}

.dept-card p {
    font-size: 0.9rem;
    opacity: 0.95;
    color: var(--white);
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.quick-link {
    background: var(--white);
    color: var(--primary-purple);
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-purple);
    font-family: 'Montserrat', sans-serif;
}

.quick-link:hover {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(137, 0, 122, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray-medium);
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* User Info Badge */
#user-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-purple)(135deg, var(--light-purple), var(--white));
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--primary-purple);
}

#user-info span {
    color: var(--dark-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

#user-info button {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 99px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#user-info button:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Role Badge */
#user-role {
    background: var(--primary-purple)(135deg, var(--primary-purple), var(--primary-magenta));
    color: var(--white) !important;
    padding: 0.3rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(137, 0, 122, 0.3);
}

/* Progress Bar */
#progress-bar {
    background: var(--primary-purple)(90deg, var(--primary-purple), var(--primary-blue)) !important;
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-purple);
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
    }
    
    .checklist {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    #user-info {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .tab-navigation,
    #user-info,
    .footer {
        display: none;
    }
    
    .container {
        max-width: 100%;
    }
    
    .card,
    .nav-card {
        break-inside: avoid;
    }
}

/* Accessibility */
:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple)(180deg, var(--primary-purple), var(--primary-blue));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-magenta);
}