/* Reset și Variabile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Hospital Blue */
    --primary-color: #006295;
    --primary-dark: #004d75;
    --primary-light: #e6f0f5;

    /* Secondary Colors - Gray */
    --secondary-color: #c5c5c5;
    --secondary-light: #f5f5f5;

    /* Status Colors - Blue & Gray */
    --success-color: #006295;
    --success-light: #e6f0f5;
    --warning-color: #c5c5c5;
    --warning-light: #f0f0f0;
    --danger-color: #666666;
    --danger-light: #f0f0f0;
    --info-color: #006295;
    --info-light: #e6f0f5;

    /* Text Colors */
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;

    /* Background Colors */
    --bg-color: #e8e8e8;
    --bg-light: #f0f0f0;
    --white: #ffffff;

    /* Border Colors */
    --border-color: #c5c5c5;
    --border-light: #e0e0e0;

    /* Shadows */
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);

    /* Hero Background - Hospital Blue (solid color) */
    --gradient-primary: #006295;
    --gradient-success: #e6f0f5;
    --gradient-warning: #f0f0f0;
    --gradient-danger: #f0f0f0;
    --gradient-info: #e6f0f5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 10px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Navigation */
.main-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    flex-wrap: nowrap;
}

.nav-menu > li {
    position: relative;
}

/* Hide mobile menu header on desktop */
.nav-menu-header {
    display: none;
}

