/* MEDirect Professional Sidebar Layout */

:root {
    /* MEDirect Company Colors */
    --medirect-navy: #1a1a2e;
    --medirect-navy-light: #2d2d4a;
    --medirect-navy-dark: #0f0f1a;
    --medirect-cyan: #00bcd4;
    --medirect-cyan-light: #26c6da;
    --medirect-white: #ffffff;
    --medirect-gray: #b8bcc8;
    --medirect-gray-light: #e1e5e9;
    --medirect-dark: #363853;
    --medirect-bg: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    --medirect-card-bg: rgba(45, 45, 74, 0.8);
    --medirect-border: rgba(0, 188, 212, 0.2);
    --medirect-text: #ffffff;
    --medirect-text-muted: #b8bcc8;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--medirect-bg);
    color: var(--medirect-text);
    overflow-x: hidden;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--medirect-navy) 0%, var(--medirect-navy-light) 100%);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--medirect-border);
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.3);
    border-radius: 3px;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
    text-align: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.brand-logo i {
    font-size: 2.5rem;
    color: var(--medirect-cyan);
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--medirect-cyan);
    text-shadow: 0 0 5px rgba(0, 188, 212, 0.3);
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--medirect-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-subtitle {
    display: none;
}

/* Sidebar User */
.sidebar-user {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar i {
    font-size: 2.5rem;
    color: var(--medirect-cyan);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--medirect-white);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    color: var(--medirect-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--medirect-gray);
    font-size: 0.9rem;
    justify-content: center;
}

.sidebar.collapsed .user-details,
.sidebar.collapsed .login-prompt span {
    display: none;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 1rem 0;
}

.menu-section {
    margin-bottom: 2rem;
}

.menu-title {
    font-size: 0.75rem;
    color: var(--medirect-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 0 1.5rem 0.75rem;
}

.sidebar.collapsed .menu-title {
    display: none;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--medirect-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0;
}

.menu-link:hover {
    background: rgba(0, 188, 212, 0.1);
    color: var(--medirect-white);
    transform: translateX(3px);
}

.menu-link.active {
    background: linear-gradient(90deg, rgba(0, 188, 212, 0.2) 0%, rgba(0, 188, 212, 0.05) 100%);
    color: var(--medirect-cyan);
    border-right: 3px solid var(--medirect-cyan);
}

.menu-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-link span {
    display: none;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
    padding: 0.875rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 188, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--medirect-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(0, 188, 212, 0.1);
    color: var(--medirect-cyan);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--medirect-white);
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: var(--medirect-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Content Area - Light Theme */
.content-area {
    flex: 1;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - var(--topbar-height));
}

/* Step Cards - Light Theme */
.step-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00bcd4 0%, #0891b2 100%);
}

.step-card:hover {
    box-shadow: 0 8px 30px rgba(0, 188, 212, 0.15);
    transform: translateY(-2px);
    border-color: #00bcd4;
}

.step-header {
    margin-bottom: 2rem;
}

.step-header h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

.step-header p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* Upload Areas */
.upload-area {
    border: 2px dashed rgba(0, 188, 212, 0.4);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 188, 212, 0.02);
}

.upload-area:hover {
    background: rgba(0, 188, 212, 0.05);
    border-color: #00bcd4;
    transform: scale(1.01);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #00bcd4, #0891b2);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0891b2, #0e7490);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
    color: #ffffff;
}

.btn-outline-primary {
    background: transparent;
    color: #00bcd4;
    border: 1px solid #00bcd4;
}

.btn-outline-primary:hover {
    background: #00bcd4;
    color: #ffffff;
    border-color: #00bcd4;
}

/* Forms */
.form-control {
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #2c3e50;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: #ffffff;
    border-color: #00bcd4;
    color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(0, 188, 212, 0.25);
}

.form-label {
    color: #00bcd4 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Ensure all form labels are teal and visible */
.cv-editor .form-label,
.editor-section .form-label {
    color: #00bcd4 !important;
}

/* Modals */
.modal-content {
    background: var(--medirect-navy-light);
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 16px;
    color: var(--medirect-white);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 188, 212, 0.2);
    padding: 1.5rem;
}

.modal-title {
    color: var(--medirect-cyan);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 188, 212, 0.2);
    padding: 1.5rem;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* Dropdown */
.dropdown-menu {
    background: var(--medirect-navy-light);
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: var(--medirect-gray);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(0, 188, 212, 0.1);
    color: var(--medirect-white);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-area {
        padding: 1.5rem;
    }
    
    .step-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.collapsed {
        transform: translateX(0);
        width: var(--sidebar-collapsed-width);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-content.expanded {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .top-bar {
        padding: 0 1rem;
    }
    
    .welcome-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .step-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
}