/* Crane Intelligence Platform - Uniform Design System */

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

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* ===== HEADER STYLES ===== */
.header {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E5E5 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: block !important;
    flex: none !important;
    order: unset !important;
    box-sizing: border-box !important;
}

.uniform-header {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E5E5 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    width: 100vw !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: block !important;
    flex: none !important;
    order: unset !important;
}

.header-container {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
    height: 100px !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Logo - left column */
.logo {
    justify-self: start;
    grid-column: 1;
}

/* Navigation menu - center column */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-self: center;
    grid-column: 2;
}

/* Header right - right column */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: end;
    grid-column: 3;
    position: relative;
}

/* User Profile Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00FF85, #00CC6A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-profile.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Logo Section */
.header-logo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    justify-self: start !important;
    grid-column: 1 !important;
}

.logo-icon {
    width: 300px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.2);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 24px;
    font-weight: 700;
    color: #2C2C2C;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 12px;
    font-weight: 500;
    color: #2C2C2C;
    letter-spacing: 0.5px;
}

/* Navigation */
.header-nav {
    display: flex !important;
    gap: 40px !important;
    align-items: center !important;
    justify-self: center !important;
    grid-column: 2 !important;
}

.nav-link {
    color: #2C2C2C;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #DC2626;
}

/* User Profile */
.header-user {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    justify-self: end !important;
    grid-column: 3 !important;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2C2C2C;
    font-size: 16px;
}

.user-name {
    color: #2C2C2C;
    font-weight: 700;
    font-size: 20px;
}

.user-dropdown {
    color: #6B7280;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
}

.user-dropdown:hover {
    color: #2C2C2C;
}

/* ===== FOOTER STYLES ===== */
.uniform-footer {
    background: #0F172A;
    color: #FFFFFF;
    padding: 80px 0 30px;
    margin-top: auto;
    border-top: 1px solid #1E293B;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Company Info */
.footer-company {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-icon {
    width: 50px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.footer-logo-main {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 1px;
}

.footer-logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: #DC2626;
    letter-spacing: 0.5px;
}

.footer-description {
    color: #D1D5DB;
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.social-icon:hover {
    background: #DC2626;
}

/* Footer Sections */
.footer-section h3 {
    color: #00FF85;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.footer-link:hover {
    color: #00FF85;
    transform: translateX(4px);
}

/* Newsletter Section */
.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.newsletter-input {
    flex: 1;
    padding: 14px 18px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 15px;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #00FF85;
    box-shadow: 0 0 0 3px rgba(0, 255, 133, 0.1);
}

.newsletter-input::placeholder {
    color: #64748B;
}

.newsletter-button {
    padding: 14px 24px;
    background: #00FF85;
    color: #0F172A;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.newsletter-button:hover {
    background: #00E676;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 133, 0.3);
}

/* Copyright Bar */
.footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
}

/* ===== COMPREHENSIVE RESPONSIVE DESIGN ===== */

/* Modern Device Breakpoints */
/* Large Desktop (1400px+) - Default styles */
/* Desktop (1200px - 1399px) */
/* Tablet Landscape (992px - 1199px) */
/* Tablet Portrait (768px - 991px) */
/* Mobile Landscape (576px - 767px) */
/* Mobile Portrait (320px - 575px) */
/* Small Mobile (240px - 319px) */

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn, .auth-btn, .nav-link, .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    .user-profile {
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-svg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

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

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--border-color);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-charcoal);
    border: 1px solid var(--border-gray);
    border-top: none;
    padding: 20px;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.mobile-menu .nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.mobile-auth-buttons .auth-btn {
    width: 100%;
    justify-content: center;
}

/* Auth buttons styling */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.auth-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-btn.login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.auth-btn.login:hover {
    background: var(--border-light);
}

.auth-btn.signup {
    background: var(--accent-green);
    color: var(--primary-charcoal);
}

.auth-btn.signup:hover {
    background: #00CC6A;
    transform: translateY(-1px);
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .content-container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .content-container {
        max-width: 1200px;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .header-container {
        padding: 0 24px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .header-container {
        display: flex !important;
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
        padding: 0 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-right {
        gap: 16px;
        margin-left: auto;
        justify-content: flex-end;
    }
    
    .auth-buttons {
        display: flex;
        margin-left: auto;
    }
    
    .user-profile {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-description {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .footer-section h3 {
        font-size: 17px;
        margin-bottom: 18px;
    }
    
    .footer-link {
        font-size: 14px;
        padding: 6px 0;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .header-container {
        padding: 0 16px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .terminal-data {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .newsletter-form input {
        margin-bottom: 12px;
    }
}

/* Small Mobile (240px - 319px) */
@media (max-width: 319px) {
    .header-container {
        padding: 0 8px;
        gap: 8px;
    }
    
    .logo-svg {
        max-width: 120px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .pricing-card {
        padding: 20px;
    }
    
    .footer-main {
        gap: 16px;
    }
    
    .newsletter-form {
        gap: 8px;
    }
}

/* Mobile Portrait (320px - 575px) */
@media (max-width: 575px) {
    .header-container {
        display: flex !important;
        padding: 0 12px;
        flex-direction: row;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
    }
    
    .header-right {
        gap: 12px;
        margin-left: auto;
        justify-content: flex-end;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .user-profile {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pricing-card {
        padding: 24px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-description {
        max-width: 100%;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-section h3 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .footer-link {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .newsletter-form input {
        margin-bottom: 12px;
        padding: 12px 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.875rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header-container,
    .mobile-menu-toggle,
    .mobile-menu,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-content h1 {
        color: black;
    }
}

/* ===== UTILITY CLASSES ===== */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
