/* ============================================
   DEVICE TRACKER - UNIFIED COMPONENT LIBRARY
   ============================================ */

/* === LAYOUT SYSTEM === */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Amazon Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #0F1111;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* === CONTENT AREA === */
.content-area {
    margin-left: 0;
    margin-top: 104px;
    flex: 1;
    min-height: calc(100vh - 104px);
    background: #ffffff;
    width: 100%;
    transition: margin-left 200ms ease-in-out;
    padding: 0;
}

.page-container {
    padding: 24px 32px;
    max-width: 1600px;
    margin: 0 auto;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

/* === CONTENT CARD === */
.content-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

/* === BUTTONS (Amazon-unified) === */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: #ff9900;
    color: #ffffff;
    border-color: #e47911;
}

.btn-primary:hover {
    background: #fa8900;
}

.btn-secondary {
    background: #ffffff;
    color: #0F1111;
    border: 1px solid #d5d9d9;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-success {
    background: #067D62;
    color: white;
}

.btn-success:hover {
    background: #056652;
}

.btn-danger {
    background: #B12704;
    color: white;
}

.btn-danger:hover {
    background: #9a2204;
}

/* === COMBOBOX COMPONENT === */
.combobox-container {
    position: relative;
    width: 100%;
}

.combobox-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.combobox-wrapper {
    position: relative;
}

.combobox-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1f2937;
    transition: all 0.2s ease;
    cursor: pointer;
}

.combobox-input:hover {
    border-color: #9ca3af;
}

.combobox-input:focus {
    outline: none;
    border-color: #007185;
    box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.15);
}

.combobox-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
}

.combobox-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.combobox-dropdown.active {
    display: block;
}

.combobox-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
    color: #374151;
}

.combobox-option:hover {
    background: #f3f4f6;
}

.combobox-option.selected {
    background: #E3F2FD;
    color: #007185;
    font-weight: 600;
}

.combobox-option.focused {
    background: #f9fafb;
}

.combobox-empty {
    padding: 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

/* === FORM FIELDS === */
.field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.field-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.field-input:focus {
    outline: none;
    border-color: #007185;
    box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.15);
}