.nav-menu > li > a {
    display: block;
    padding: 8px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    list-style: none;
    border-radius: 4px;
    padding: 10px 0;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-menu {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.user-name {
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 8px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-menu .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* Button styles */
.btn-login {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.btn-laborator {
    background: #006295 !important;
    color: white !important;
    border-color: #006295 !important;
}

.btn-admin {
    background: var(--danger-color) !important;
    color: white !important;
    border-color: var(--danger-color) !important;
}

.btn-logout {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-logout:hover {
    background: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

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

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-secondary {
    background-color: #c5c5c5;
    color: #333333;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background-color: #e6f0f5;
    color: #006295;
    border: 1px solid #006295;
}

.alert-error {
    background-color: #f0f0f0;
    color: #666666;
    border: 1px solid #c5c5c5;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* Hero Section */
.hero {
    background: #006295;
    color: #ffffff !important;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff !important;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #ffffff !important;
}

.hero * {
    color: #ffffff !important;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.card-icon svg {
    width: 48px;
    height: 48px;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card .btn {
    text-align: center;
}

/* Info Boxes */
.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-box {
    background-color: var(--white);
    padding: 25px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.info-icon {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-icon svg {
    width: 32px;
    height: 32px;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-box p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Section */
.section {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

.section h3 {
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.section ul li {
    margin-bottom: 8px;
    color: var(--text-light);
}

/* Footer */
.footer {
    background-color: #006295;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control:disabled {
    background-color: var(--bg-color);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 968px) {
    .header-content {
        flex-wrap: nowrap;
    }

    .logo {
        flex: 1;
    }

    .header-actions {
        order: 2;
        margin-right: 10px;
    }

    .menu-toggle {
        display: flex;
        order: 3;
        z-index: 10002;
        position: relative;
    }

    /* Hide hamburger when menu is open */
    .menu-toggle.active {
        opacity: 0;
        pointer-events: none;
    }

    /* Hamburger animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .main-nav {
        order: 2;
        width: auto;
        flex: 0;
    }

    /* Mobile menu - slide-in panel with integrated overlay */
    .nav-menu {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background-color: var(--white);
        padding: 0 0 30px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 10001;
        overflow-y: auto;
        gap: 0;
        pointer-events: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    /* Mobile menu header with close button */
    .nav-menu-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px !important;
        background-color: var(--primary-color);
        border-bottom: none !important;
    }

    .nav-menu-title {
        color: white;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .nav-menu-close {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

    .nav-menu-close:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    /* Mobile menu overlay - covers only left side */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        height: 100%;
        background: rgba(0, 0, 0, 0);
        z-index: 10000;
        pointer-events: none;
        transition: background 0.3s ease-in-out;
    }

    .mobile-menu-overlay.active {
        background: rgba(0, 0, 0, 0.5);
        pointer-events: auto;
    }

    .nav-menu > li {
        border-bottom: 1px solid var(--border-light);
        position: relative;
        list-style: none;
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li:not(.nav-menu-header) {
        padding: 0 15px;
    }

    .nav-menu > li > a {
        padding: 15px 10px;
        font-size: 1rem;
        display: block;
        pointer-events: auto !important;
        cursor: pointer;
        color: var(--text-color);
        text-decoration: none;
        background-color: transparent;
        border-radius: 0;
    }

    .nav-menu > li > a:hover,
    .nav-menu > li > a.active {
        background-color: transparent;
        color: var(--primary-color);
    }

    /* Body scroll lock when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: var(--bg-color);
        margin-left: 15px;
        border-radius: 0;
        padding: 5px 0;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 25px;
    }

    /* Header actions responsive */
    .header-actions {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .header-actions .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .header-actions .btn svg {
        margin-right: 0 !important;
    }

    /* Hide button text on mobile, show only icons */
    .header-actions .btn-text {
        display: none;
    }

    .user-menu {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .user-menu .user-name {
        display: none;
    }

    .user-menu .btn {
        padding: 8px 12px;
    }

    .user-menu .btn svg {
        margin-right: 0 !important;
    }

    .user-menu .btn-text {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .header-actions .btn {
        padding: 6px 10px;
    }

    .user-menu .btn {
        padding: 6px 10px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .logo h1 {
        font-size: 0.85rem;
    }

    .header-actions .btn,
    .user-menu .btn {
        padding: 6px 8px;
    }

    .header-actions .btn svg,
    .user-menu .btn svg {
        width: 14px;
        height: 14px;
    }
}

/* =====================================================
   Quick Access Sidebar Styles
   ===================================================== */
.quick-sidebar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.quick-sidebar-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 98, 149, 0.4);
    transition: all 0.3s ease;
}

.quick-sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 98, 149, 0.5);
}

.quick-sidebar-toggle .toggle-icon-close {
    display: none;
}

.quick-sidebar.open .quick-sidebar-toggle .toggle-icon-open {
    display: none;
}

.quick-sidebar.open .quick-sidebar-toggle .toggle-icon-close {
    display: block;
}

.quick-sidebar-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quick-sidebar.open .quick-sidebar-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.quick-sidebar-header {
    padding: 20px;
    background: var(--gradient-primary);
    color: white;
}

.quick-sidebar-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.quick-sidebar-header .user-greeting {
    font-size: 0.85rem;
    opacity: 0.9;
}

.quick-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.quick-nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.quick-nav-section:last-child {
    margin-bottom: 0;
}

.quick-nav-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.quick-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.quick-nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.quick-nav-item:hover svg {
    opacity: 1;
}

.quick-nav-item span:first-of-type {
    flex: 1;
}

.quick-nav-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: var(--success-color);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.quick-nav-item.telemedicine {
    background: rgba(0, 98, 149, 0.08);
}

.quick-nav-item.telemedicine:hover {
    background: rgba(0, 98, 149, 0.15);
}

.quick-nav-item.admin {
    background: rgba(197, 197, 197, 0.15);
}

.quick-nav-item.admin:hover {
    background: rgba(197, 197, 197, 0.25);
    color: #333333;
}

.quick-nav-item.logout {
    color: var(--danger-color);
}

.quick-nav-item.logout:hover {
    background: var(--danger-light);
}

.quick-nav-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 8px;
    margin-top: 8px;
}

/* Mobile responsive pentru quick sidebar */
@media (max-width: 768px) {
    .quick-sidebar {
        right: 15px;
        bottom: 15px;
    }
    
    .quick-sidebar-toggle {
        width: 50px;
        height: 50px;
    }
    
    .quick-sidebar-panel {
        width: calc(100vw - 30px);
        max-width: 320px;
        right: 0;
        bottom: 65px;
        max-height: calc(100vh - 100px);
    }
}

@media (max-width: 480px) {
    .quick-sidebar-panel {
        width: calc(100vw - 30px);
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(20px) scale(0.95);
    }
    
    .quick-sidebar.open .quick-sidebar-panel {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Overlay pentru mobile când sidebar-ul e deschis */
.quick-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-sidebar.open + .quick-sidebar-overlay,
.quick-sidebar.open ~ .quick-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar personalizat pentru sidebar */
.quick-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.quick-sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.quick-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s;
    background: var(--white);
}

.pagination li a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination li.active span,
.pagination li span[aria-current="page"] {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination li.disabled span {
    color: var(--text-muted);
    cursor: not-allowed;
    background: var(--bg-light);
}

/* Tailwind pagination override */
nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

nav[role="navigation"] > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

nav[role="navigation"] span.relative {
    display: flex;
    gap: 5px;
}

nav[role="navigation"] a,
nav[role="navigation"] span:not(.relative) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s;
    background: var(--white);
}

nav[role="navigation"] a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

nav[role="navigation"] span[aria-current="page"] {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

nav[role="navigation"] span[aria-disabled="true"] {
    color: var(--text-muted);
    cursor: not-allowed;
    background: var(--bg-light);
}
