/* 
 * HurricaneHive - Application Styles
 * Ocean Theme with Material Design Principles
 * Typography: Inter Font Family
 */

/* ==========================================================================
   Typography - Inter Font
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   Color Variables - Ocean Theme
   ========================================================================== */
:root {
    /* Ocean Theme Brand Colors */
    --ocean-blue: #068297;      /* Primary - Buttons, links, active states */
    --sunset-orange: #CC4600;   /* Accent - Highlights, secondary CTAs */
    --midnight-navy: #0F172A;   /* Dark - Backgrounds, sidebars, nav */
    --sand-white: #FBFAFC;      /* Light - Page backgrounds, cards */
    --sky-gray: #F0F4F8;        /* Neutral - Inputs, secondary panels */
    --palm-green: #10B981;      /* Success - Valid states, gains */
    --sunrise-yellow: #F59E0B;  /* Warn - Warnings, attention */
    --hibiscus-red: #DC2266;    /* Error - Errors, destructive actions */
    
    /* Legacy mappings for easier migration */
    --cerulean: var(--ocean-blue);
    --off-white: var(--sand-white);
    --navy-black: var(--midnight-navy);
    --orange: var(--sunset-orange);
    --neutral-light: var(--sky-gray);
    --emerald: var(--palm-green);
    --red: var(--hibiscus-red);
    
    /* Layout Variables */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --mobile-header-height: 60px;
    
    /* Material Design Elevation Shadows */
    --elevation-1: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);
    --elevation-2: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
    --elevation-3: 0px 3px 3px -2px rgba(0,0,0,0.2), 0px 3px 4px 0px rgba(0,0,0,0.14), 0px 1px 8px 0px rgba(0,0,0,0.12);
    --elevation-4: 0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12);
    --elevation-6: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12);
    --elevation-8: 0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12);
    
    /* Material Design Spacing Scale (4px base) */
    --spacing-0: 0px;
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-3: 12px;
    --spacing-4: 16px;
    --spacing-5: 20px;
    --spacing-6: 24px;
    --spacing-7: 28px;
    --spacing-8: 32px;
    --spacing-10: 40px;
    --spacing-12: 48px;
    --spacing-16: 64px;
    --spacing-20: 80px;
    --spacing-24: 96px;
    
    /* Material Design Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Material Design Typography Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    
    /* Semantic color assignments */
    --primary-color: var(--ocean-blue);
    --secondary-color: var(--sunset-orange);
    --background-color: var(--sand-white);
    --surface-color: #ffffff;
    --text-primary: var(--midnight-navy);
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --hover-color: rgba(6, 130, 151, 0.08);
    
    /* Material Design State Layers */
    --state-hover: rgba(6, 130, 151, 0.04);
    --state-focus: rgba(6, 130, 151, 0.12);
    --state-pressed: rgba(6, 130, 151, 0.16);
    --state-dragged: rgba(6, 130, 151, 0.16);
    
    /* Storm Severity Gradient Colors */
    --storm-td: var(--palm-green);
    --storm-ts: var(--sunrise-yellow);
    --storm-cat1: var(--sunset-orange);
    --storm-cat2: #E85D04;
    --storm-cat3: #DC2F02;
    --storm-cat4: var(--hibiscus-red);
    --storm-cat5: #9D0208;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-variation-settings: normal;
    padding-top: 64px; /* Account for fixed navigation */
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Main App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: var(--midnight-navy);
    height: var(--mobile-header-height);
    padding: 0 var(--spacing-4);
    align-items: center;
    gap: var(--spacing-4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: var(--elevation-2);
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

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

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    flex: 1;
}

.mobile-logo .logo-icon {
    width: 32px;
    height: 32px;
}

.mobile-logo .logo-text {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--primary-color);
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--midnight-navy);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--elevation-6);
    overflow: hidden;
}

