/* Variables CSS */
:root {
    /* Colors */
    --primary-color: #1e3d34;
    --primary-dark: #0f2a22;
    --secondary-color: #aaa07d;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Layout */
    --header-height: 60px;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Layout */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    z-index: 998;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: var(--spacing-lg) 0;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

.main-content.expanded {
    margin-left: 0;
    width: 100%;
}

.main-content .container {
    max-width: 100%;
    width: 100%;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
    color: var(--gray-600);
    margin-top: auto;
}

/* Header styles */

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-link:hover {
    color: var(--primary-dark);
}

.header .logo-img,
.header img.logo-img,
.logo-link img,
.logo-link .logo-img,
h1.logo img,
h1.logo .logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    vertical-align: middle;
    object-fit: contain;
    display: block;
}

.logo-text {
    vertical-align: middle;
}

.logo-text-short {
    display: none;
}

.logo-text-full {
    display: inline;
}

/* Landing Header Styles */
.landing-header {
    background-color: #F5F5DC;
    min-height: 60px;
    height: 60px;
}

.landing-header .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    z-index: 1001;
    position: relative;
}

.landing-header .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.landing-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

.landing-header .navbar-collapse {
    background-color: #F5F5DC;
    margin-top: 0;
    padding: 0.5rem 0;
    flex-basis: 100%;
    flex-grow: 0;
    flex-shrink: 0;
    align-items: center;
    z-index: 1000;
    width: 100%;
    order: 3;
}

.landing-header .navbar-collapse.show {
    display: flex !important;
}

.landing-header .navbar-collapse.collapsing {
    display: block !important;
    overflow: hidden;
    transition: height 0.35s ease;
}

.landing-header .navbar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.landing-header .navbar-nav .nav-item {
    width: 100%;
    text-align: right;
}

.landing-header .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 1rem;
    width: 100%;
    text-align: right;
}

.landing-header .navbar-nav .nav-link i {
    margin-right: 0.5rem;
}

.landing-header .navbar-nav .dropdown-toggle {
    justify-content: flex-end;
}

.landing-header .navbar-nav .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

@media (min-width: 992px) {
    .landing-header .navbar-collapse {
        margin-top: 0;
        padding: 0;
        flex-basis: auto;
        flex-grow: 0;
    }
    
    .landing-header .navbar-nav {
        width: auto;
        flex-direction: row;
        align-items: center;
    }
    
    .landing-header .navbar-nav .nav-item {
        width: auto;
    }
    
    .landing-header .navbar-nav .nav-link {
        width: auto;
        padding: 0.5rem 1rem;
        justify-content: center;
    }
    
    .landing-header .navbar-nav .dropdown-toggle {
        justify-content: center;
    }
}

.landing-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    height: 100%;
    width: 100%;
    position: relative;
}

.landing-header .navbar-brand {
    flex-shrink: 0;
    order: 1;
}

.landing-header .navbar-toggler {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1001;
}

@media (max-width: 991px) {
    .landing-header .navbar-toggler {
        display: block !important;
        order: 2 !important;
        position: relative;
        z-index: 1001;
    }
    
    .landing-header-container {
        padding-left: 1rem;
        padding-right: 1rem;
        flex-wrap: wrap;
    }
    
    .landing-header .navbar-brand {
        flex: 1;
        order: 1 !important;
    }
    
    .landing-header .navbar-collapse {
        order: 3 !important;
        flex-basis: 100% !important;
        width: 100% !important;
        margin-top: 0.5rem;
        clear: both;
    }
}

.landing-brand {
    font-weight: bold;
    display: flex;
    align-items: center;
    color: #556B2F;
    font-size: 1.5rem;
    text-decoration: none;
    gap: 0.5rem;
}

.landing-logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.navbar-brand img,
.navbar-brand .landing-logo-img,
.navbar-brand > img,
a.navbar-brand img,
a.landing-brand img {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    display: block !important;
}

.landing-header .navbar-brand img,
.landing-header .landing-brand img,
.landing-header img.landing-logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    display: block !important;
}

.landing-logo-text {
    white-space: nowrap;
}

.landing-logo-text .logo-text-short {
    display: none;
}

.landing-logo-text .logo-text-full {
    display: inline;
}


