/* Reign Services Styles */

:root {
    --primary: #FF6B35;
    --secondary: #0A1F44;
    --tertiary-light: #F8F8F8;
    --tertiary-dark: #D1D1D1;
    --text-dark: #000000;
    --text-light: #2C2C2C;
    --white: #FFFFFF;
}

/* Contact placeholder styles */
.contact-placeholder {
    font-style: italic;
    opacity: 0.9;
    position: relative;
}

/* TachyonBuilt Brand Text Styling */
.tachyon-brand-text {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tachyon-text {
    color: #ffffff;
    font-weight: 700;
}

.built-text {
    color: #FF6B35;
    font-weight: 700;
}

.logo-container:hover .tachyon-brand-text {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Responsive adjustments for brand text */
@media (max-width: 768px) {
    .tachyon-brand-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tachyon-brand-text {
        font-size: 1.3rem;
    }
}

/* Enhanced Badge Visibility - Global Override */
.badge, .badge-success, .badge-warning, .badge-danger, .badge-info, .badge-primary {
    display: inline-block !important;
    padding: 10px 18px !important;
    border-radius: 25px !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: 3px solid transparent !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,1) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.8) !important;
    min-width: 80px !important;
    text-align: center !important;
}

.badge-success {
    background: #1e7e34 !important;
    color: #FFFFFF !important;
    border-color: #155724 !important;
    box-shadow: 0 6px 16px rgba(30, 126, 52, 0.6) !important;
}

.badge-warning {
    background: #ffc107 !important;
    color: #000000 !important;
    border-color: #d39e00 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8) !important;
}

.badge-danger {
    background: #dc3545 !important;
    color: #FFFFFF !important;
    border-color: #bd2130 !important;
}

.badge-info {
    background: #17a2b8 !important;
    color: #FFFFFF !important;
    border-color: #117a8b !important;
}

.badge-primary {
    background: #007bff !important;
    color: #FFFFFF !important;
    border-color: #0056b3 !important;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    background-color: var(--tertiary-light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
}

/* Add subtle quantum background effects */
body.quantum-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        padding: 0;
        position: relative;
    }

    body {
        padding-bottom: 80px; /* Space for bottom navigation */
        background-color: #f0f0f5;
    }

    /* Prevent any element from causing horizontal overflow */
    * {
        max-width: 100vw;
    }

    /* Specific constraints for common overflow sources */
    .container, .appointment-dashboard, .calendar-container, 
    .stats-grid, .appointments-section, .navbar {
        max-width: 100% !important;
        overflow-x: hidden;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Mobile container optimization */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

/* Unified bottom navigation - all screen sizes - 7-item centered layout */
.unified-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

.unified-bottom-nav .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 50px;
    flex: 1;
    max-width: 14.28%;
}

/* Special styling for centered Home button */
.unified-bottom-nav .mobile-nav-item.home-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.unified-bottom-nav .mobile-nav-item.home-center:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Active states for all navigation items */
.unified-bottom-nav .mobile-nav-item.active {
    color: var(--primary);
    background-color: rgba(10, 31, 68, 0.1);
}