/* Collapsed Desktop Sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .btn-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .logo-section {
    justify-content: center;
    padding: var(--spacing-4) var(--spacing-2);
    flex-direction: column;
    gap: var(--spacing-2);
}

.sidebar.collapsed .logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: var(--spacing-3);
    margin: var(--spacing-1) auto;
    width: 48px;
    min-width: 48px;
    border-radius: var(--radius-md);
}

.sidebar.collapsed .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    width: 24px;
    height: 24px;
}

.sidebar.collapsed .nav-link:hover .nav-icon {
    color: white;
}

.sidebar.collapsed .nav-link.active .nav-icon {
    color: var(--primary-color);
}

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

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

.sidebar.collapsed .btn {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    margin: var(--spacing-1) auto;
}

.sidebar.collapsed .btn .material-icons {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-toggle {
    position: static;
    transform: none;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Logo Section */
.logo-section {
    padding: var(--spacing-6) var(--spacing-5);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    position: relative;
    min-height: 88px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: url('../assets/hurricane-hive-logo.png') center/contain no-repeat !important;
}

.logo-text {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
    letter-spacing: -0.025em;
    font-feature-settings: 'ss01', 'ss02';
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-size: 20px;
}

.sidebar-toggle:hover {
    background: var(--state-hover);
    color: white;
}

.sidebar-toggle:hover .material-icons {
    transform: scale(1.1);
}

/* ==========================================================================
   Navigation Styles (Material Design)
   ========================================================================== */
.nav-section {
    flex: 1;
    padding: var(--spacing-5) 0;
    overflow-y: auto;
}