.field-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-select:focus {
    outline: none;
    border-color: #007185;
    box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.15);
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-primary {
    background: #E3F2FD;
    color: #007185;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* === DARK MODE === */
body.dark-mode {
    background: #1a202c !important;
    color: #e2e8f0;
}

body.dark-mode .content-area {
    background: #1a202c !important;
}

body.dark-mode .content-card,
body.dark-mode .stat-card {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .page-title {
    color: #f7fafc;
}

body.dark-mode .page-subtitle,
body.dark-mode .stat-label {
    color: #a0aec0;
}

body.dark-mode .stat-value {
    color: #f7fafc;
}

body.dark-mode .combobox-input,
body.dark-mode .field-input,
body.dark-mode .field-select {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .combobox-dropdown {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .combobox-option {
    color: #e2e8f0;
}

body.dark-mode .combobox-option:hover {
    background: #374151;
}

body.dark-mode .combobox-option.selected {
    background: #007185;
    color: white;
}

/* Dark mode: secondary nav bar */
body.dark-mode .mega-nav-bar {
    background: #1a202c;
    border-bottom-color: #4a5568;
}

body.dark-mode .mega-nav-tab {
    color: #e2e8f0;
}

body.dark-mode .mega-nav-tab:hover {
    color: #FF9900;
}

body.dark-mode .mega-nav-tab.active {
    color: #FF9900;
    border-bottom-color: #FF9900;
}

body.dark-mode .mega-nav-adm {
    color: #f7fafc;
}

body.dark-mode .mega-nav-hamburger {
    color: #e2e8f0;
}

body.dark-mode .mega-nav-hamburger:hover {
    border-color: #e2e8f0;
}

body.dark-mode .mega-nav-logo-img {
    filter: brightness(0) invert(1);
}

body.dark-mode .mega-nav-breadcrumb {
    border-right-color: #4a5568;
}

body.dark-mode .mega-nav-breadcrumb-sep {
    color: #718096;
}

body.dark-mode .mega-nav-breadcrumb-link {
    color: #63b3ed;
}

body.dark-mode .mega-nav-breadcrumb-link:hover {
    color: #FF9900;
}

body.dark-mode .mega-nav-breadcrumb-current {
    color: #f7fafc;
}

body.dark-mode .mega-nav-link {
    color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .mega-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f7fafc;
}

/* Dark mode: account dropdown */
body.dark-mode .top-nav-dropdown {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .top-nav-dropdown-header {
    color: #f7fafc;
    border-bottom-color: #4a5568;
}

body.dark-mode .top-nav-dropdown-item {
    color: #e2e8f0;
}

body.dark-mode .top-nav-dropdown-item:hover {
    background: #374151;
}

body.dark-mode .top-nav-dropdown-signout {
    color: #fca5a5;
}

body.dark-mode .top-nav-dropdown-signout:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Dark mode: mega nav panel */
body.dark-mode .mega-nav-panel {
    background: #2d3748;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .mega-nav-close {
    color: #a0aec0;
}

body.dark-mode .mega-nav-close:hover {
    background: #4a5568;
    color: #f7fafc;
}

body.dark-mode .mega-nav-sidebar {
    background: #1a202c;
    border-right-color: #4a5568;
}

body.dark-mode .mega-nav-content {
    color: #e2e8f0;
}

body.dark-mode .mega-nav-sidebar-item {
    color: #a0aec0;
}

body.dark-mode .mega-nav-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

body.dark-mode .mega-nav-sidebar-item.active {
    background: rgba(0, 113, 133, 0.15);
    border-left-color: #63b3ed;
    color: #f7fafc;
}

body.dark-mode .mega-nav-grid-item {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .mega-nav-grid-item:hover {
    background: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.dark-mode .mega-nav-grid-item-title {
    color: #63b3ed;
}

body.dark-mode .mega-nav-grid-item-desc {
    color: #a0aec0;
}

body.dark-mode .mega-nav-browse-all {
    color: #63b3ed;
}

body.dark-mode .mega-nav-browse-all:hover {
    color: #FF9900;
}

/* Dark mode: Metrics Strip (Task 5.3) */
body.dark-mode .mega-nav-metric-card {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .mega-nav-metric-card:hover {
    background: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #FF9900;
}

body.dark-mode .mega-nav-metric-label {
    color: #a0aec0;
}

body.dark-mode .mega-nav-metric-value {
    color: #e2e8f0;
}

body.dark-mode .mega-nav-quick-links-title {
    color: #a0aec0;
}

body.dark-mode .mega-nav-quick-link {
    color: #63b3ed;
}

body.dark-mode .mega-nav-quick-link:hover {
    background: rgba(99, 179, 237, 0.1);
    color: #FF9900;
}

/* === SUPPORT MODAL === */
body.support-modal-open {
    overflow: hidden;
}

.support-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
}

.support-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 1100px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.support-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #718096;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 1;
}

.support-modal-close:hover {
    background: #f0f0f0;
    color: #1a202c;
}

.support-modal-close:focus-visible {
    outline: 2px solid #007185;
    outline-offset: 2px;
}

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

.support-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0F1111;
    margin: 0;
}

.support-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    min-height: 400px;
}

.support-modal-chat {
    padding: 20px 24px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.support-modal-chat h3 {
    font-size: 15px;
    font-weight: 700;
    color: #232F3E;
    margin: 0 0 12px 0;
}

.support-modal-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 200px;
    max-height: 300px;
}

.support-chat-msg {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 85%;
}

.support-chat-bot {
    background: #f0f2f5;
    color: #0F1111;
    align-self: flex-start;
}

.support-chat-user {
    background: #007185;
    color: #ffffff;
    margin-left: auto;
}

.support-modal-chat-input {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.support-modal-chat-input .field-input {
    flex: 1;
}

.support-modal-help {
    padding: 20px 24px;
}

.support-modal-help h3 {
    font-size: 15px;
    font-weight: 700;
    color: #232F3E;
    margin: 0 0 12px 0;
}

.support-modal-topics {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.support-modal-topics li {
    margin-bottom: 6px;
}

.support-modal-topics a {
    color: #007185;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    display: inline-block;
}

.support-modal-topics a:hover {
    color: #C7511F;
    text-decoration: underline;
}

.support-modal-contact {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.support-modal-contact p {
    font-size: 13px;
    color: #4a5568;
    margin: 4px 0;
}

.support-modal-community {
    padding: 20px 24px;
    border-left: 1px solid #e2e8f0;
}

.support-modal-community h3 {
    font-size: 15px;
    font-weight: 700;
    color: #232F3E;
    margin: 0 0 12px 0;
}

/* Dark mode: Support Modal */
body.dark-mode .support-modal {
    background: #2d3748;
}

body.dark-mode .support-modal-close {
    color: #a0aec0;
}

body.dark-mode .support-modal-close:hover {
    background: #4a5568;
    color: #f7fafc;
}

body.dark-mode .support-modal-title {
    color: #f7fafc;
}

body.dark-mode .support-modal-header {
    border-bottom-color: #4a5568;
}

body.dark-mode .support-modal-chat {
    border-right-color: #4a5568;
}

body.dark-mode .support-modal-chat h3,
body.dark-mode .support-modal-help h3 {
    color: #f7fafc;
}

body.dark-mode .support-chat-bot {
    background: #374151;
    color: #e2e8f0;
}

body.dark-mode .support-modal-topics a {
    color: #63b3ed;
}

body.dark-mode .support-modal-topics a:hover {
    color: #FF9900;
}

body.dark-mode .support-modal-contact {
    border-top-color: #4a5568;
}

body.dark-mode .support-modal-contact p {
    color: #a0aec0;
}

body.dark-mode .support-modal-community {
    border-left-color: #4a5568;
}

body.dark-mode .support-modal-community h3 {
    color: #f7fafc;
}

/* === CONTACT US PAGE === */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: start;
}

.contact-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #232F3E;
    margin: 0 0 20px 0;
}

.contact-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.contact-error {
    display: none;
    color: #B12704;
    font-size: 12px;
    margin-top: 4px;
}

.field-input-error {
    border-color: #B12704 !important;
}

.contact-success {
    text-align: center;
    padding: 40px 20px;
}

.contact-success h3 {
    font-size: 20px;
    font-weight: 700;
    color: #067D62;
    margin: 16px 0 8px;
}

.contact-success p {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 20px;
}

.contact-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-info-item strong {
    display: block;
    font-size: 14px;
    color: #232F3E;
    margin-bottom: 2px;
}

.contact-info-item p {
    font-size: 13px;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.contact-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-quick-link {
    color: #007185;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
}

.contact-quick-link:hover {
    color: #C7511F;
    text-decoration: underline;
}

/* Dark mode: Contact Us */
body.dark-mode .contact-section-title {
    color: #f7fafc;
}

body.dark-mode .contact-info-item strong {
    color: #f7fafc;
}

body.dark-mode .contact-info-item p {
    color: #a0aec0;
}

body.dark-mode .contact-success h3 {
    color: #48bb78;
}

body.dark-mode .contact-success p {
    color: #a0aec0;
}

body.dark-mode .contact-quick-link {
    color: #63b3ed;
}

body.dark-mode .contact-quick-link:hover {
    color: #FF9900;
}

/* === SITE FOOTER === */
.site-footer {
    background: #232F3E;
    color: rgba(255, 255, 255, 0.85);
    width: 100%;
}

.site-footer-top {
    background: #37475A;
    text-align: center;
    padding: 12px;
}

.site-footer-back-to-top {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 12px;
    transition: color 0.15s ease;
}

.site-footer-back-to-top:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 32px;
    display: flex;
    gap: 60px;
}

.site-footer-logo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.site-footer-logo-img {
    height: 32px;
    width: auto;
}

.site-footer-adm {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 0.5px;
}

.site-footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    flex: 1;
}

.site-footer-column h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.site-footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    padding: 3px 0;
    transition: color 0.15s ease;
}

.site-footer-column a:hover {
    color: #FF9900;
    text-decoration: underline;
}

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

.site-footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Dark mode: Footer */
body.dark-mode .site-footer {
    background: #131A22;
}

body.dark-mode .site-footer-top {
    background: #1a202c;
}

body.dark-mode .site-footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-container {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .mega-nav-bar {
        overflow-x: hidden;
        overflow-y: hidden;
    }

    .mega-nav-bar-center {
        display: none;
    }

    .mega-nav-breadcrumb {
        display: inline-flex;
        font-size: 13px;
    }

    .mega-nav-bar-left {
        flex: 1;
    }

    .mega-nav-logo-img {
        height: 20px;
    }

    .mega-nav-grid {
        grid-template-columns: 1fr;
    }

    .mega-nav-panel-inner {
        flex-direction: column;
    }

    .mega-nav-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 8px 0;
    }

    .top-nav-logo-img {
        height: 20px;
    }

    .top-nav-adm {
        font-size: 12px;
    }

    .support-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .support-modal-body {
        grid-template-columns: 1fr;
    }

    .support-modal-chat {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .support-modal-community {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }

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

    .site-footer-main {
        flex-direction: column;
        gap: 24px;
        padding: 24px 20px;
    }

    .site-footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* === TOP NAVIGATION BAR === */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #0a0f1a 0%, #131a2e 30%, #1a2540 60%, #0d1321 100%);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-hamburger {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.top-nav-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === TOP NAV LOGO (relocated from mega-nav-bar) === */
.top-nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-nav-logo-img {
    height: 32px;
}

.top-nav-adm {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.top-nav-logo {
    color: #FF9900;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.top-nav-service-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.top-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.top-nav-username {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.top-nav-signout {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.15s ease;
}

.top-nav-signout:hover {
    background: rgba(239, 68, 68, 0.15);
}

.top-nav-theme-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.top-nav-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === TOP NAV LINK STYLES (AWS.com style) === */
.top-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color 0.15s ease;
    cursor: pointer;
}

.top-nav-link:hover {
    color: #ffffff;
}

.top-nav-support-btn {
    background: none;
    border: none;
    font-family: inherit;
}

/* === ACCOUNT WRAPPER & DROPDOWN === */
.top-nav-account-wrapper {
    position: relative;
}

.top-nav-account-btn {
    background: none;
    border: none;
    font-family: inherit;
}

.top-nav-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: #ffffff;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1200;
    padding: 8px 0;
}

.top-nav-dropdown-header {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #0F1111;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}

.top-nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #0F1111;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s ease;
}

.top-nav-dropdown-item:hover {
    background: #f0f0f0;
}

.top-nav-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.top-nav-dropdown-signout {
    color: #B12704;
}

.top-nav-dropdown-signout:hover {
    background: #fee2e2;
}

/* === SECONDARY MEGA NAV BAR (AWS.com white bar style) === */
.mega-nav-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 44px;
    background: #ffffff;
    z-index: 1095;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #d5d9d9;
}

.mega-nav-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mega-nav-bar-center {
    display: flex;
    align-items: center;
    gap: 0;
}

.mega-nav-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mega-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mega-nav-logo-img {
    height: 24px;
    filter: brightness(0);
}

.mega-nav-adm {
    color: #0F1111;
    font-size: 16px;
    font-weight: 700;
    padding: 0 8px 0 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* === MEGA NAV HAMBURGER (relocated from top-nav-bar) === */
.mega-nav-hamburger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    color: #0F1111;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 0.15s ease;
    white-space: nowrap;
    height: 36px;
    margin-right: 8px;
}

.mega-nav-hamburger:hover {
    border-color: #0F1111;
}

.mega-nav-hamburger:focus-visible {
    outline: 2px solid #007185;
    outline-offset: -2px;
}

.mega-nav-hamburger-label {
    font-size: 14px;
    font-weight: 700;
}

.mega-nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 12px;
    border-right: 1px solid #d5d9d9;
    margin-right: 4px;
    height: 20px;
}

.mega-nav-breadcrumb:empty {
    display: none;
}

.mega-nav-breadcrumb-sep {
    color: #879596;
    font-size: 12px;
}

.mega-nav-breadcrumb-link {
    color: #007185;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
}

.mega-nav-breadcrumb-link:hover {
    color: #C7511F;
    text-decoration: underline;
}

.mega-nav-breadcrumb-current {
    color: #0F1111;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mega-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 0 10px;
    height: 36px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.mega-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.mega-nav-link:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: -2px;
}

.mega-nav-tab {
    background: none;
    border: none;
    color: #0F1111;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 0 14px;
    height: 44px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
}

.mega-nav-tab:hover {
    color: #C7511F;
}

.mega-nav-tab:focus-visible {
    outline: 2px solid #007185;
    outline-offset: -2px;
}

.mega-nav-tab.active {
    color: #C7511F;
    border-bottom-color: #C7511F;
}

/* === MEGA NAV DROPDOWN PANEL (Task 2.4) === */
.mega-nav-panel {
    position: fixed;
    top: 104px;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 1090;
    max-height: 70vh;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 250ms ease, transform 250ms ease;
}

.mega-nav-panel.open {
    opacity: 1;
    transform: translateY(0);
}

.mega-nav-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 1;
}