.header-right {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.user-menu i {
    font-size: 1.5rem;
    color: var(--gray-500);
}

/* Sidebar styles */
.sidebar-nav {
    padding: var(--spacing-md) 0;
}

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

.nav-item {
    margin-bottom: var(--spacing-xs);
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin-right: var(--spacing-md);
}

.sidebar .nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Mobile Overlay for Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
        box-shadow: none;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-content .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    /* Prevent body scroll when sidebar is open on mobile */
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Header mobile optimizations */
    .header {
        padding: 0 var(--spacing-md);
    }
    
    .header-left {
        gap: var(--spacing-sm);
        flex: 0 1 auto;
        min-width: 0;
    }
    
    /* Logo optimizations for mobile */
    .header .logo-img {
        height: 32px !important;
        max-width: 80px !important;
        max-height: 32px !important;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-link {
        gap: 0.375rem;
        min-width: 0;
    }
    
    /* Landing header mobile optimizations */
    .landing-header {
        min-height: 56px;
        height: 56px;
    }
    
    .landing-brand {
        font-size: 1.2rem;
        gap: 0.375rem;
    }
    
    .landing-logo-img {
        height: 32px !important;
        max-width: 80px !important;
        max-height: 32px !important;
    }
    
    .navbar-brand img,
    .navbar-brand .landing-logo-img {
        height: 32px !important;
        max-width: 80px !important;
        max-height: 32px !important;
    }
    
    .landing-logo-text {
        font-size: 1.2rem;
    }
    
    /* Hide logo text on very small screens if needed */
    @media (max-width: 360px) {
        .logo-text,
        .landing-logo-text {
            font-size: 1rem;
        }
        
        .header .logo-img,
        .landing-logo-img {
            height: 28px !important;
            max-width: 70px !important;
            max-height: 28px !important;
        }
        
        .navbar-brand img,
        .navbar-brand .landing-logo-img {
            height: 28px !important;
            max-width: 70px !important;
            max-height: 28px !important;
        }
    }
}

/* Mostrar GG solo en pantallas de teléfono móvil (no tablets) - EXCEPTO en landing */
@media (max-width: 576px) {
    .logo-text-full {
        display: none !important;
    }
    
    .logo-text-short {
        display: inline !important;
    }
    
    /* Landing siempre muestra el texto completo, incluso en mobile */
    .landing-logo-text .logo-text-full {
        display: inline !important;
    }
    
    .landing-logo-text .logo-text-short {
        display: none !important;
    }
}

/* Profile Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
}

.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    width: 100%;
}

.profile-name-row h1 {
    flex: 1;
}

.profile-info {
    flex: 1;
    width: 100%;
}

.profile-info h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.75rem;
    font-weight: 600;
}

.profile-email {
    color: var(--gray-600);
    margin: 0 0 var(--spacing-md) 0;
}

.profile-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-verified {
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.status-pending {
    background: #fffbeb;
    color: var(--warning-color);
    border: 1px solid #fde68a;
}

.member-since {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Reusable Form Styles */
.form-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: var(--spacing-xl);
    text-align: center;
}

.form-header h2 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-label i {
    margin-right: var(--spacing-xs);
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 61, 52, 0.1);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .profile-name-row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-status {
        justify-content: center;
    }
}

/* Messages Component */
.messages-container {
    position: fixed;
    top: calc(var(--header-height) + var(--spacing-md));
    right: var(--spacing-md);
    z-index: 1001;
    max-width: 400px;
    width: 100%;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-sm);
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.message__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 2px;
}

.message__content {
    flex: 1;
}

