/**
 * User Settings Page Styles
 * 
 * Comprehensive styling for the settings interface
 * 
 * @package AstroUtah_Foundation
 * @since 1.0.0
 */

/* ============================================================================
   SETTINGS CONTAINER
   ============================================================================ */

.astroutah-settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #e5e7eb;
    background: #0f0f14;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #374151;
}

.settings-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.subscription-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tier-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
}

.tier-badge[data-tier="guest"] {
    background: #374151;
    color: #9ca3af;
}

.tier-badge[data-tier="basic"] {
    background: #3b82f6;
    color: #ffffff;
}

.tier-badge[data-tier="premium"] {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #ffffff;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}

/* ============================================================================
   SUBSCRIPTION BANNER
   ============================================================================ */

.subscription-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #60a5fa;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-icon {
    font-size: 32px;
    color: #60a5fa;
}

.banner-text {
    flex: 1;
}

.banner-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    color: #ffffff;
}

.banner-text p {
    margin: 0;
    color: #d1d5db;
    font-size: 14px;
}

.banner-cta {
    padding: 10px 24px;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.banner-cta:hover {
    transform: scale(1.05);
}

/* ============================================================================
   TABS
   ============================================================================ */

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1a1a1f;
    border: 2px solid #374151;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.tab-btn:hover {
    background: #252530;
    border-color: #4b5563;
    color: #e5e7eb;
}

.tab-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.tab-btn.active .feature-lock {
    display: none !important;
}

.feature-lock {
    display: none;
    color: #f59e0b;
    font-size: 16px;
}

/* ============================================================================
   TAB CONTENT
   ============================================================================ */

