/* ============================================
   DIABINDIA - Complete Enhanced CSS Styles
   Medical Healthcare Platform with Dashboard
   Mobile-First Responsive Design
   Color Theme: Red (#dc3545), Yellow (#ffc107), White (#ffffff)
============================================ */

/* CSS Variables for Theme Colors */
:root {
    --primary-red: #dc3545;
    --secondary-yellow: #ffc107;
    --accent-blue: #007bff;
    --success-green: #28a745;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --darker-gray: #212529;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-red), #e85a70);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-yellow), #ffdd57);
    --gradient-hero: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(255, 193, 7, 0.1));
    
    /* Shadows */
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 80px;
    --mobile-breakpoint: 768px;
}

/* ============================================
   BASE STYLES & TYPOGRAPHY
============================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Dashboard body override */
body.dashboard {
    background-color: var(--light-gray);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h5 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }
h6 { font-size: 1rem; }

.text-primary-red { color: var(--primary-red) !important; }
.text-secondary-yellow { color: var(--secondary-yellow) !important; }
.bg-primary-red { background-color: var(--primary-red) !important; }
.bg-secondary-yellow { background-color: var(--secondary-yellow) !important; }
.bg-gradient-primary { background: var(--gradient-primary) !important; }
.bg-gradient-secondary { background: var(--gradient-secondary) !important; }

/* Links */
a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-red);
    text-decoration: none;
}

/* ============================================
   LOADING OVERLAY
============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--darker-gray);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* ============================================
   HEADER STYLES
============================================ */

.main-header {
    background: var(--white);
    box-shadow: var(--shadow-light);
    z-index: 1030;
}

/* Brand Styling */
.brand-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Merriweather', serif;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Navigation Links */
.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-red);
    background: rgba(220, 53, 69, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--primary-red);
    transition: var(--transition-medium);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Custom Navbar Toggler */
.custom-toggler {
    border: 2px solid var(--primary-red);
    border-radius: var(--border-radius-sm);
}

.custom-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Dropdown Menus */
.dropdown-menu-custom {
    border: none;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-menu-custom .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--dark-gray);
    transition: var(--transition-fast);
}

.dropdown-menu-custom .dropdown-item:hover {
    background: var(--light-gray);
    color: var(--primary-red);
}

/* User Profile Dropdown */
.user-profile {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 1.5rem;
    color: var(--primary-red);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

/* Navigation Buttons */
.nav-btn {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-xl);
    font-weight: 500;
    transition: var(--transition-medium);
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Language Selector */
.language-selector {
    min-width: 60px;
}

/* Emergency Banner */
.emergency-banner {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.emergency-text {
    font-weight: 500;
}

/* ============================================
   HERO SECTION
============================================ */

.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-xl);
    font-weight: 600;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.hero-features {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    margin-bottom: 1rem;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.feature-item i {
    font-size: 1.5rem;
}

.feature-item span {
    font-weight: 500;
    color: var(--dark-gray);
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.medical-illustration {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: var(--shadow-heavy);
}

.medical-illustration i {
    font-size: 8rem;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

.pulse-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-red);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* ============================================
   DASHBOARD LAYOUT
============================================ */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-content-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-medium);
    min-width: 0; /* Prevent flex overflow */
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   SIDEBAR STYLES
============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1050;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-medium);
}

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

/* Sidebar Brand */
.sidebar-brand {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05), rgba(255, 193, 7, 0.05));
    flex-shrink: 0;
}

.brand-link {
    text-decoration: none;
    display: block;
}

/* User Info */
.sidebar-user-info {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--white);
}

.user-avatar-large .avatar-img,
.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-large i {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.user-details {
    transition: all var(--transition-medium);
    min-width: 0;
    flex: 1;
}

.user-name {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.nav-section-title {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--medium-gray);
    letter-spacing: 0.5px;
    transition: all var(--transition-medium);
}

.nav-section-title span {
    display: block;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--dark-gray);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-medium);
    position: relative;
    min-height: 48px; /* Touch-friendly */
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(220, 53, 69, 0.1);
    color: var(--primary-red);
    transform: translateX(3px);
    text-decoration: none;
    outline: none;
}

.nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.nav-link.active .nav-icon {
    color: var(--white);
}

.nav-icon {
    width: 20px;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    text-align: center;
    color: var(--medium-gray);
    transition: all var(--transition-medium);
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    transition: all var(--transition-medium);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    background: var(--secondary-yellow);
    color: var(--dark-gray);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Emergency Contact */
.emergency-contact .nav-link {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid var(--primary-red);
    margin-top: 1rem;
}

.emergency-contact .nav-link:hover {
    background: var(--primary-red);
    color: var(--white);
}

.emergency-badge {
    background: var(--primary-red);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    animation: pulse 2s infinite;
    margin-left: 0.5rem;
}

/* Dropdown Navigation */
.nav-dropdown .dropdown-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform var(--transition-medium);
    flex-shrink: 0;
}

.nav-dropdown .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-collapse {
    margin-left: 2.5rem;
    margin-right: 0.5rem;
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.nav-submenu li {
    margin: 0;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-medium);
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 44px;
}

.nav-sublink:last-child {
    border-bottom: none;
}

.nav-sublink i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.nav-sublink span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-sublink:hover,
.nav-sublink:focus {
    background: rgba(220, 53, 69, 0.1);
    color: var(--primary-red);
    transform: translateX(3px);
    text-decoration: none;
    outline: none;
}

.nav-sublink.active {
    background: var(--primary-red);
    color: var(--white);
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem;
    background: var(--light-gray);
    flex-shrink: 0;
}

.quick-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    transition: all var(--transition-medium);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.stat-item i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-item > div {
    min-width: 0;
}

.stat-value {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-gray);
    white-space: nowrap;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    color: var(--medium-gray);
    transition: all var(--transition-medium);
    cursor: pointer;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    outline: none;
}

.sidebar-collapse-btn i {
    transition: transform var(--transition-medium);
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* Collapsed Sidebar States */
.sidebar.collapsed .nav-text,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-details,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .quick-stats,
.sidebar.collapsed .dropdown-arrow,
.sidebar.collapsed .nav-badge {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .nav-collapse {
    display: none;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .brand-container {
    justify-content: center;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

/* ============================================
   DASHBOARD HEADER
============================================ */

.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid #e9ecef;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1030;
    flex-shrink: 0;
    padding: 1rem 0;
}

.page-title {
    color: var(--dark-gray);
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 600;
}

.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--medium-gray);
    text-decoration: none;
}

.breadcrumb-custom .breadcrumb-item.active {
    color: var(--primary-red);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    transition: all var(--transition-medium);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: #c82333;
    outline: none;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: var(--light-gray);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content h6 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-content p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ============================================
   MAIN CONTENT STYLES
============================================ */

.main-content {
    margin-top: 100px; /* Account for fixed header */
    min-height: calc(100vh - 100px);
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--light-gray);
}

/* Cards */
.card-custom {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    overflow: hidden;
}

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

.card-header-custom {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    font-weight: 600;
}

/* Buttons */
.btn-custom {
    border-radius: var(--border-radius-xl);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-medium);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-medium);
}

.btn-custom:hover::before {
    left: 100%;
}

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

.btn-secondary-yellow {
    background: var(--gradient-secondary);
    color: var(--dark-gray);
}

/* Forms */
.form-control-custom {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control-custom:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ============================================
   FOOTER STYLES
============================================ */

.main-footer {
    background: var(--darker-gray);
    color: var(--light-gray);
    margin-top: auto;
}

.footer-title {
    color: var(--secondary-yellow);
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-red);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--secondary-yellow);
    text-decoration: none;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    transition: var(--transition-medium);
    text-decoration: none;
}

.social-link:hover {
    background: var(--secondary-yellow);
    color: var(--dark-gray);
    transform: translateY(-3px);
    text-decoration: none;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
    color: var(--secondary-yellow);
    flex-shrink: 0;
}

.contact-item a {
    color: var(--secondary-yellow);
}

.contact-item a:hover {
    color: var(--white);
    text-decoration: none;
}

.footer-divider {
    border-color: var(--medium-gray);
    opacity: 0.3;
}