.message__content p {
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.message__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.message__close:hover {
    opacity: 1;
}

/* Message Types */
.message--success {
    background: #f0fdf4;
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.message--error,
.message--danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-left-color: #dc2626 !important;
    font-weight: 600;
    opacity: 1 !important;
}

.message--error .message__content p,
.message--danger .message__content p {
    color: #991b1b !important;
    font-weight: 600;
}

.message--error .message__icon,
.message--danger .message__icon {
    color: #dc2626 !important;
}

.message--warning {
    background: #fffbeb;
    color: var(--warning-color);
    border-left-color: var(--warning-color);
}

.message--info {
    background: #f0f9ff;
    color: var(--info-color);
    border-left-color: var(--info-color);
}

/* Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .messages-container {
        left: var(--spacing-md);
        right: var(--spacing-md);
        max-width: none;
    }
}

/* Family Portal Category Badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.category-badge i {
    font-size: 0.75rem;
}

/* Category Colors */
.category-daily-activity {
    background: var(--primary-color);
    color: white;
}

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

.category-exercise {
    background: var(--warning-color);
    color: white;
}

.category-social {
    background: var(--info-color);
    color: white;
}

.category-medical {
    background: var(--danger-color);
    color: white;
}

.category-family-visit {
    background: var(--secondary-color);
    color: white;
}

.category-celebration {
    background: var(--gray-800);
    color: white;
}

.category-other {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Auth/Login Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: var(--spacing-md);
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-header .logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.auth-header .subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer .text-link {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer .text-link:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.messages {
    margin-bottom: var(--spacing-lg);
}

.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #f0f9ff;
    color: var(--info-color);
    border: 1px solid #bae6fd;
}

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

.auth-card .btn-primary:hover {
    background: var(--primary-dark);
}

.auth-card .btn-full {
    width: 100%;
}

/* Notifications Bell Component */
.notifications-container {
    position: relative;
    margin-right: var(--spacing-md);
    display: flex;
    align-items: center;
    z-index: 1002;
}

.notifications-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--gray-600);
    font-size: 1.25rem;
    transition: all 0.2s ease;
    border-radius: var(--radius-lg);
    background: transparent;
    z-index: 1003;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.notifications-bell:hover {
    color: var(--primary-color);
    background: var(--gray-100);
}

.notifications-bell:active {
    transform: scale(0.95);
}

.notifications-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    min-width: 18px;
    height: 18px;
    text-align: center;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    border: 2px solid white;
    box-sizing: border-box;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 400px;
    max-width: calc(100vw - var(--spacing-lg));
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

.notifications-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.notifications-header h3::before {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.mark-all-read-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--primary-color);
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.mark-all-read-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 450px;
    background: white;
    position: relative;
    z-index: 1;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.notification-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

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

.notification-item.unread {
    background: linear-gradient(to right, #f0f9ff 0%, white 2%);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(var(--spacing-lg) - 3px);
}

.notification-item.unread:hover {
    background: linear-gradient(to right, #e0f2fe 0%, var(--gray-50) 2%);
}

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

.notification-item.unread .notification-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 61, 52, 0.25);
}

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

.notification-title {
    margin: 0 0 6px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
}

.notification-item.unread .notification-title {
    font-weight: 700;
}

.notification-message {
    margin: 0 0 8px 0;
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.notification-action {
    display: inline-block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.notification-action:hover {
    text-decoration: underline;
}

.notification-mark-read {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px;
    font-size: 0.5rem;
    opacity: 0.5;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-mark-read:hover {
    opacity: 1;
    background: rgba(79, 70, 229, 0.1);
    transform: scale(1.1);
}

.notifications-loading,
.notifications-empty,
.notifications-error {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--gray-500);
}

.notifications-loading i,
.notifications-empty i,
.notifications-error i {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-400);
}

.notifications-loading span,
.notifications-empty p,
.notifications-error p {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
}

.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    background: var(--gray-50);
    position: relative;
    z-index: 1;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Notifications Page Styles */
.notifications-list-page {
    padding: var(--spacing-lg);
}

.notifications-actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.notifications-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.notification-item-page {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.notification-item-page:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.notification-item-page.unread {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(to right, #f0f9ff 0%, white 3%);
}

.notification-item-content {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.notification-icon-wrapper {
    flex-shrink: 0;
}

.notification-icon-page {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

.notification-icon-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0891b2 100%);
}

.notification-icon-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.notification-icon-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.notification-icon-error {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

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

.notification-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    gap: var(--spacing-md);
}

.notification-title-page {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.notification-item-page.unread .notification-title-page {
    font-weight: 700;
    color: var(--gray-900);
}

.notification-badge-new {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-mark-read-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--primary-color);
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.notification-mark-read-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.notification-message-page {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.notification-time-page {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.notification-action-wrapper {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

.notification-action-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.notification-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.notifications-empty-page {
    padding: var(--spacing-2xl);
}

.notifications-empty-page .empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.notifications-empty-page .empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
}

.notifications-empty-page .empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.notifications-empty-page .empty-state p {
    font-size: 1rem;
    color: var(--gray-500);
    margin: 0;
}

/* Notifications Overlay for Mobile */
.notifications-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
}

.notifications-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .notifications-overlay {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-container {
        margin-right: var(--spacing-sm);
        position: relative;
        z-index: 1002;
    }
    
    .notifications-bell {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
        z-index: 1003;
        position: relative;
    }
    
    .notifications-badge {
        top: 4px;
        right: 4px;
        font-size: 0.65rem;
        padding: 2px 5px;
        min-width: 16px;
        height: 16px;
    }
    
    .notifications-dropdown {
        position: fixed !important;
        top: var(--header-height);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - var(--header-height) - 24px);
        transform: translateY(-10px) scale(0.95);
        z-index: 1001 !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        background: white !important;
        isolation: isolate;
    }
    
    .notifications-dropdown.show {
        transform: translateY(0) scale(1);
    }
    
    .notifications-overlay.show {
        z-index: 999;
    }
    
    body.notifications-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}