/**
 * ============================================================================
 * STANDARD HEADER STYLES - OPTION 2: BUILDING-FIRST
 * ============================================================================
 * 
 * Visual Hierarchy:
 *   LARGE:  Atlantis East (building is primary - 28px)
 *   MEDIUM: Manager Services (current page - 20px)
 *   SMALL:  🏢 Strata Help Desk (subtle branding - 13px)
 * 
 * User Info: 2-line layout for better readability
 * ============================================================================
 */

/* ================================================================
   STANDARD HEADER - THEME-AWARE
   ================================================================ */

.standard-header {
    background: linear-gradient(135deg, 
        var(--header-bg-start, #2c3e50) 0%, 
        var(--header-bg-end, #34495e) 100%);
    color: var(--header-text, white);
    padding: 20px 24px;
    box-shadow: var(--header-shadow, 0 2px 8px rgba(0, 0, 0, 0.15));
    position: relative;
    top: 0;
    z-index: 100;
    border: 1px solid var(--header-bg-start, rgba(44, 62, 80, 0.3));
    border-radius: 20px;
    max-width: 1300px;
    margin: 0 auto 20px auto;
}

/* Three-column layout */
.header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

/* ================================================================
   LEFT SECTION - BRANDING SUBTLE
   ================================================================ */

.standard-header .header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* TERTIARY: App Name - Balanced weight with building */
.standard-header .app-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--header-text, white);
    line-height: 1.2;
    letter-spacing: 0.8px;
    text-transform: none;
}

/* Back button below */
.header-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--back-btn-bg, rgba(255, 255, 255, 0.15));
    border: 1px solid var(--back-btn-border, rgba(255, 255, 255, 0.3));
    border-radius: 8px;
    color: var(--header-text, white);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-back-btn:hover {
    background: var(--back-btn-hover, rgba(255, 255, 255, 0.25));
    transform: translateX(-2px);
}

/* ================================================================
   CENTER SECTION - BUILDING PRIMARY, Page Secondary
   ================================================================ */

.header-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* PRIMARY: Building name - LARGEST */
.header-building-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--header-text, white);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
}

/* SECONDARY: Page title - Medium */
.header-page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--header-text-secondary, rgba(255, 255, 255, 0.9));
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

/* ================================================================
   RIGHT SECTION - User Info & Actions (2-LINE LAYOUT)
   ================================================================ */

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* User Information - 2 line vertical layout */
.header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 14px;
}

/* Line 1: Name and Lot */
.header-user-info .user-name,
.header-user-info .user-lot {
    display: inline;
    font-weight: 600;
    color: var(--header-text, white);
}

.header-user-info .user-lot {
    margin-left: 6px;
    font-weight: 500;
    color: var(--header-text-secondary, rgba(255, 255, 255, 0.85));
}

/* Line 2: Role badge */
.header-user-info .user-role {
    background: var(--role-badge-bg, rgba(255, 255, 255, 0.25));
    color: var(--header-text, white);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--role-badge-border, rgba(255, 255, 255, 0.4));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action Buttons */
.header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

/* Switch Role Button - Blue */
.header-btn-switch-role {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.header-btn-switch-role:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* Logout Button - RED */
.header-btn-logout {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.header-btn-logout:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Switch role button is hidden by default */
#headerSwitchRoleBtn {
    display: none;
}
/**
 * ============================================================================
 * STANDARD HEADER - UNIVERSAL SCREEN PATTERN
 * ============================================================================
 * 
 * ADD THIS TO: public/css/standard-header.css
 * LOCATION: After existing header styles, before responsive section
 * 
 * Purpose:
 *   Provides consistent alignment pattern for any screen using standard header.
 *   Ensures header and content widths match (1200px centered).
 * 
 * Usage:
 *   Add class "standard-header-screen" to your screen's outer container.
 *   Add class "screen-content-card" to your content wrapper.
 * 
 * Example HTML Structure:
 *   <div class="my-screen-container standard-header-screen">
 *       <header class="standard-header">...</header>
 *       <div class="my-content screen-content-card">
 *           <!-- Your content here -->
 *       </div>
 *   </div>
 * 
 * ============================================================================
 */

/* ================================================================
   UNIVERSAL SCREEN PATTERN - Full viewport with centered content
   ================================================================ */

/* Outer container - Full viewport, no max-width */
.standard-header-screen {
    min-height: 100vh;
    background: transparent;
}

/* Header alignment - 1200px centered */
.standard-header-screen .standard-header {
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
}

/* Content card - 1200px centered, white background */
.screen-content-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Ensure header actions stack vertically */
.standard-header-screen .header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .screen-content-card {
        padding: 1rem;
        margin: 0 1rem;
        border-radius: 12px;
    }
    
    .standard-header-screen .standard-header {
        margin: 0 1rem 1rem 1rem;
    }
}

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

@media (max-width: 1024px) {
    .header-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .standard-header .header-left {
        align-items: center;
    }
    
    .header-center {
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .header-user-info {
        align-items: center;
    }
    
    .header-actions {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .standard-header {
        padding: 16px;
    }
    
    .header-building-name {
        font-size: 22px;
    }
    
    .header-page-title {
        font-size: 16px;
    }
    
    .standard-header .app-name {
        font-size: 11px;
    }
}