.mega-nav-close:hover {
    background: #f0f0f0;
    color: #1a202c;
}

.mega-nav-close:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

.mega-nav-panel-inner {
    display: flex;
    min-height: 200px;
}

.mega-nav-sidebar {
    width: 220px;
    background: #f7f8fa;
    border-right: 1px solid #e2e8f0;
    padding: 16px 0;
    flex-shrink: 0;
}

.mega-nav-content {
    flex: 1;
    padding: 24px;
}

/* === MEGA NAV SIDEBAR ITEMS (Task 4.1) === */
.mega-nav-sidebar-item {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mega-nav-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1a202c;
}

.mega-nav-sidebar-item.active {
    background: rgba(0, 113, 133, 0.08);
    border-left-color: #007185;
    color: #0F1111;
    font-weight: 600;
}

.mega-nav-sidebar-item:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: -2px;
}

/* === MEGA NAV CONTENT GRID (Task 4.2) === */
.mega-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.mega-nav-grid-item {
    display: block;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mega-nav-grid-item:hover {
    background: #f7f8fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mega-nav-grid-item:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

.mega-nav-grid-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #007185;
    margin-bottom: 4px;
}

.mega-nav-grid-item-desc {
    font-size: 12px;
    color: #718096;
    line-height: 1.4;
}

.mega-nav-browse-all {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #007185;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.15s ease;
}

.mega-nav-browse-all:hover {
    color: #FF9900;
    text-decoration: underline;
}

.mega-nav-browse-all:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

/* === MEGA NAV METRICS STRIP (Task 5.3) === */
.mega-nav-metrics {
    display: flex;
    gap: 16px;
    padding: 24px;
    flex-wrap: wrap;
}

.mega-nav-metric-card {
    flex: 1 1 180px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    display: block;
}

.mega-nav-metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #FF9900;
}