.settings-content {
    background: #1a1a1f;
    border-radius: 12px;
    border: 1px solid #374151;
    min-height: 500px;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   SETTINGS SECTIONS
   ============================================================================ */

.settings-section {
    margin-bottom: 40px;
    position: relative;
}

.settings-section.locked {
    opacity: 0.5;
    pointer-events: none;
}

.settings-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.section-description {
    color: #9ca3af;
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* ============================================================================
   FORM GROUPS
   ============================================================================ */

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: #0f0f14;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    transition: all 0.2s;
}

/* Ensure dropdown options are always readable against the dark background */
.form-group select option {
    background: #1f2937;
    color: #e5e7eb;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60a5fa;
    background: #19181f;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Auto-save notice */
.auto-save-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #10b981;
    font-size: 14px;
    margin-top: 20px;
}

.auto-save-notice svg {
    flex-shrink: 0;
}

/* ============================================================================
   LOCATION LIST (Multiple Locations)
   ============================================================================ */

.location-list {
    max-width: 900px;
}

.add-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.add-location-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================================================
   SITE CARDS  (expandable location cards)
   ============================================================================ */

.site-card {
    background: #1e3a8a;
    border-radius: 10px;
    border-left: 4px solid #60a5fa;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.site-card:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

.site-card--primary {
    border-left-color: #10b981;
}

.site-card--imported {
    opacity: 0.92;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Header (always visible, clickable) Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
}

.site-card-icon {
    flex-shrink: 0;
    color: #60a5fa;
    display: flex;
    align-items: center;
}

.site-card--primary .site-card-icon {
    color: #10b981;
}

.site-card-summary {
    flex: 1;
    min-width: 0;
}

.site-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.site-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #f3f4f6;
}

.site-card-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Badges Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.site-badge--primary  { background: #10b981; color: #fff; }
.site-badge--shared   { background: #f59e0b; color: #fff; }
.site-badge--imported { background: #6b7280; color: #fff; }

/* Ã¢â€â‚¬Ã¢â€â‚¬ Header action buttons Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-card-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.site-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-width: 34px;
    min-height: 34px;
    background: rgba(75,85,99,0.3);
    border: 1px solid #4b5563;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    gap: 4px;
    white-space: nowrap;
}

.site-action-btn--primary {
    padding: 8px 12px;
    border-color: #059669;
    color: #10b981;
}

.site-action-btn--primary:hover {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16,185,129,0.35);
}

.site-action-btn--edit {
    border-color: #2563eb;
    color: #3b82f6;
}

.site-action-btn--edit:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59,130,246,0.35);
}

.site-action-btn--delete {
    border-color: #ef4444;
    color: #ef4444;
}

.site-action-btn--delete:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Expand chevron Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.site-expand-btn:hover { color: #60a5fa; }

.site-expand-chevron {
    display: flex;
    transition: transform 0.3s ease;
}

.site-card--expanded .site-expand-chevron {
    transform: rotate(90deg);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Body (collapsible) Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    border-top: 0 solid #2d4a9e;
}

.site-card--expanded .site-card-body {
    max-height: 1200px;
    border-top-width: 1px;
    transition: max-height 0.45s ease-in;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Inner tab bar Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-tabs {
    display: flex;
    gap: 0;
    background: #172554;
    border-bottom: 1px solid #2d4a9e;
}

.site-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.site-tab-btn:hover { color: #93c5fd; }

.site-tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
    background: rgba(96,165,250,0.07);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Tab panels Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-tab-panel {
    display: none;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.site-tab-panel.active { display: block; }

/* Slim scrollbar for tab panels */
.site-tab-panel::-webkit-scrollbar { width: 4px; }
.site-tab-panel::-webkit-scrollbar-track { background: #0f172a; border-radius: 2px; }
.site-tab-panel::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

/* Ã¢â€â‚¬Ã¢â€â‚¬ Details tab Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-detail-desc {
    font-size: 14px;
    color: #d1d5db;
    font-style: italic;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.site-detail-empty {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    margin: 0 0 14px 0;
}

.site-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.site-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-detail-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.site-detail-value {
    font-size: 13px;
    color: #e5e7eb;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Horizon / Equipment empty & readonly states Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-tab-empty {
    padding: 8px 0;
    text-align: center;
    color: #9ca3af;
}

.site-tab-empty p { margin: 0 0 6px 0; font-size: 14px; }

.site-tab-hint {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-style: italic;
}

.site-tab-readonly {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 13px;
    line-height: 1.5;
}

.site-tab-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: #1d4ed8;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.site-tab-action-btn:hover { background: #2563eb; }

/* Ã¢â€â‚¬Ã¢â€â‚¬ Site equipment list Ã¢â€â‚¬Ã¢â€â‚¬ */
.site-equipment-list {
    list-style: none;
    margin: 0 0 6px 0;
    padding: 0;
}

.site-equipment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    color: #e5e7eb;
}

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

.site-equip-icon { color: #60a5fa; display: flex; }

.site-equip-name { flex: 1; }

.site-equip-delete {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.site-equip-delete:hover { opacity: 1; }

.site-equipment-list--readonly .site-equipment-item { cursor: default; }

/* ============================================================================
   SITE HORIZON EDITOR
   ============================================================================ */

.site-horizon-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.site-horizon-elevation {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-horizon-elevation label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-horizon-elevation-input {
    width: 110px;
    padding: 6px 10px;
    background: #1a1a2e !important;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    -webkit-text-fill-color: #ffffff !important;
}

.site-horizon-elevation-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1f2937 !important;
}

.site-horizon-canvas-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-horizon-canvas {
    width: 100%;
    max-width: 560px;
    height: 180px;
    border-radius: 6px;
    border: 1px solid #1e3a5f;
    display: block;
    background: #0f172a;
}

.site-horizon-canvas-labels {
    display: flex;
    justify-content: space-between;
    max-width: 560px;
    font-size: 10px;
    color: #4b5563;
    padding: 0 2px;
    letter-spacing: 0.03em;
}

.site-horizon-points h5 {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px 0;
}

.site-horizon-point-list {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.site-horizon-point-list::-webkit-scrollbar { width: 4px; }
.site-horizon-point-list::-webkit-scrollbar-track { background: #0f172a; border-radius: 2px; }
.site-horizon-point-list::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

.site-horizon-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #6b7280;
    font-style: italic;
}

.site-horizon-point {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.site-horizon-point input {
    width: 140px;
    padding: 6px 10px;
    background: #0f172a;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e5e7eb !important;
    font-size: 13px;
    transition: border-color 0.2s;
}

.site-horizon-point input:focus {
    outline: none;
    border-color: #3b82f6;
}

.site-delete-point-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.site-delete-point-btn:hover { opacity: 1; }

.site-add-point-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed #374151;
    border-radius: 6px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.site-add-point-btn:hover {
    border-color: #3b82f6;
    color: #60a5fa;
}

.site-horizon-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}





/* Shared Locations */
.shared-locations-list {
    max-width: 900px;
}

/* Region Groups (Collapsible) */
.region-group {
    margin-bottom: 4px;
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.region-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background: #1f2937;
}

.region-header:hover {
    background: #374151;
}

.region-toggle {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    color: #60a5fa;
}

.region-group.expanded .region-toggle {
    transform: rotate(90deg);
}

.region-name {
    flex: 1;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.region-count {
    color: #9ca3af;
    font-size: 14px;
}

.region-locations {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #111827;
}

.region-group.expanded .region-locations {
    max-height: 5000px;
    transition: max-height 0.6s ease-in;
    padding: 8px;
}

/* Shared Location Cards - Collapsible */
.shared-location-card {
    margin-bottom: 8px;
    background: #1e3a8a;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    overflow: hidden;
    transition: all 0.2s;
}

.shared-location-card:last-child {
    margin-bottom: 0;
}

.shared-location-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.shared-location-header:hover {
    background: rgba(255,255,255,0.05);
}

.shared-location-icon {
    flex-shrink: 0;
    color: #f59e0b;
}

.shared-location-summary {
    flex: 1;
    min-width: 0;
}

.shared-location-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.shared-location-preview {
    font-size: 12px;
    color: #e5e7eb;
}

.shared-expand-btn {
    flex-shrink: 0;
    padding: 6px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.shared-expand-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #f59e0b;
}

.shared-expand-chevron {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.shared-location-card--expanded .shared-expand-chevron {
    transform: rotate(90deg);
}

.shared-location-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.15);
}

.shared-location-card--expanded .shared-location-body {
    max-height: 500px;
    transition: max-height 0.4s ease-in;
}

.shared-location-details {
    padding: 16px;
}

.shared-location-description {
    color: #e5e7eb;
    font-size: 14px;
    margin: 0 0 12px 0;
    line-height: 1.5;
}
/* Shared badge in community shared locations */
.shared-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f59e0b;
    border-radius: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* .shared-badge and .imported-badge consolidated into .site-badge in site-card styles */

.shared-location-meta {
    font-size: 12px;
    color: #d1d5db;
    margin: 0;
}

.shared-location-actions {
    padding: 0 16px 16px 16px;
}

.use-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #10b981;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.use-location-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.shared-location-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

/* Shared location info styling */
.location-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.location-coords,
.location-details {
    color: #e5e7eb;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.save-btn,
.detect-location-btn,
.add-note-btn,
.add-equipment-btn,
.add-point-btn,
.upload-logo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover,
.detect-location-btn:hover,
.add-note-btn:hover,
.add-equipment-btn:hover,
.add-point-btn:hover,
.upload-logo-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.detect-location-btn {
    background: #10b981;
    margin-right: 12px;
}

.detect-location-btn:hover {
    background: #059669;
}

.add-note-btn,
.add-equipment-btn,
.add-point-btn {
    background: #6b7280;
    margin-bottom: 20px;
}

.add-note-btn:hover,
.add-equipment-btn:hover,
.add-point-btn:hover {
    background: #4b5563;
}

/* ============================================================================
   NOTES
   ============================================================================ */

.notes-list {
    max-width: 800px;
}

.note-item {
    background: #0f0f14;
    border: 2px solid #374151;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.note-item:hover {
    border-color: #4b5563;
}

.note-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.note-title {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid #374151;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 0;
}

.note-title:focus {
    outline: none;
    border-bottom-color: #60a5fa;
}

.note-content {
    width: 100%;
    min-height: 80px;
    background: rgba(15, 15, 20, 0.5);
    border: none;
    color: #e5e7eb;
    font-size: 14px;
    resize: vertical;
    padding: 0;
}

.note-content:focus {
    background: rgba(15, 15, 20, 0.9);  /* More opaque */
    color: #ffffff;                      /* Bright white */
    outline: none;
}

.note-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 12px;
}

.delete-note-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    transition: color 0.2s;
}

.delete-note-btn:hover {
    color: #dc2626;
}

.note-source-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    margin-right: 8px;
}

.note-source-badge.ucd {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}
/* ============================================================================
   HIERARCHICAL NOTES STRUCTURE
   ============================================================================ */

.no-notes {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 16px;
    font-style: italic;
}

/* Year Level */
.note-year {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.note-year-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
    user-select: none;
}

.note-year-header:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

.note-year-content {
    background: rgba(15, 23, 42, 0.3);
    padding: 12px;
}

/* Month Level */
.note-month {
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.note-month-header {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
    user-select: none;
}

.note-month-header:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.note-month-content {
    background: rgba(15, 23, 42, 0.2);
    padding: 10px;
}

/* Day Level */
.note-day {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.note-day-header {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
    user-select: none;
}

.note-day-header:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
}

.note-day-content {
    background: rgba(15, 23, 42, 0.1);
    padding: 8px;
}

/* Toggle Icons */
.toggle-icon {
    font-size: 14px;
    color: #ffffff;
    min-width: 16px;
    transition: transform 0.2s ease;
}

/* Labels and Counts */
.year-label,
.month-label,
.day-label {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    flex: 1;
}

.note-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
}

/* Individual Note Item */
.note-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(96, 165, 250, 0.4);
}

.note-item.expanded {
    background: rgba(30, 58, 138, 0.2);
    border-color: #60a5fa;
}

/* Note Title Bar */
.note-title-bar {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.note-icon {
    font-size: 16px;
}

.note-title-text {
    flex: 1;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.note-source-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Expanded Note Content */
.note-expanded-content {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.4);
}

.note-edit-form {
    padding: 16px;
}

.note-title-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Fix text visibility when typing in notes */
.note-title-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    padding: 10px 12px;
    color: #000000 !important;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.note-title-input:focus {
    outline: none;
    border-color: #60a5fa !important;
    background: rgba(30, 58, 138, 0.9) !important;  /* Much darker for better contrast */
    color: #ffffff !important;
}

.note-content-input {
    width: 100%;
    min-height: 120px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    padding: 10px 12px;
    color: #ffffff !important;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.note-content-input:focus {
    outline: none;
    border-color: #60a5fa !important;
    background: rgba(15, 23, 42, 0.95) !important;  /* Nearly opaque for maximum contrast */
    color: #ffffff !important;
}

/* Ensure placeholder text is visible too */
.note-title-input::placeholder,
.note-content-input::placeholder {
    color: #9ca3af !important;
    opacity: 0.8;
}
.note-meta-info {
    margin: 12px 0;
    padding: 8px 12px;
    background: rgba(96, 165, 250, 0.1);
    border-left: 3px solid #60a5fa;
    border-radius: 4px;
}

.note-date {
    color: #93c5fd;
    font-size: 13px;
}

.note-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
/* Save Status Indicators */
.note-save-status {
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
    margin-right: 8px;
}

.status-unsaved {
    color: #f59e0b;
}

.status-saving {
    color: #60a5fa;
}

.status-saved {
    color: #10b981;
}

.status-error {
    color: #ef4444;
}

/* Update note-title-bar to use flexbox for positioning */
.note-title-bar {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.note-title-text {
    flex: 1;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}
.btn-save-note,
.btn-delete-note,
.btn-close-note {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-note {
    background: #10b981;
    color: white;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.btn-save-note:hover:not(:disabled) {
    background: #059669;
}

.btn-save-note:disabled {
    cursor: default;
}

/* Saving… — blue pulse */
.btn-save-note--saving {
    background: #2563eb !important;
    opacity: 0.85;
}

/* ✓ Saved — bright green confirmation */
.btn-save-note--saved {
    background: #059669 !important;
    opacity: 1;
}

/* ✗ Error — red */
.btn-save-note--error {
    background: #dc2626 !important;
}

.btn-delete-note {
    background: #ef4444;
    color: white;
}

.btn-delete-note:hover {
    background: #dc2626;
}

.btn-close-note {
    background: #6b7280;
    color: white;
}

.btn-close-note:hover {
    background: #4b5563;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .note-year-header,
    .note-month-header,
    .note-day-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .year-label,
    .month-label,
    .day-label {
        font-size: 14px;
    }
    
    .note-count {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .note-title-bar {
        padding: 10px 12px;
    }
    
    .note-title-text {
        font-size: 13px;
    }
    
    .note-edit-form {
        padding: 12px;
    }
    
    .note-actions {
        flex-direction: column;
    }
    
    .btn-save-note,
    .btn-delete-note,
    .btn-close-note {
        width: 100%;
    }
}
/* ============================================================================
   EQUIPMENT
   ============================================================================ */

.equipment-list {
    max-width: 900px;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #1e3a8a;  /* Blue background like AG card */
    border-radius: 8px;
    border-left: 4px solid #60a5fa;  /* Blue left accent */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    transition: all 0.2s;
}

.equipment-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.equipment-icon {
    font-size: 32px;
    color: #60a5fa;
}

.equipment-info {
    flex: 1;
}

.equipment-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;  /* Match blue card text color */
    margin: 0 0 4px 0;
}

.equipment-details {
    font-size: 14px;
    color: #e5e7eb;  /* Match blue card text color */
    margin: 0 0 4px 0;
}

.equipment-specs {
    font-size: 12px;
    color: #d1d5db;  /* Slightly dimmer for secondary info */
    margin: 0;
}

.equipment-specs strong {
    color: #60a5fa;  /* Blue accent for labels */
}

.delete-equipment-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    transition: color 0.2s;
}

.delete-equipment-btn:hover {
    color: #dc2626;
}

/* ============================================================================
   PHASE 1: MY GEAR TAB
   ============================================================================ */

/* -- Equipment tab header -- */
.equip-tab-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

/* -- One-time migration banner -- */
.equip-migrate-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 6px;
    color: #fcd34d;
    font-size: 13px;
    margin-bottom: 16px;
}

.equip-migrate-action-btn {
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 4px;
    color: #fcd34d;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.equip-migrate-action-btn:hover { background: rgba(245, 158, 11, 0.25); }

.equip-migrate-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.equip-migrate-dismiss-btn {
    margin-left: auto;
    padding: 2px 6px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 1;
}

.equip-migrate-dismiss-btn:hover { color: #e5e7eb; }

/* -- Initial loading state -- */
.equip-loading-state {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.equip-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #374151;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: equip-spin 0.7s linear infinite;
}

@keyframes equip-spin {
    to { transform: rotate(360deg); }
}

/* -- My Gear item card -- */
.user-equip-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #111827;
    border: 1px solid #1f2937;
    border-left: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 4px;
}

.user-equip-item:hover {
    background: #1a2234;
    border-color: #374151;
    border-left-color: #374151;
}
}

.user-equip-item.selected {
    background: #1a2234;
    border-color: #1f2937;
    border-left-color: #3b82f6;
}
.user-equip-item .equipment-icon { flex-shrink: 0; color: #60a5fa; }

.user-equip-item .equipment-info { flex: 1; min-width: 0; }

.user-equip-item .equipment-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-equip-item .equipment-specs { font-size: 12px; color: #6b7280; margin: 0; }

.user-equip-item .equipment-specs strong { color: #60a5fa; }

.user-equip-item .equipment-notes {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    margin: 2px 0 0;
}

/* -- My Gear delete button -- */
.delete-user-equipment-btn {
    flex-shrink: 0;
    padding: 6px;
    background: transparent;
    border: none;
    color: #4b5563;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    opacity: 0;
}

.user-equip-item:hover .delete-user-equipment-btn { opacity: 1; }

.delete-user-equipment-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* â”€â”€ Empty state â”€â”€ */
.equip-empty-state {
    color: #6b7280;
    font-size: 14px;
    padding: 24px 0;
    font-style: italic;
}

/* â”€â”€ Equipment item source badges â”€â”€ */
.equip-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 4px;
}

.equip-source-badge--catalog  { background: #1d4ed8; color: #93c5fd; }
.equip-source-badge--custom   { background: #065f46; color: #6ee7b7; }
.equip-source-badge--migrated { background: #374151; color: #9ca3af; }

/* â”€â”€ Equipment notes line â”€â”€ */
.equipment-notes {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    margin: 4px 0 0 0;
}

/* ============================================================================
   PHASE 2: RIGS TAB
   ============================================================================ */

/* -- Rigs tab header -- */
.rigs-tab-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.add-rig-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6b7280;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-rig-btn:hover { background: #4b5563; }

/* -- Rig card -- */
.rig-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #111827;
    border: 1px solid #1f2937;
    border-left: 3px solid transparent;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: border-color 0.15s, background 0.15s;
}

.rig-card:hover { background: #1a2234; border-color: #374151; border-left-color: #374151; }

.rig-card--archived { opacity: 0.5; }

.rig-card-icon { flex-shrink: 0; color: #6b7280; }

.rig-card-info { flex: 1; min-width: 0; }

.rig-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 2px;
}

.rig-card-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 2px;
}

.rig-card-count {
    font-size: 11px;
    color: #4b5563;
    margin: 0;
}

.rig-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.rig-edit-btn,
.rig-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid #374151;
    border-radius: 5px;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.rig-edit-btn:hover    { color: #60a5fa; border-color: #60a5fa; }
.rig-archive-btn:hover { color: #f59e0b; border-color: #f59e0b; }

/* -- Archived section heading -- */
.rig-archived-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 20px 0 10px;
}

/* -- Immutable badge (has images) -- */
.rig-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #f59e0b;
    vertical-align: middle;
    margin-left: 6px;
}

/* ============================================================================
   RIG MODAL
   ============================================================================ */

.rig-modal-content {
    max-width: 600px;
    padding: 32px;
}

.rig-modal-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 20px;
}

/* -- Gear checklist -- */
.rig-component-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #1f2937;
    border-radius: 6px;
    padding: 8px;
    background: #0d1117;
}

.rig-comp-group { margin-bottom: 12px; }
.rig-comp-group:last-child { margin-bottom: 0; }

.rig-comp-group-label {
    font-size: 10px;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 4px 6px 6px;
}

.rig-comp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s;
}

.rig-comp-item:hover { background: #1f2937; }

.rig-comp-check {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    flex-shrink: 0;
    cursor: pointer;
}

.rig-comp-name {
    font-size: 13px;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rig-comp-sub {
    font-size: 11px;
    color: #6b7280;
    font-style: normal;
}

/* -- No gear message -- */
.rig-no-gear-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    padding: 8px 0;
}

.rig-go-gear-link {
    color: #60a5fa;
    text-decoration: none;
}

.rig-go-gear-link:hover { text-decoration: underline; }

/* ============================================================================
   EQUIPMENT MODAL
   ============================================================================ */

.equip-modal-content {
    max-width: 780px;
    padding: 32px;
}

.equip-modal-content h2 {
    font-size: 24px;
    margin-bottom: 4px;
    text-align: left;
}

.equip-modal-site-label {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 20px 0;
}

/* â”€â”€ Modal inner tab bar â”€â”€ */
.equip-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #374151;
    margin-bottom: 20px;
}

.equip-modal-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-modal-tab:hover { color: #93c5fd; }

.equip-modal-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
    background: rgba(96,165,250,0.06);
}

.equip-modal-panel { display: none; }
.equip-modal-panel.active { display: block; }

/* â”€â”€ Catalog category filters â”€â”€ */
.equip-catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.equip-cat-filter {
    padding: 5px 14px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-cat-filter:hover { border-color: #60a5fa; color: #60a5fa; }

.equip-cat-filter.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

/* â”€â”€ Catalog loading â”€â”€ */
.equip-catalog-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
    padding: 20px 0;
}

/* â”€â”€ Catalog grid â”€â”€ */
.equip-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
}

.equip-catalog-grid::-webkit-scrollbar { width: 4px; }
.equip-catalog-grid::-webkit-scrollbar-track { background: #1f2937; border-radius: 2px; }
.equip-catalog-grid::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

.equip-catalog-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-catalog-card:hover {
    border-color: #3b82f6;
    background: #1e3a5f;
}

.equip-catalog-card.selected {
    border-color: #60a5fa;
    background: #1d4ed8;
}

.equip-catalog-card-icon {
    flex-shrink: 0;
    color: #60a5fa;
    margin-top: 2px;
}

.equip-catalog-card.selected .equip-catalog-card-icon { color: #fff; }

.equip-catalog-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
    margin-bottom: 2px;
    line-height: 1.3;
}

.equip-catalog-card-desc {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.equip-catalog-card.selected .equip-catalog-card-desc { color: #bfdbfe; }

.equip-catalog-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.equip-catalog-card-specs span {
    font-size: 10px;
    color: #6b7280;
    background: rgba(0,0,0,0.3);
    padding: 1px 5px;
    border-radius: 3px;
}

.equip-catalog-card.selected .equip-catalog-card-specs span {
    background: rgba(0,0,0,0.25);
    color: #bfdbfe;
}

/* â”€â”€ Modal footer â”€â”€ */
.equip-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #374151;
    gap: 12px;
}

.equip-selection-label {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    flex: 1;
}

.equip-add-confirm-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: #1d4ed8;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.equip-add-confirm-btn:hover:not(:disabled) { background: #2563eb; }

.equip-add-confirm-btn:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
}

/* â”€â”€ Custom form â”€â”€ */
.equip-custom-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 4px;
}


/* ============================================================================
   HORIZON PROFILE
   ============================================================================ */

.horizon-profile-editor {
    max-width: 800px;
    margin-top: 30px;
}

.horizon-profile-editor h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.horizon-visual {
    margin: 20px 0;
}

#horizon-canvas {
    width: 100%;
    max-width: 600px;
    border: 2px solid #374151;
    border-radius: 8px;
    display: block;
}

.horizon-points-list h4 {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 12px 0;
}

.horizon-point {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.horizon-point input {
    flex: 1;
}

.delete-point-btn {
    padding: 8px 12px;
    background: transparent;
    border: 2px solid #374151;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-point-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ============================================================================
   BRANDING
   ============================================================================ */

.logo-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logo-preview {
    width: 200px;
    height: 200px;
    background: #0f0f14;
    border: 2px dashed #374151;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.logo-placeholder {
    color: #6b7280;
    font-size: 14px;
}

.color-picker-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

#brand-color {
    width: 80px;
    height: 50px;
    border: 2px solid #374151;
    border-radius: 8px;
    cursor: pointer;
}

#brand-color-text {
    flex: 1;
    max-width: 200px;
}

/* ============================================================================
   BUY ME A COFFEE
   ============================================================================ */

.buymeacoffee-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid #60a5fa;
}

.buymeacoffee-section h2 {
    color: #ffffff;
}

.buymeacoffee-section p {
    color: #d1d5db;
    margin-bottom: 20px;
}

.buymeacoffee-btn img {
    border-radius: 8px;
}

.premium-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #60a5fa;
}

.cta-icon {
    font-size: 48px;
    color: #fbbf24;
}

.cta-content {
    flex: 1;
}

.cta-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.cta-content p {
    color: #d1d5db;
    margin: 0 0 16px 0;
}

.buymeacoffee-btn-small {
    display: inline-block;
    padding: 10px 20px;
    background: #fbbf24;
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
}

.buymeacoffee-btn-small:hover {
    transform: scale(1.05);
}

/* ============================================================================
   UPGRADE OVERLAY
   ============================================================================ */

.upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.upgrade-message {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.lock-icon {
    font-size: 64px;
    color: #f59e0b;
    margin-bottom: 20px;
}

.upgrade-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.upgrade-message p {
    color: #9ca3af;
    font-size: 14px;
    margin: 0 0 24px 0;
}

.upgrade-overlay-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.upgrade-overlay-btn:hover {
    transform: translateY(-2px);
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #1a1a1f;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 40px;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Location Modal Specific Styles */
.location-modal-content {
    max-width: 600px;
}

.location-modal-content .modal-header h2 {
    font-size: 24px;
    text-align: left;
    margin-bottom: 20px;
}

.location-modal-content .modal-body {
    margin-bottom: 20px;
}

.location-modal-content .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.cancel-location-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-location-btn:hover {
    background: #374151;
    color: #ffffff;
}

.save-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-location-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================================================
   PRICING TIERS
   ============================================================================ */

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.pricing-tier {
    background: #0f0f14;
    border: 2px solid #374151;
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
}

.pricing-tier:hover {
    border-color: #60a5fa;
    transform: translateY(-4px);
}

.pricing-tier.featured {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.pricing-tier.highlighted {
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.tier-badge {
    position: absolute;
    top: -12px;
    right: 30px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.tier-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.tier-price {
    margin-bottom: 24px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    color: #60a5fa;
}

.price-period {
    font-size: 18px;
    color: #9ca3af;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #374151;
    color: #e5e7eb;
    font-size: 14px;
}

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

.tier-select-btn {
    width: 100%;
    padding: 14px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-select-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.pricing-tier.featured .tier-select-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.modal-footer p {
    color: #9ca3af;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.support-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 14px;
}

.support-link:hover {
    text-decoration: underline;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #1a1a1f;
    border: 2px solid #374151;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    flex: 1;
    color: #e5e7eb;
    font-size: 14px;
}

.toast-success {
    border-color: #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-info {
    border-color: #60a5fa;
}

.toast-info .toast-icon {
    color: #60a5fa;
}

.toast-warning {
    border-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pricing-tiers {
        grid-template-columns: 1fr;
    }
    
    .premium-cta {
        flex-direction: column;
        text-align: center;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
}
/* ============================================================================
   EQUIPMENT PHOTO DROP ZONE (custom equipment modal)
   ============================================================================ */

.equip-photo-drop-zone {
    border: 2px dashed #374151;
    border-radius: 10px;
    background: #111827;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    cursor: pointer;
}

.equip-photo-drop-zone--dragover {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.06);
}

.equip-photo-drop-zone--has-file {
    border-color: #10b981;
    border-style: solid;
}

.equip-photo-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

.equip-photo-prompt svg { opacity: 0.5; }

.equip-photo-browse-btn {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.equip-photo-browse-btn:hover { color: #93c5fd; }

.equip-photo-prompt small { color: #4b5563; font-size: 11px; }

.equip-photo-preview {
    position: relative;
}

.equip-photo-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.equip-photo-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    border: none;
    border-radius: 50%;
    color: #f9fafb;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.equip-photo-remove-btn:hover { background: rgba(239,68,68,0.85); }

/* ============================================================================
   EQUIPMENT DETAIL DRAWER
   ============================================================================ */

.equip-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.equip-drawer-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 420px;
    max-width: 95vw;
    background: #111827;
    border-left: 1px solid #1f2937;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}

.equip-drawer--open .equip-drawer-overlay {
    opacity: 1;
    pointer-events: all;
}

.equip-drawer--open .equip-drawer-panel {
    transform: translateX(0);
}

body.equip-drawer-body-lock { overflow: hidden; }

/* Header */
.equip-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
    background: #0f172a;
}

.equip-drawer-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.equip-drawer-category-badge {
    display: none;
    padding: 2px 8px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 4px;
    color: #60a5fa;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
}

.equip-drawer-category-badge:not(:empty) { display: inline-block; }

.equip-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: #f9fafb;
    margin: 0;
    line-height: 1.3;
}

.equip-drawer-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.equip-drawer-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #d1d5db;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.equip-drawer-close-label {
    line-height: 1;
}

.equip-drawer-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* Body */
.equip-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.equip-drawer-body::-webkit-scrollbar { width: 6px; }
.equip-drawer-body::-webkit-scrollbar-track { background: transparent; }
.equip-drawer-body::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }

/* Loading */
.equip-drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 0;
    color: #6b7280;
    font-size: 14px;
}

.equip-drawer-spinner {
    width: 28px; height: 28px;
    border: 3px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: equip-spin 0.7s linear infinite;
}

@keyframes equip-spin { to { transform: rotate(360deg); } }

/* Content */
.equip-drawer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Image wrap */
.equip-drawer-image-wrap {
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.equip-drawer-img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
}

.equip-drawer-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #9ca3af;
    opacity: 0.35;
}

/* Photo action bar */
.equip-drawer-photo-actions {
    background: rgba(0,0,0,0.55);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.equip-drawer-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59,130,246,0.2);
    border: 1px solid rgba(59,130,246,0.4);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-drawer-photo-btn:hover {
    background: rgba(59,130,246,0.35);
    color: #bfdbfe;
}

/* Upload progress bar */
.equip-drawer-photo-progress {
    flex: 1;
    height: 4px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.equip-drawer-photo-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    transition: width 0.15s linear;
    width: 0%;
}

/* Specs grid */
.equip-drawer-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.equip-drawer-spec-item {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equip-drawer-spec-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.equip-drawer-spec-value {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

/* Description */
.equip-drawer-description {
    background: #1f2937;
    border-left: 3px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.6;
}

.equip-drawer-description p { margin: 0; }

/* Notes */
.equip-drawer-notes {
    background: #1c2535;
    border: 1px dashed #374151;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

/* Site card accordion (compact) */
.site-equip-accordion {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(55,65,81,0.6);
    margin-bottom: 12px;
}

.site-equip-accordion .astroutah-accordion-header {
    padding: 8px 12px;
    font-size: 12px;
    background: rgba(17,24,39,0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(55,65,81,0.4);
}

.site-equip-accordion .astroutah-accordion-group.collapsed:last-child .astroutah-accordion-header {
    border-bottom: none;
}

.site-equip-accordion .astroutah-accordion-group:not(.collapsed) .astroutah-accordion-header {
    border-bottom: 1px solid rgba(55,65,81,0.4);
}

.site-equip-accordion .site-equip-group-items {
    background: rgba(15,22,35,0.6);
    padding: 4px 0;
}

/* Clickable item rows in site card */
.site-equip-accordion .site-equipment-item {
    cursor: pointer;
    transition: background 0.15s, padding-left 0.15s;
    border-left: 3px solid transparent;
    padding: 8px 10px;
}

.site-equip-accordion .site-equipment-item:hover {
    background: rgba(59,130,246,0.08);
    border-left-color: #3b82f6;
}

@media (max-width: 480px) {
    .equip-drawer-panel { width: 100vw; }
    .equip-drawer-specs-grid { grid-template-columns: 1fr; }
}
/* ============================================================================
   ACCOUNT TAB
   ============================================================================ */

/* Muted / read-only input (username) */
.account-field-readonly {
    opacity: 0.55;
    cursor: not-allowed !important;
    background: #0a0a0e !important;
    border-color: #2d2d3a !important;
}

.account-username-help {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
}

.account-username-help svg {
    flex-shrink: 0;
    color: #4b5563;
}

/* Divider between Profile / Account / Password sections */
.account-credentials-section {
    border-top: 1px solid #1f2937;
    padding-top: 36px;
}

/* ── Profile photo widget ─────────────────────────────────── */
.account-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding: 16px 0;
    border-bottom: 1px solid #1f2937;
}

.account-avatar-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1e3a5f;
    border: 2px solid #3b82f6;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: #93c5fd;
    letter-spacing: 1px;
    line-height: 1;
}

.account-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-avatar-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    background: #1e3a5f;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    color: #93c5fd;
    cursor: pointer;
    transition: background 0.15s;
}

.account-avatar-upload-label:hover {
    background: #1d4ed8;
    color: #fff;
}

.account-avatar-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    background: transparent;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.account-avatar-remove-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Save button for account tab */
.account-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 4px;
}

.account-save-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.account-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Password field + toggle button wrapper */
.account-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.account-pw-wrap input {
    flex: 1;
    width: 100%;
    padding: 12px 44px 12px 16px; /* room for the toggle btn */
    background: #0f0f14;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.account-pw-wrap input:focus {
    outline: none;
    border-color: #60a5fa;
    background: #19181f;
}

.account-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    transition: color 0.15s;
}

.account-toggle-pw:hover {
    color: #e5e7eb;
}

/* Password strength meter */
.account-pw-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-pw-strength-bar {
    flex: 1;
    height: 5px;
    background: #1f2937;
    border-radius: 99px;
    overflow: hidden;
}

.account-pw-strength-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.pw-strength-1 { background: #ef4444; }
.pw-strength-2 { background: #f97316; }
.pw-strength-3 { background: #eab308; }
.pw-strength-4 { background: #22c55e; }
.pw-strength-5 { background: #10b981; }

.account-pw-strength-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 58px;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 600px) {
    .account-credentials-section {
        padding-top: 28px;
    }
}
/* ============================================================================
   SHARED LOCATION CARDS — HORIZON / EQUIPMENT SUMMARY + TWO-BUTTON ACTIONS
   ============================================================================ */

.shared-loc-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #1f2937;
}

.shared-loc-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #93c5fd;
}

.shared-loc-meta-row svg { flex-shrink: 0; }

.shared-loc-meta-row--none {
    color: #4b5563;
}

.shared-location-actions--two {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.shared-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.shared-action-btn--adopt {
    background: #1e3a5f;
    color: #93c5fd;
    border: 1px solid #2563eb;
}
.shared-action-btn--adopt:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.shared-action-btn--clone {
    background: #10b981;
    color: #ffffff;
    border: none;
}
.shared-action-btn--clone:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.shared-action-legend {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 10px;
    font-size: 11px;
    color: #4b5563;
    line-height: 1.5;
}

/* ============================================================================
   READ-ONLY HORIZON TAB FOR ADOPTED LOCATIONS
   ============================================================================ */

.site-tab-readonly--info {
    margin-bottom: 12px;
}

.site-horizon-editor--readonly {
    pointer-events: none;
    opacity: 0.85;
}

.site-horizon-ro-points {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.site-horizon-point--readonly {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #1a1a2e;
    border: 1px solid #1e3a5f;
    border-radius: 6px;
    padding: 4px 10px;
}

.site-horizon-ro-label {
    color: #60a5fa;
    font-family: monospace;
    font-size: 12px;
}

/* ============================================================================
   ADOPTED LOCATION — EQUIPMENT TAB CLONE PROMPT
   ============================================================================ */

.site-tab-readonly--clone-prompt {
    margin-bottom: 14px;
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.site-tab-readonly--clone-prompt svg {
    color: #10b981;
}

/* ============================================================================
   SETTINGS HEADER — TITLE + INFO ICON
   ============================================================================ */

.settings-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.onboarding-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid #4b5563;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.onboarding-info-btn svg {
    width: 18px;
    height: 18px;
}

.onboarding-info-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

/* ============================================================================
   ONBOARDING MODAL
   ============================================================================ */

.onboarding-modal .modal-content,
.onboarding-modal-content {
    max-width: 640px;
    padding: 40px;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 36px;
}

.onboarding-star-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 16px;
    color: #fbbf24;
}

.onboarding-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.onboarding-subtitle {
    color: #9ca3af;
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

/* Steps */
.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
}

.onboarding-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #374151;
    background: #111118;
    transition: border-color 0.2s ease;
}

.onboarding-step:hover {
    border-color: #4b5563;
}

.onboarding-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
}

.onboarding-icon-location  { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.onboarding-icon-equipment { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.onboarding-icon-dashboard { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.onboarding-icon-gallery   { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

.onboarding-step-body {
    flex: 1;
    min-width: 0;
}

.onboarding-step-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.onboarding-step-body p {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.55;
    margin: 0 0 12px 0;
}

.onboarding-action-btn {
    display: inline-block;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid #4b5563;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.onboarding-action-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

/* Footer */
.onboarding-footer {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 24px;
}

.onboarding-dismiss-btn {
    padding: 12px 32px;
    background: #10b981;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 14px;
}

.onboarding-dismiss-btn:hover {
    background: #059669;
}

.onboarding-reopen-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.onboarding-reopen-hint svg {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
    .onboarding-modal-content {
        padding: 24px;
    }

    .onboarding-step {
        flex-direction: column;
        gap: 14px;
    }

    .onboarding-step-icon {
        width: 44px;
        height: 44px;
    }
}


/* ============================================================================
   DANGER ZONE
   ============================================================================ */

.danger-zone-section {
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    background: rgba(239, 68, 68, 0.04) !important;
    padding: 28px 32px !important;
    border-radius: 12px;
}

.danger-zone-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ef4444 !important;
    font-size: 18px;
    margin: 0 0 12px 0 !important;
}

.danger-zone-heading svg {
    color: #ef4444;
    flex-shrink: 0;
}

.danger-zone-description {
    color: #9ca3af;
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.delete-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-account-btn:hover {
    background: rgba(239, 68, 68, 0.12);
}

/* ============================================================================
   DELETE ACCOUNT MODAL
   ============================================================================ */

.delete-account-modal-content {
    max-width: 480px;
}

.delete-account-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.delete-account-warning-icon {
    font-size: 44px;
    color: #ef4444;
    margin-bottom: 14px;
    line-height: 1;
}

.delete-account-modal-header h2 {
    font-size: 22px !important;
    margin: 0 0 12px !important;
    color: #ffffff;
}

.delete-account-modal-header p {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.delete-account-confirm-field {
    margin-bottom: 28px;
}

.delete-account-confirm-field label {
    display: block;
    font-size: 14px;
    color: #e5e7eb;
    margin-bottom: 10px;
    line-height: 1.5;
}

.delete-confirm-input {
    width: 100%;
    padding: 11px 14px;
    background: #0f0f14;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.delete-confirm-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.delete-account-error {
    margin: 8px 0 0;
    color: #ef4444;
    font-size: 13px;
}

.delete-account-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.delete-account-cancel-btn {
    padding: 11px 22px;
    background: transparent;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-account-cancel-btn:hover {
    border-color: #9ca3af;
    color: #e5e7eb;
}

.delete-account-confirm-btn {
    padding: 11px 22px;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.delete-account-confirm-btn:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
}

.delete-account-confirm-btn:not(:disabled):hover {
    background: #dc2626;
}
/* ============================================================================
   LEGAL FOOTER — settings page context override
   ============================================================================ */

.astroutah-settings-container .au-legal-footer {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid #1f2937;
    color: #6b7280;
}

.astroutah-settings-container .au-legal-footer a {
    color: #6b7280;
}

.astroutah-settings-container .au-legal-footer a:hover {
    color: #f59e0b;
}