.unified-bottom-nav .mobile-nav-item.home-center.active {
    background: linear-gradient(135deg, #4a5fb8 0%, #5a4b82 100%);
    color: white;
}

.unified-bottom-nav .mobile-nav-item:hover,
.unified-bottom-nav .mobile-nav-item.active {
    color: var(--primary);
    background-color: rgba(10, 31, 68, 0.1);
}

.unified-bottom-nav .mobile-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.unified-bottom-nav .mobile-nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Hide bottom navigation on desktop - show only on mobile */
@media (min-width: 769px) {
    .unified-bottom-nav {
        display: none !important;
    }
    
    /* Show desktop-only items and hide mobile-only items */
    .nav-links .desktop-only {
        display: inline-block !important;
    }
    
    .nav-links .mobile-only {
        display: none !important;
    }
    
    /* Desktop dropdown menu styles */
    .nav-links .dropdown {
        position: relative;
    }
    
    .nav-links .dropdown-toggle {
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .nav-links .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(10, 31, 68, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 107, 53, 0.3);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        min-width: 200px;
        z-index: 1000;
        margin-top: 10px;
        padding: 8px 0;
    }
    
    .nav-links .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .nav-links .dropdown-menu li {
        margin: 0 !important;
    }
    
    .nav-links .dropdown-menu li a {
        display: block;
        padding: 10px 20px !important;
        color: #ffffff !important;
        text-decoration: none;
        transition: all 0.2s ease;
        border-radius: 0 !important;
        border: none !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links .dropdown-menu li a:hover {
        background: rgba(255, 107, 53, 0.2) !important;
        color: #FF6B35 !important;
        transform: none !important;
    }
    
    .nav-links .dropdown-menu .divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        margin: 8px 0;
    }
}

/* Mobile-specific visibility */
@media (max-width: 768px) {
    .nav-links .desktop-only {
        display: none !important;
    }
    
    .nav-links .mobile-only {
        display: block !important;
    }
}

/* Legacy mobile nav styles - now handled by unified-bottom-nav */

/* Header & Navigation */
header {
    background-color: var(--primary);
    background-image: linear-gradient(to bottom, #0c2040, #0a1f44);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Mobile header optimization */
@media (max-width: 768px) {
    header {
        box-shadow: 0 1px 4px rgba(0,0,0,0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Mobile navbar alignment */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .navbar .container {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Mobile navigation menu */
    .nav-links {
        display: flex;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 1001;
        padding-top: 2rem;
        list-style: none;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
        width: 90%;
        text-align: center;
    }

    .nav-links a {
        color: white;
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        border-radius: 8px;
        transition: background 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(255,255,255,0.1);
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block !important;
        position: relative;
        z-index: 1002;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 4px;
        width: 44px;
        height: 44px;
        color: white;
        font-size: 18px;
        cursor: pointer;
    }

    .mobile-menu-btn:hover {
        background: rgba(255,255,255,0.2);
    }
}

.logo {
    width: 60px;
    height: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-links a:hover {
    color: #FF6B35;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--white);
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 31, 68, 0.8), rgba(10, 31, 68, 0.8)), url('../images/logos/RS_Dallas_Skyline.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Mobile button optimization */
@media (max-width: 768px) {
    .btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 12px;
        font-weight: 500;
        touch-action: manipulation;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .btn:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    }
}

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

.btn-primary:hover {
    background-color: #4930b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 63, 211, 0.3);
}

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

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

/* Services Section */
.services {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--primary);
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

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

/* Mobile service card optimization */
@media (max-width: 768px) {
    .service-card {
        border-radius: 16px;
        padding: 24px 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }

    .service-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 8px rgba(0,0,0,0.15);
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
    }
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-icon {
    background-color: var(--tertiary-light);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: var(--secondary);
    font-size: 28px;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

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

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--tertiary-light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-info i {
    margin-right: 15px;
    color: var(--secondary);
    font-size: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary);
    outline: none;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Service Details */
.service-detail {
    padding: 80px 0;
}

.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.service-features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.service-features li:before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* Authentication Forms */
.auth-container {
    max-width: 500px;
    margin: 80px auto;
    padding: 40px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Fix for Replit mobile preview mode */
@media (max-width: 480px) {
    .auth-container {
        max-width: 95%;
        margin: 20px auto;
        padding: 20px;
        border-radius: 4px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .auth-container h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .auth-form input {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Specific fix for very narrow viewports (Replit preview) */
@media (max-width: 360px) {
    .auth-container {
        max-width: 100%;
        margin: 10px;
        padding: 15px;
        border-radius: 0;
    }
}

.auth-container h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

.auth-form input:focus {
    border-color: var(--secondary);
    outline: none;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--secondary);
    text-decoration: none;
}

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

/* Dashboard */
.dashboard {
    padding: 80px 0;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    color: var(--primary);
}

.dashboard-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.dashboard-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--tertiary-dark);
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th, 
.user-table td {
    padding: 12px 15px;
    text-align: left;
}

.user-table th {
    background-color: var(--tertiary-light);
    color: var(--primary);
    font-weight: 600;
}

.user-table tr {
    border-bottom: 1px solid var(--tertiary-dark);
}

.user-table tr:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background-color: var(--primary);
    background-image: linear-gradient(to bottom, #0c2040, #0a1f44);
    color: var(--white);
    padding: 60px 0 20px;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.2);
}

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

.footer-column h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

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

.footer-links a {
    color: var(--tertiary-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    color: var(--white);
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary);
}

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

.footer-bottom p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--tertiary-light);
}

.credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.credit span {
    color: var(--white);
    opacity: 0.9;
}

.startup-alchemist-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

.startup-alchemist-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.credit img {
    height: 40px;
    width: auto;
}

.startup-alchemist-text {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive styles */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary);
        background-image: none;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

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

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

/* Flashes */
.flashes {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.flash {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form errors */
.error {
    color: #721c24;
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: #f8d7da;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Mobile Native App-Like Optimizations */
@media (max-width: 768px) {
    /* Dashboard mobile optimization */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px 8px;
    }

    .dashboard-card {
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
        background: white;
        transition: all 0.3s ease;
        margin-bottom: 12px;
    }

    .dashboard-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 8px rgba(0,0,0,0.15);
    }

    /* Enhanced stat cards for mobile */
    .stat-card {
        cursor: pointer;
        position: relative;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .stat-card:active {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 31, 68, 0.05);
        border-radius: 12px;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .stat-card:active::before {
        opacity: 1;
    }

    /* Enhanced action buttons for mobile */
    .action-btn {
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .action-btn:active {
        transform: scale(0.95);
    }

    .action-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 31, 68, 0.05);
        border-radius: 8px;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .action-btn:active::before {
        opacity: 1;
    }

    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        overscroll-behavior: contain;
    }

    .dashboard-welcome {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: var(--white);
        padding: 24px 20px;
        border-radius: 16px;
        margin: 16px 8px 24px 8px;
        text-align: center;
    }

    .dashboard-welcome h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .dashboard-welcome p {
        font-size: 1rem;
        opacity: 0.9;
    }

    /* Form mobile optimization */
    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-size: 16px;
        transition: all 0.3s ease;
        -webkit-appearance: none;
        box-sizing: border-box;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.1);
        outline: none;
    }

    /* Calendar mobile optimization */
    .calendar-container {
        padding: 8px;
        border-radius: 16px;
        background: white;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
        margin: 16px 8px;
    }

    .calendar-header {
        padding: 16px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 16px;
    }

    .calendar-nav button {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 500;
        min-height: 44px;
    }

    /* Modal mobile optimization */
    .modal {
        padding: 16px;
    }

    .modal-content {
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 20px 24px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .modal-body {
        padding: 20px 24px;
    }

    .modal-footer {
        padding: 16px 24px 20px;
        border-top: 1px solid #f0f0f0;
    }

    /* Job folder mobile optimization */
    .job-folder-container {
        padding: 16px 8px;
    }

    .job-folder-header {
        background: white;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    }

    .job-folder-section {
        background: white;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    }
    .   .message-bubble {
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 12px;
        max-width: 85%;
    }

    /* Navigation mobile hide */
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Footer mobile optimization */
    footer {
        padding: 40px 0 100px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

/* Rayne AI Assistant Styles */
.rayne-ai-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rayne-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rayne-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.rayne-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rayne-r {
    font-size: 24px;
    font-weight: bold;
    color: white;
    position: relative;
    z-index: 2;
}

.rayne-bolt {
    position: absolute;
    top: -2px;
    right: -8px;
    font-size: 12px;
    color: #ffd700;
    animation: lightning 2s infinite;
}

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

.rayne-window {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rayne-window.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.rayne-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.rayne-title {
    display: flex;
    flex-direction: column;
}

.rayne-logo {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 2px;
}

.rayne-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.rayne-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

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

.rayne-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rayne-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rayne-message.user {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.rayne-message.user .message-content {
    background: #667eea;
    color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    max-width: 80%;
    word-wrap: break-word;
}

.rayne-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.message-bubble {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.rayne-message.rayne .message-content {
    background: #f8f9fa;
    color: #333;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    word-wrap: break-word;
}

.rayne-message.error .message-content {
    background: #fee;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.message-time {
    font-size: 10px;
    color: #8e9aaf;
    margin-top: 4px;
    text-align: right;
}

.rayne-message.user .message-time {
    text-align: left;
}

.rayne-suggested-actions {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.actions-title {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.action-button {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.action-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.action-button:last-child {
    margin-bottom: 0;
}

.rayne-input-container {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

.rayne-typing {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 12px;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.rayne-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rayne-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.rayne-input:focus {
    border-color: #667eea;
}

.rayne-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.rayne-send:hover {
    background: #5a67d8;
}

/* Mobile responsiveness for Rayne AI */
@media (max-width: 768px) {
    .rayne-ai-widget {
        bottom: 100px; /* Above mobile nav */
        left: 15px;
    }

    .rayne-window {
        width: calc(100vw - 30px);
        height: 400px;
        left: 15px;
        bottom: 70px;
    }

    .rayne-button {
        width: 50px;
        height: 50px;
    }

    .rayne-r {
        font-size: 20px;
    }
}

/* Chat widget visibility controls */
.user-role-company_admin .chat-widget,
.user-role-contractor .chat-widget,
.user-role-contractor_admin .chat-widget,
.user-role-company_sales .chat-widget,
.user-role-company_dispatch .chat-widget,
.user-role-company_billing .chat-widget {
    display: none !important;
}

/* Coming Soon notification styles */
.coming-soon-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
    padding: 16px;
    box-sizing: border-box;
}

.notification-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.notification-content i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.notification-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.notification-content p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.close-notification {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.close-notification:hover {
    background: #5a67d8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Universal notification positioning system */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.notification-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px 20px;
    border-left: 4px solid #667eea;
    animation: slideInNotification 0.3s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.notification-item.success {
    border-left-color: #28a745;
    background: #f8fff9;
}

.notification-item.error {
    border-left-color: #dc3545;
    background: #fff8f8;
}

.notification-item.warning {
    border-left-color: #ffc107;
    background: #fffdf7;
}

.notification-item.info {
    border-left-color: #17a2b8;
    background: #f7fdff;
}

.notification-item .notification-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-item .notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    padding-right: 30px;
}

.notification-message {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    padding-right: 30px;
}

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

@keyframes slideOutNotification {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
        margin-bottom: 10px;
        padding: 16px 20px;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
    }
}

.notification-item.removing {
    animation: slideOutNotification 0.3s ease forwards;
}

/* Mobile notification adjustments */
@media (max-width: 768px) {
    .notification-container {
        top: 80px; /* Below mobile header */
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }

    .notification-item {
        padding: 14px 16px;
        margin-bottom: 8px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }

    .notification-title {
        font-size: 14px;
        padding-right: 35px;
    }

    .notification-message {
        font-size: 13px;
        padding-right: 35px;
    }

    .notification-close {
        top: 6px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    /* Adjust for authenticated users with bottom nav */
    body.user-logged-in .notification-container {
        bottom: 100px; /* Above mobile bottom nav */
        top: auto;
    }

    /* Coming soon modal mobile adjustments */
    .coming-soon-notification {
        padding: 12px;
    }

    .notification-content {
        padding: 24px 20px;
        margin: 0;
        border-radius: 20px;
        max-width: none;
        width: 100%;
    }

    .notification-content h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }

    .notification-content p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .close-notification {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 12px;
        width: 100%;
    }
}

/* Mobile hamburger menu styles for all users */
@media (max-width: 768px) {
    .navbar .mobile-menu-btn {
        display: block !important;
        z-index: 10001;
        position: relative;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 4px;
        width: 44px;
        height: 44px;
        color: white;
        font-size: 18px;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 280px !important;
        height: 100vh !important;
        background: #2c3e50 !important;
        background-image: none !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 80px 20px 20px !important;
        transition: right 0.3s ease !important;
        z-index: 10000 !important;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3) !important;
        display: none !important; /* Hidden by default */
        overflow-y: auto !important;
        overflow-x: visible !important;
        margin: 0 !important;
        list-style: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .nav-links.active {
        right: 0 !important;
        display: flex !important; /* Show when active */
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-links li {
        margin: 0 0 15px 0 !important;
        width: 100% !important;
    }

    .nav-links li a {
        display: block !important;
        padding: 15px 20px !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        font-size: 16px !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        color: white !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }

    .nav-links li a:hover {
        background: rgba(255,255,255,0.1) !important;
        transform: translateX(5px) !important;
        color: var(--tertiary-light) !important;
    }

    .nav-links li a i {
        margin-right: 10px !important;
        width: 20px !important;
    }

    /* Overlay when menu is open */
    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: -280px;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }

    /* Override body constraints when menu is active */
    body.menu-active {
        overflow: hidden !important;
        position: relative !important;
    }

    body.menu-active .container {
        overflow-x: visible !important;
    }

    body.menu-active header {
        overflow-x: visible !important;
    }

    /* Ensure header doesn't interfere and maintains proper height */
    header {
        position: sticky !important;
        top: 0 !important;
        z-index: 999 !important;
        overflow: visible !important;
    }

    .navbar {
        position: relative !important;
        overflow: visible !important;
        min-height: auto !important;
        height: auto !important;
    }
}

/* Updated mobile navigation for 5-item layout */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e1e5e9;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px 0;
        z-index: 1000;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 4px;
        text-decoration: none;
        color: #666;
        transition: all 0.3s ease;
        border-radius: 8px;
        margin: 0 2px;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--primary-color);
        background: rgba(102, 126, 234, 0.1);
    }

    .mobile-nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
        position: relative;
    }

    /* Navigation Badge */
    .nav-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #dc3545;
        color: white;
        border-radius: 50%;
        min-width: 18px;
        height: 18px;
        font-size: 11px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        z-index: 1001;
    }

    .nav-badge:empty,
    .nav-badge[data-count="0"] {
        display: none !important;
    }

    .mobile-nav-label {
        font-size: 10px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
    }

    /* Adjust content bottom padding for authenticated users */
    body.user-logged-in main,
    body.user-logged-in .dashboard-container {
        padding-bottom: 80px;
    }
}

/* Appointment Modal Styles */
.appointment-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px;
    box-sizing: border-box;
}

.appointment-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.appointment-modal .modal-header {
    background: #2c5aa0;
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appointment-modal .modal-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.appointment-modal .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.appointment-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.appointment-modal .appointment-details {
    padding: 20px;
}

.appointment-modal .detail-row {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.appointment-modal .detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.appointment-modal .detail-label {
    font-weight: 600;
    color: #2c5aa0;
    width: 100px;
    flex-shrink: 0;
    margin-right: 15px;
}

.appointment-modal .detail-value {
    flex: 1;
    color: #333;
}

.appointment-modal .detail-value a {
    color: #2c5aa0;
    text-decoration: none;
}

.appointment-modal .detail-value a:hover {
    text-decoration: underline;
}

.appointment-modal .status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.appointment-modal .status-requested {
    background: #ffc107;
}

.appointment-modal .status-approved {
    background: #28a745;
}

.appointment-modal .status-confirmed {
    background: #007bff;
}

.appointment-modal .status-completed {
    background: #6f42c1;
}

.appointment-modal .status-cancelled {
    background: #dc3545;
}

.appointment-modal .modal-actions {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.appointment-modal .btn-modal {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.appointment-modal .btn-approve {
    background: #28a745;
    color: white;
}

.appointment-modal .btn-approve:hover {
    background: #218838;
}

.appointment-modal .btn-reschedule {
    background: #ffc107;
    color: #333;
}

.appointment-modal .btn-reschedule:hover {
    background: #e0a800;
}

.appointment-modal .btn-cancel {
    background: #dc3545;
    color: white;
}

.appointment-modal .btn-cancel:hover {
    background: #c82333;
}

.appointment-modal .btn-close {
    background: #6c757d;
    color: white;
}

.appointment-modal .btn-close:hover {
    background: #5a6268;
}

.appointment-modal .btn-job-folder {
    background: #2c5aa0;
    color: white;
}

.appointment-modal .btn-job-folder:hover {
    background: #1e3f73;
}

/* Mobile optimizations for modal */
@media (max-width: 768px) {
    .appointment-modal {
        padding: 10px;
    }

    .appointment-modal .modal-content {
        max-height: 95vh;
    }

    .appointment-modal .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .appointment-modal .detail-label {
        width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .appointment-modal .modal-actions {
        flex-direction: column;
    }

    .appointment-modal .btn-modal {
        width: 100%;
        min-width: auto;
    }
}

/* Job Folder Mobile Optimization */
.mobile-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.job-header-content h2 {
    margin: 0 0 8px 0;
    color: #2c5aa0;
    font-size: 1.5em;
}

.job-description {
    margin: 5px 0;
    color: #666;
    font-size: 0.95em;
}

.job-badges {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.job-badges .status-badge,
.job-badges .priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.status-badge.status-active { background: #28a745; }
.status-badge.status-pending { background: #ffc107; color: #333; }
.status-badge.status-completed { background: #007bff; }
.status-badge.status-cancelled { background: #dc3545; }

.priority-badge.priority-high { background: #dc3545; }
.priority-badge.priority-medium { background: #ffc107; color: #333; }
.priority-badge.priority-low { background: #28a745; }

.updated-time {
    color: #666;
    font-size: 0.8em;
}

.job-header-actions {
    display: flex;
    gap: 10px;
}

.mobile-job-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Mobile-specific job folder styles */
@media (max-width: 768px) {
    .mobile-job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 16px;
        margin-bottom: 20px;
    }

    .job-header-content {
        width: 100%;
    }

    .job-header-content h2 {
        font-size: 1.3em;
        line-height: 1.3;
    }

    .job-badges {
        gap: 8px;
        margin-top: 12px;
    }

    .job-badges .status-badge,
    .job-badges .priority-badge {
        font-size: 0.75em;
        padding: 3px 8px;
    }

    .updated-time {
        font-size: 0.75em;
        margin-top: 8px;
        display: block;
        width: 100%;
    }

    .job-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .back-btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .mobile-job-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Chat section mobile optimization */
    .chat-section {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }

    .chat-header {
        padding: 16px;
        border-bottom: 1px solid #eee;
    }

    .chat-header h3 {
        font-size: 1.1em;
        margin: 0 0 10px 0;
    }

    .chat-header .btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .chat-messages {
        height: 300px !important;
        padding: 16px;
    }

    .chat-input {
        padding: 16px;
        border-top: 1px solid #eee;
    }

    .chat-input textarea {
        min-height: 60px;
        font-size: 14px;
    }

    /* Sidebar content on mobile */
    .sidebar {
        order: -1; /* Move sidebar above main content on mobile */
    }

    .job-info-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 20px;
        padding: 16px;
    }

    .job-info-card h4 {
        font-size: 1.1em;
        margin: 0 0 12px 0;
        color: #2c5aa0;
    }

    /* Notes section mobile */
    .notes-section {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }

    .notes-header {
        padding: 16px;
        border-bottom: 1px solid #eee;
    }

    .notes-list {
        padding: 16px;
    }

    .notes-input {
        padding: 16px;
        border-top: 1px solid #eee;
    }
}

/* Task status styles */
.status-pending { background-color: #fff3cd; color: #856404; }
.status-in_progress { background-color: #cce5ff; color: #004085; }
.status-completed { background-color: #d4edda; color: #155724; }
.status-cancelled { background-color: #f8d7da; color: #721c24; }

/* Billing module styles */
.billing-subtabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.subtab-button {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.subtab-button:hover {
    background-color: #f8f9fa;
    color: #2c5aa0;
}

.subtab-button.active {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
    background-color: #f8f9fa;
}

.billing-subtab-content {
    display: none;
}

.billing-subtab-content.active {
    display: block;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.expenses-table, .payments-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
    background: #f8f9fa;
    padding: 15px;
    font-weight: bold;
    color: #495057;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.table-row:last-child {
    border-bottom: none;
}

.budget-categories {
    display: grid;
    gap: 20px;
}

.budget-category {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-header h4 {
    margin: 0;
    color: #2c5aa0;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

.category-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #6c757d;
}

/* Competitive Section Styles */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.competitive-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.comparison-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
}

.comparison-card.featured {
    border: 3px solid #007bff;
    transform: scale(1.05);
}

.comparison-header {
    text-align: center;
    margin-bottom: 30px;
}

.comparison-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.comparison-header .price {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    display: block;
}

.comparison-header .discount {
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
    display: inline-block;
}

.comparison-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.comparison-features li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.comparison-features i.fa-check {
    color: #28a745;
    margin-right: 10px;
}

.comparison-features i.fa-times {
    color: #dc3545;
    margin-right: 10px;
}

.ai-features-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.ai-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.ai-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.ai-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ai-icon i {
    font-size: 24px;
    color: white;
}

.ai-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.ai-card p {
    opacity: 1;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 400;
}

/* Client Portal Section Styles */
.client-portal-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.portal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2c5aa0;
}

.portal-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.portal-features {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.portal-features li {
    padding: 12px 0;
    font-size: 1rem;
    color: #333;
    border-bottom: 1px solid #eee;
}

.portal-features li:last-child {
    border-bottom: none;
}

.portal-features i {
    color: #007bff;
    margin-right: 15px;
    width: 20px;
}

.portal-cta {
    text-align: left;
}

.portal-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.portal-mockup {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.mockup-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mockup-buttons {
    display: flex;
    gap: 8px;
}

.mockup-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
}

.mockup-buttons span:nth-child(2) {
    background: #ffc107;
}

.mockup-buttons span:nth-child(3) {
    background: #28a745;
}

.mockup-title {
    font-weight: 600;
    color: #495057;
}

.mockup-content {
    padding: 0;
}

.mockup-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.nav-item {
    padding: 12px 20px;
    font-size: 0.9rem;
    color: #6c757d;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: white;
    color: #007bff;
    font-weight: 600;
}

.mockup-main {
    padding: 30px;
}

.mockup-main h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

.progress-bar-mockup {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill-mockup {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.mockup-main p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .portal-content {
        text-align: center;
    }
}

/* Taki AI Chat Widget Styles */
.taki-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Rayne AI Chat Widget Styles (for tenant sites) */
.rayne-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chat-toggle i {
    color: white;
    font-size: 24px;
}

.chat-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

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

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rayne-avatar, .taki-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rayne-avatar i, .taki-avatar i {
    font-size: 18px;
}

.rayne-info h4, .taki-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.rayne-info p, .taki-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9ff;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 14px;
    line-height: 1.4;
}

.rayne-message, .taki-message {
    align-self: flex-start;
}

.rayne-message .message-content, .taki-message .message-content {
    background: white;
    color: #2c3e50;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.system-message {
    align-self: center;
}

.system-message .message-content {
    background: #e8f5e8;
    color: #2d5a31;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #c3e6c3;
}

.message-time {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 4px;
    align-self: flex-end;
}

.user-message .message-time {
    align-self: flex-end;
}

.rayne-message .message-time {
    align-self: flex-start;
}

.typing-indicator .message-content {
    padding: 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bdc3c7;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0ms;
}

.typing-dots span:nth-child(2) {
    animation-delay: 200ms;
}

.typing-dots span:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.chat-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 12px;
    align-items: center;
}

#rayne-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8f9ff;
}

#rayne-input:focus {
    border-color: #667eea;
    background: white;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-btn:hover {
    transform: scale(1.1);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn i {
    font-size: 14px;
}

/* Mobile responsiveness for chat widget */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .rayne-chat-widget {
        right: 20px;
    }
}

/* New Pricing Grid Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.pricing-card.featured {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #007bff;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-header h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: #fff;
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 10px;
}

.price-wrapper .price {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

.price-wrapper .period {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 5px;
}

.price-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: #28a745;
    margin-right: 12px;
    font-size: 1.1rem;
}

.pricing-features li strong {
    color: #fff;
}

.pricing-cta {
    text-align: center;
    margin-top: 30px;
}

.pricing-cta .btn-primary,
.pricing-cta .btn-secondary {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-comparison {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 40px;
}