/* Portal Styles - Medical Training AI */

:root {
    --portal-primary: #0D2237;
    --portal-secondary: #1a3a5c;
    --sidebar-width: 260px;
}

/* Auth Pages */
.portal-auth {
    min-height: 100vh;
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.auth-logo {
    max-width: 150px;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.auth-form {
    padding: 2rem;
}

.auth-form .form-label {
    font-weight: 600;
    color: var(--portal-primary);
}

.auth-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
}

.auth-form .form-control:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(13, 34, 55, 0.1);
}

.auth-form .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
}

.auth-form .input-group .form-control {
    border-left: none;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    border: none;
    border-radius: 8px;
    padding: 0.875rem;
    font-weight: 600;
}

.auth-footer {
    text-align: center;
    padding: 0 2rem 2rem;
}

.auth-footer p {
    margin-bottom: 1rem;
}

.back-link {
    color: #666;
    text-decoration: none;
}

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

/* Dashboard Layout */
.portal-dashboard {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* Sidebar */
.portal-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    max-width: 140px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-left: 3px solid #fff;
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.portal-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.portal-topbar {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-search {
    position: relative;
    width: 300px;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.topbar-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
}

.topbar-search input:focus {
    border-color: var(--portal-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    color: var(--portal-primary);
    text-decoration: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.portal-content {
    padding: 2rem;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 1.75rem;
    color: var(--portal-primary);
    margin-bottom: 0.25rem;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--portal-primary);
    margin-bottom: 0;
}

.stat-info p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dashboard-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: transparent;
}

.dashboard-card .card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--portal-primary);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state.small {
    padding: 1rem;
}

.empty-state.small i {
    font-size: 2rem;
}

/* Course List */
.course-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.course-item:last-child {
    border-bottom: none;
}

.course-info {
    flex: 1;
}

.course-info h6 {
    margin-bottom: 0.25rem;
    color: var(--portal-primary);
}

.course-progress {
    width: 150px;
    margin: 0 1rem;
}

.course-progress .progress {
    height: 6px;
    border-radius: 3px;
    margin-bottom: 0.25rem;
}

.course-progress span {
    font-size: 0.75rem;
    color: #666;
}

/* Quiz List */
.quiz-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.quiz-item:last-child {
    border-bottom: none;
}

.quiz-info h6 {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.quiz-score {
    font-weight: 700;
}

/* Referral Card */
.referral-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.referral-code {
    background: #fff;
    border: 2px dashed var(--portal-primary);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.referral-code code {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--portal-primary);
}

/* Booking List */
.booking-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-date {
    width: 50px;
    text-align: center;
    background: var(--portal-primary);
    color: #fff;
    border-radius: 8px;
    padding: 0.5rem;
    margin-right: 1rem;
}

.booking-date .day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.booking-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.booking-info h6 {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--portal-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.quick-link:hover {
    background: #e9ecef;
    color: var(--portal-primary);
}

.quick-link i {
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 991px) {
    .portal-sidebar {
        transform: translateX(-100%);
    }

    .portal-sidebar.show {
        transform: translateX(0);
    }

    .portal-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block !important;
    }
}

@media (max-width: 576px) {
    .portal-content {
        padding: 1rem;
    }

    .portal-topbar {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }
}