.sidebar.collapsed .nav-section {
    padding: var(--spacing-2) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-menu {
    list-style: none;
    padding: 0 var(--spacing-2);
    width: 100%;
}

.sidebar.collapsed .nav-menu {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.nav-item {
    margin-bottom: var(--spacing-1);
    width: 100%;
}

.sidebar.collapsed .nav-item {
    margin-bottom: var(--spacing-1);
    width: 48px;
    display: flex;
    justify-content: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: var(--spacing-3) var(--spacing-4);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    position: relative;
    font-weight: 500;
    font-size: var(--text-sm);
    min-height: 48px;
}

.nav-link:hover {
    background: var(--state-hover);
    color: white;
}

.nav-link.active {
    background: var(--state-focus);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar.collapsed .nav-link.active::before {
    width: 3px;
    height: 20px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.sidebar.collapsed .nav-icon {
    width: 24px;
    height: 24px;
    color: inherit;
    opacity: 1;
}

.nav-text {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* Sub-navigation (Material Design) */
.nav-submenu {
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    margin: var(--spacing-1) 0 var(--spacing-2) 0;
    border-radius: var(--radius-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.expanded .nav-submenu {
    max-height: 200px;
}

.nav-submenu .nav-link {
    padding: var(--spacing-2) var(--spacing-4) var(--spacing-2) var(--spacing-12);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
    min-height: 40px;
}

.nav-submenu .nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
    background: var(--state-hover);
}

/* Navigation toggle button */
.nav-toggle {
    margin-left: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-size: 20px;
}

.nav-item.expanded .nav-toggle {
    transform: rotate(180deg);
}

.has-submenu .nav-link {
    position: relative;
}

/* ==========================================================================
   Authentication Section
   ========================================================================== */
.auth-section {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar.collapsed .auth-section {
    padding: var(--spacing-4) var(--spacing-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
}

/* ==========================================================================
   Button Components (Material Design)
   ========================================================================== */
.btn {
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: 'Inter', inherit;
    line-height: 1.5;
    min-height: 40px;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn + .btn {
    margin-top: var(--spacing-2);
}

.btn-text {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Material Design Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
    opacity: 0.04;
}

.btn:active::before {
    opacity: 0.12;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--state-hover);
    box-shadow: var(--elevation-1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: var(--elevation-2);
}

.btn-primary:hover {
    background: #057288;
    box-shadow: 0 4px 12px rgba(6, 130, 151, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: 1px solid var(--secondary-color);
    box-shadow: var(--elevation-2);
}

.btn-secondary:hover {
    background: #B33E00;
    box-shadow: 0 4px 12px rgba(204, 70, 0, 0.3);
}

.btn-danger {
    background: var(--hibiscus-red);
    color: white;
    border: 1px solid var(--hibiscus-red);
    box-shadow: var(--elevation-2);
}

.btn-danger:hover {
    background: #C41E5A;
    box-shadow: var(--elevation-4);
}

.btn-success {
    background: var(--palm-green);
    color: white;
    border: 1px solid var(--palm-green);
    box-shadow: var(--elevation-2);
}

.btn-success:hover {
    background: #0E9668;
    box-shadow: var(--elevation-4);
}

.btn-warning {
    background: var(--sunrise-yellow);
    color: white;
    border: 1px solid var(--sunrise-yellow);
    box-shadow: var(--elevation-2);
}

.btn-warning:hover {
    background: #DC8A0A;
    box-shadow: var(--elevation-4);
}

/* Button sizes */
.btn-sm {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--text-xs);
    min-height: 32px;
}

.btn-lg {
    padding: var(--spacing-4) var(--spacing-6);
    font-size: var(--text-base);
    min-height: 48px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--surface-color);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* Content Header */
.content-header {
    background: var(--sky-gray);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left h1 {
    font-size: 1.8em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.breadcrumb {
    color: var(--text-secondary);
    font-size: 0.9em;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Content Area */
.content-area {
    padding: 24px;
}

/* ==========================================================================
   Card Components (Material Design)
   ========================================================================== */
.card {
    background: var(--sand-white);
    border: 1px solid var(--sky-gray);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-1);
    overflow: hidden;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--elevation-3);
}

.card-elevated {
    box-shadow: var(--elevation-3);
}

.card-elevated:hover {
    box-shadow: var(--elevation-6);
}

.card-header {
    padding: var(--spacing-4) var(--spacing-5);
    border-bottom: 1px solid var(--border-color);
    background: var(--sky-gray);
}

.card-body {
    padding: var(--spacing-5);
}

.card-footer {
    padding: var(--spacing-4) var(--spacing-5);
    border-top: 1px solid var(--border-color);
    background: var(--sky-gray);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
    line-height: 1.25;
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-3);
    font-weight: 500;
}

.card-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* ==========================================================================
   Typography Classes (Inter Font Optimized)
   ========================================================================== */
.heading-1 {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.heading-2 {
    font-size: var(--text-3xl);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.heading-3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.heading-4 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.heading-5 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.body-large {
    font-size: var(--text-lg);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
}

.body-medium {
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
}

.body-small {
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
}

.caption {
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.overline {
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Font weight utilities */
.font-thin { font-weight: 100; }
.font-extralight { font-weight: 200; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* ==========================================================================
   Grid System
   ========================================================================== */
.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--hibiscus-red); }
.text-success { color: var(--palm-green); }
.text-warning { color: var(--sunrise-yellow); }

.bg-primary { background-color: var(--primary-color); }
.bg-light { background-color: var(--sky-gray); }
.bg-white { background-color: var(--surface-color); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-group {
    margin-bottom: 16px;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--sky-gray);
}

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

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--sky-gray);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 130, 151, 0.1);
    background: white;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    background: var(--sky-gray);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 130, 151, 0.1);
    background: white;
}

/* ==========================================================================
   Alert Components
   ========================================================================== */
.alert {
    padding: var(--spacing-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-4);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--spacing-1);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-warning .alert-icon {
    color: var(--sunrise-yellow);
}

.alert-error {
    background: rgba(220, 34, 102, 0.1);
    color: #881337;
    border: 1px solid rgba(220, 34, 102, 0.3);
}

.alert-error .alert-icon {
    color: var(--hibiscus-red);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-success .alert-icon {
    color: var(--palm-green);
}

/* ==========================================================================
   Mobile Overlay
   ========================================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1002;
        width: 280px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Reset desktop collapsed state on mobile */
    .sidebar.collapsed {
        width: 280px;
    }

    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .btn-text {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar.collapsed .logo-section {
        justify-content: flex-start;
        padding: var(--spacing-6) var(--spacing-5);
    }

    .sidebar.collapsed .nav-link {
        justify-content: flex-start;
        padding: var(--spacing-3) var(--spacing-4);
    }

    .sidebar.collapsed .nav-submenu {
        display: block;
    }

    .sidebar.collapsed .btn {
        width: 100%;
        height: auto;
        padding: var(--spacing-3) var(--spacing-4);
        justify-content: center;
    }

    .sidebar.collapsed .sidebar-toggle {
        position: static;
        transform: none;
    }

    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }

    .content-header {
        padding: 16px 20px;
    }

    .content-area {
        padding: 20px;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

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

    /* Typography adjustments for mobile */
    .heading-1 {
        font-size: var(--text-3xl);
    }

    .heading-2 {
        font-size: var(--text-2xl);
    }

    .heading-3 {
        font-size: var(--text-xl);
    }
}

/* Desktop-specific enhancements */
@media (min-width: 769px) {
    .mobile-header {
        display: none;
    }

    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-width);
        padding-top: 0;
    }

    /* Tooltip for collapsed sidebar */
    .sidebar.collapsed .nav-link:hover::after {
        content: attr(title);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: var(--midnight-navy);
        color: white;
        padding: 8px 12px;
        border-radius: var(--radius-md);
        font-size: var(--text-sm);
        white-space: nowrap;
        z-index: 1004;
        box-shadow: var(--elevation-4);
        opacity: 1;
        pointer-events: none;
    }
}

/* ==========================================================================
   Storm Intensity Classes
   ========================================================================== */
.storm-td { color: var(--storm-td); }
.storm-ts { color: var(--storm-ts); }
.storm-cat1 { color: var(--storm-cat1); }
.storm-cat2 { color: var(--storm-cat2); }
.storm-cat3 { color: var(--storm-cat3); }
.storm-cat4 { color: var(--storm-cat4); }
.storm-cat5 { color: var(--storm-cat5); }

.bg-storm-td { background-color: var(--storm-td); }
.bg-storm-ts { background-color: var(--storm-ts); }
.bg-storm-cat1 { background-color: var(--storm-cat1); }
.bg-storm-cat2 { background-color: var(--storm-cat2); }
.bg-storm-cat3 { background-color: var(--storm-cat3); }
.bg-storm-cat4 { background-color: var(--storm-cat4); }
.bg-storm-cat5 { background-color: var(--storm-cat5); }

/* ==========================================================================
   Text Product Button Fixes
   ========================================================================== */
.text-product-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.text-product-btn .material-icons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    line-height: 1 !important;
    /* Remove vertical-align for flex context */
    vertical-align: unset !important;
    /* Remove any margin or padding that may be inherited */
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   Research Sidebar Layout
   ========================================================================== */

/* Adjust main content area when sidebar is present */
.with-sidebar {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

/* Page container for sidebar layouts */
.page-container {
  display: flex;
  min-height: calc(100vh - 64px); /* Subtract TopNav height */
}

.sidebar-spacer {
  width: 260px;
  flex-shrink: 0;
}

/* Main content area */
.main-content {
  flex: 1;
  min-width: 0; /* Prevent flex items from overflowing */
}

/* Research page specific adjustments */
.research-page {
  background: var(--sky-gray);
}

/* Mobile sidebar behavior */
@media (max-width: 768px) {
  .with-sidebar {
    margin-left: 0;
  }
  
  .sidebar-spacer {
    display: none;
  }
  
  /* On mobile, sidebar could slide in from left as overlay */
  research-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  research-sidebar.mobile-open {
    transform: translateX(0);
  }
  
  /* Mobile menu toggle button */
  .mobile-sidebar-toggle {
    display: block;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: var(--ocean-blue);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-sidebar-toggle .material-icons {
    font-size: 24px;
  }
}

/* Hide mobile toggle on desktop */
@media (min-width: 769px) {
  .mobile-sidebar-toggle {
    display: none;
  }
}

/* Info panel styles for browse page */
.info-panel {
  background: white;
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-panel-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--midnight-navy);
}

.info-panel-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.info-panel-close:hover {
  background: var(--state-hover);
  color: var(--text-primary);
}

.info-panel-content {
  padding: 24px;
}