.mega-nav-metric-card:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

.mega-nav-metric-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.mega-nav-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #232F3E;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-nav-metric-trend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.mega-nav-metric-trend.trend-up {
    color: #38a169;
    background: rgba(56, 161, 105, 0.1);
}

.mega-nav-metric-trend.trend-down {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

.mega-nav-metric-trend.trend-neutral {
    color: #a0aec0;
    background: rgba(160, 174, 192, 0.1);
}

/* Quick Links */
.mega-nav-quick-links {
    padding: 0 24px 24px;
}

.mega-nav-quick-links-title {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-nav-quick-link {
    display: inline-block;
    font-size: 13px;
    color: #007185;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 4px;
    transition: background 0.15s, color 0.15s;
}

.mega-nav-quick-link:hover {
    background: rgba(0, 113, 133, 0.08);
    color: #FF9900;
    text-decoration: underline;
}

.mega-nav-quick-link:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

/* === MEGA NAV LAB126 PANEL (Task 6.3) === */
.mega-nav-lab126 {
    padding: 24px;
}

.mega-nav-lab126-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mega-nav-lab126-name {
    font-size: 22px;
    font-weight: 700;
    color: #232F3E;
    margin: 0 0 8px 0;
}

.mega-nav-lab126-mission {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 12px 0;
    max-width: 640px;
}

.mega-nav-lab126-hq {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #718096;
}

.mega-nav-lab126-hq svg {
    color: #FF9900;
    flex-shrink: 0;
}

.mega-nav-lab126-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mega-nav-lab126-product {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.mega-nav-lab126-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.mega-nav-lab126-product-icon {
    margin-bottom: 10px;
}

.mega-nav-lab126-product-icon svg {
    display: block;
}

.mega-nav-lab126-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #232F3E;
    margin-bottom: 4px;
}

.mega-nav-lab126-product-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.mega-nav-lab126-links {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.mega-nav-lab126-links-title {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.mega-nav-lab126-link {
    display: inline-block;
    font-size: 13px;
    color: #007185;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    margin-right: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.mega-nav-lab126-link:hover {
    background: rgba(0, 113, 133, 0.08);
    color: #FF9900;
    text-decoration: underline;
}

.mega-nav-lab126-link:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

/* Dark mode: Lab126 Panel (Task 6.3) */
body.dark-mode .mega-nav-lab126-header {
    border-bottom-color: #4a5568;
}

body.dark-mode .mega-nav-lab126-name {
    color: #f7fafc;
}

body.dark-mode .mega-nav-lab126-mission {
    color: #a0aec0;
}

body.dark-mode .mega-nav-lab126-hq {
    color: #a0aec0;
}

body.dark-mode .mega-nav-lab126-product {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .mega-nav-lab126-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .mega-nav-lab126-product-name {
    color: #f7fafc;
}

body.dark-mode .mega-nav-lab126-product-desc {
    color: #a0aec0;
}

body.dark-mode .mega-nav-lab126-links {
    border-top-color: #4a5568;
}

body.dark-mode .mega-nav-lab126-links-title {
    color: #a0aec0;
}

body.dark-mode .mega-nav-lab126-link {
    color: #63b3ed;
}

body.dark-mode .mega-nav-lab126-link:hover {
    background: rgba(99, 179, 237, 0.1);
    color: #FF9900;
}

/* Responsive: Lab126 products grid */
@media (max-width: 768px) {
    .mega-nav-lab126-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mega-nav-lab126-products {
        grid-template-columns: 1fr;
    }
}

/* === SIDE NAVIGATION PANEL (Task 2.6) === */
.side-nav-panel {
    position: fixed;
    top: 104px;
    left: 0;
    bottom: 0;
    width: 280px;
    background: linear-gradient(180deg, #232F3E 0%, #131A22 100%);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 200ms ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

.side-nav-panel::-webkit-scrollbar {
    width: 4px;
}

.side-nav-panel::-webkit-scrollbar-track {
    background: transparent;
}

.side-nav-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

body.side-nav-open {
    overflow: hidden;
}

body.side-nav-open .side-nav-panel {
    transform: translateX(0);
}

.side-nav-menu {
    padding: 8px 0;
}

/* Nav Section */
.nav-section {
    margin-bottom: 2px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.nav-section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chevron rotation */
.nav-section-chevron {
    color: rgba(255, 255, 255, 0.3);
    transition: transform 250ms ease;
    flex-shrink: 0;
}

.nav-section.expanded .nav-section-chevron {
    transform: rotate(180deg);
}

/* Nav Section Body - collapsible */
.nav-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 200ms ease-in-out;
}

.nav-section.expanded .nav-section-body {
    transition: max-height 250ms ease-in-out;
}

/* Nav Items inside side nav panel */
.side-nav-panel .nav-item {
    display: flex;
    align-items: center;
    padding: 9px 20px 9px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    gap: 10px;
    border-left: 3px solid transparent;
}

.side-nav-panel .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.side-nav-panel .nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: transparent;
}

.nav-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nav-item-icon svg {
    width: 18px;
    height: 18px;
}

.nav-item-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === BREADCRUMB BAR (Task 3.3) === */
.breadcrumb-bar {
    padding: 12px 32px;
    font-size: 13px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-bar a {
    color: #007185;
    text-decoration: none;
}

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

.breadcrumb-bar .breadcrumb-sep {
    color: #a0aec0;
}

.breadcrumb-bar .breadcrumb-current {
    color: #1a202c;
    font-weight: 500;
}

/* Dark mode breadcrumb */
body.dark-mode .breadcrumb-bar {
    color: #a0aec0;
}

body.dark-mode .breadcrumb-bar a {
    color: #63b3ed;
}

body.dark-mode .breadcrumb-bar .breadcrumb-sep {
    color: #718096;
}

body.dark-mode .breadcrumb-bar .breadcrumb-current {
    color: #f7fafc;
}

/* Content area adjustments when side nav is open */
body.side-nav-open .content-area {
    margin-left: 0;
    width: 100%;
}

/* === SIDE NAV BACKDROP (Task 5.2/5.4) === */
.side-nav-backdrop {
    position: fixed;
    top: 104px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

body.side-nav-open .side-nav-backdrop {
    display: block;
}

/* === RESPONSIVE: Mobile overlay behavior (Task 5.4) === */
body.side-nav-mobile.side-nav-open .content-area {
    margin-left: 0;
    width: 100%;
}

body.side-nav-open .side-nav-panel {
    /* Overlay mode: panel sits on top of content, no push */
    z-index: 1050;
}