/* Newsletter Form */
.newsletter-form .input-group {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.newsletter-form .form-control {
    border: none;
    border-radius: 0;
}

.newsletter-form .btn {
    border-radius: 0;
}

/* App Download Buttons */
.app-download-btn img {
    transition: var(--transition-medium);
    filter: brightness(0.9);
    height: 40px;
}

.app-download-btn:hover img {
    filter: brightness(1);
    transform: scale(1.05);
}

/* Developer Footer */
.bg-darker {
    background-color: #1a1e21 !important;
}

.developer-credit {
    font-size: 0.9rem;
}

.developer-credit a {
    text-decoration: none;
    transition: var(--transition-fast);
}

.developer-credit a:hover {
    text-decoration: underline;
}

/* Back to Top Button */
.back-to-top-btn,
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    box-shadow: var(--shadow-medium);
}

.back-to-top-btn.show,
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover,
.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
    outline: none;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--darker-gray);
    color: white;
    padding: 1rem 0;
    z-index: 1040;
    transform: translateY(100%);
    transition: var(--transition-medium);
}

.cookie-banner.show {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE STYLES
============================================ */

/* Desktop Layout */
@media (min-width: 769px) {
    .main-content-dashboard {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar.collapsed + .main-content-dashboard {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .sidebar-toggle {
        display: none;
    }
}

/* Tablet and Mobile Layout */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
    
    .main-content-dashboard {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .dashboard-header {
        padding: 0.75rem 0;
    }
    
    .user-actions {
        gap: 0.25rem;
    }
    
    .user-actions .btn {
        padding: 0.5rem;
    }
    
    .sidebar-collapse-btn {
        display: none;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    /* Hide some elements on mobile */
    .user-actions .d-none.d-sm-block {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .medical-illustration {
        width: 250px;
        height: 250px;
    }
    
    .medical-illustration i {
        font-size: 6rem;
    }
    
    .main-content {
        margin-top: 80px;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        margin-bottom: 0.5rem;
        width: 100%;
        max-width: 250px;
    }
    
    .medical-illustration {
        width: 200px;
        height: 200px;
        margin-top: 2rem;
    }
    
    .medical-illustration i {
        font-size: 4rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.3rem;
    }
    
    .emergency-banner {
        text-align: center;
    }
    
    .emergency-banner .row {
        text-align: center;
    }
    
    .footer-title {
        margin-top: 2rem;
    }
    
    .footer-title:first-child {
        margin-top: 0;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .content-area {
        padding: 0.75rem;
    }
    
    .dashboard-header .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .sidebar {
        width: calc(100vw - 50px);
        max-width: 280px;
    }
    
    .notification-dropdown {
        width: 280px;
    }
    
    .user-actions .d-none.d-lg-block {
        display: none !important;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .app-download-btn img {
        height: 35px;
    }
    
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        border-radius: var(--border-radius-md);
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
============================================ */

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom-light {
    box-shadow: var(--shadow-light) !important;
}

.shadow-custom-medium {
    box-shadow: var(--shadow-medium) !important;
}

.shadow-custom-heavy {
    box-shadow: var(--shadow-heavy) !important;
}

.border-radius-custom {
    border-radius: var(--border-radius-md) !important;
}

.transition-fast {
    transition: var(--transition-fast) !important;
}

.transition-medium {
    transition: var(--transition-medium) !important;
}

.transition-slow {
    transition: var(--transition-slow) !important;
}

/* Custom Scrollbars */
.sidebar-nav::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.notification-dropdown::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track,
.notification-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb,
.notification-dropdown::-webkit-scrollbar-thumb {
    background: rgba(220, 53, 69, 0.3);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover,
.notification-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 53, 69, 0.5);
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .sidebar,
    .dashboard-header,
    .scroll-top-btn,
    .back-to-top-btn,
    .cookie-banner,
    .mobile-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .main-content-dashboard {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0;
    }
    
    body {
        background: white !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-medium: 0 4px 6px rgba(0,0,0,0.3);
        --shadow-heavy: 0 8px 25px rgba(0,0,0,0.4);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}