/* --------------------------------------------------
   PREMIUM CUSTOMER PORTAL STYLESHEET
   Theme: Official Alpha Group Corporate Theme (Light)
   Inspired by: https://www.alpha-group.eu/
-------------------------------------------------- */

:root {
    --bg-main: #f9fafb;       /* Light neutral gray background */
    --bg-card: #ffffff;       /* Pure white for cards and containers */
    --bg-hover: #f3f4f6;      /* Hover background */
    --border-color: #e5e7eb;  /* Fine clean gray borders */
    
    --primary: #448C8A;       /* Corporate Teal */
    --primary-hover: #377170;  /* Darker Teal */
    --primary-glow: rgba(68, 140, 138, 0.08);
    
    --secondary: #2C5386;     /* Corporate Steel Blue */
    --secondary-hover: #1e3a60;
    
    --accent-red: #932949;    /* Crimson Red (AS/Logo accent) */
    --accent-purple: #522B7E; /* Purple accent */
    --accent-dark: #282562;   /* Dark Indigo */
    
    --text-main: #1f2937;     /* Charcoal/dark gray text for readability */
    --text-muted: #6b7280;    /* Muted gray text */
    --text-light: #ffffff;    /* Light text for sidebar/dark blocks */
    
    --success: #10b981;       /* Emerald */
    --warning: #f59e0b;       /* Amber */
    --info: #3b82f6;          /* Blue */
    
    --font-sans: 'Inter', sans-serif;
    --radius-sm: 0px;         /* Square corners - Corporate identity */
    --radius-md: 0px;
    --radius-lg: 0px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    
    --transition: all 0.2s ease-in-out;
}

/* --------------------------------------------------
   BASE & RESET
   -------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Helper Utilities */
.hidden {
    display: none;
}

.modal-wrapper.hidden,
.login-wrapper.hidden,
.selection-wrapper.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* --------------------------------------------------
   LOGIN SCREEN
   -------------------------------------------------- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 100% 100%, rgba(44, 83, 134, 0.04) 0%, transparent 60%),
                      radial-gradient(circle at 0% 0%, rgba(68, 140, 138, 0.04) 0%, transparent 60%);
    padding: 20px;
    animation: fadeIn 0.5s var(--transition);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-icon-wrapper input, .form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    padding-left: 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input, .form-group select {
    padding-left: 16px;
}

.input-icon-wrapper input {
    padding-left: 44px !important;
}

.input-icon-wrapper input:focus, .form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-icon-wrapper input:focus + i {
    color: var(--primary);
}

.btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(1px);
}

.error-msg {
    color: var(--accent-red);
    background-color: rgba(147, 41, 73, 0.05);
    border: 1px solid rgba(147, 41, 73, 0.15);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
}

#login-error {
    display: none;
}

.info-msg {
    color: var(--primary);
    background-color: rgba(68, 140, 138, 0.05);
    border: 1px solid rgba(68, 140, 138, 0.15);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
}

#admin-form-message {
    display: none;
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --------------------------------------------------
   APP LAYOUT & SIDEBAR
   -------------------------------------------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    animation: fadeIn 0.4s var(--transition);
}

#app-container {
    display: none;
}

/* Sidebar (Solid Corporate Steel Blue) */
.sidebar {
    width: 280px;
    background-color: var(--secondary);
    border-right: none;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    color: var(--text-light);
    animation: slideIn 0.3s var(--transition);
}

.sidebar-brand {
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand i {
    font-size: 1.75rem;
    color: var(--text-light);
}

.brand-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-text span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.menu-item:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
    color: var(--text-light);
    background-color: var(--primary);
}

.menu-item.admin-only {
    display: none;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.15);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile i {
    font-size: 2.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.user-details small {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--text-light);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.content-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.header-actions span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.page-container {
    padding: 40px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.tab-page {
    display: none;
    animation: fadeIn 0.4s var(--transition);
}

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

/* --------------------------------------------------
   COMPONENTS: CARDS, TABLES, BUTTONS
   -------------------------------------------------- */

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
}

.kpi-icon.blue { background-color: rgba(44, 83, 134, 0.06); color: var(--secondary); }
.kpi-icon.orange { background-color: rgba(245, 158, 11, 0.06); color: var(--warning); }
.kpi-icon.green { background-color: rgba(16, 185, 129, 0.06); color: var(--success); }
.kpi-icon.purple { background-color: rgba(68, 140, 138, 0.06); color: var(--primary); }

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Widgets */
.dashboard-widgets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.widget-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.widget-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.widget-body {
    padding: 24px;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-text-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table th {
    padding: 16px 24px;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-main);
}

.table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.text-center {
    text-align: center;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

.table-small th, .table-small td {
    padding: 12px 18px;
    font-size: 0.85rem;
}

/* Badges / Status (Flat rectangular style) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge i {
    font-size: 0.45rem;
}

.badge.done {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.badge.progress {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.badge.planned {
    background-color: rgba(68, 140, 138, 0.08);
    border-color: rgba(68, 140, 138, 0.2);
    color: #234847;
}

/* Action buttons */
.btn-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-action:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-glow);
}

.btn-action:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* --------------------------------------------------
   FILTERS & CONTROLS
   -------------------------------------------------- */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 250px;
}

.search-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    padding: 11px 16px;
    padding-left: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-select-group select {
    padding: 11px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select-group select:focus {
    border-color: var(--primary);
}

/* Clickable site rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.clickable-row:hover {
    background-color: rgba(68, 140, 138, 0.06);
    box-shadow: inset 3px 0 0 var(--primary);
}

/* Intervention count badge in sites table */
.badge-count {
    display: inline-block;
    min-width: 28px;
    padding: 2px 8px;
    background-color: var(--secondary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    border-radius: var(--radius-sm);
}

/* Site filter banner above interventions table */
.site-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    margin-bottom: 16px;
    background-color: rgba(68, 140, 138, 0.08);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
}

.site-filter-banner.hidden {
    display: none;
}

.site-filter-banner i.fa-location-dot {
    color: var(--primary);
    margin-right: 6px;
}

.btn-clear-filter {
    background: none;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-filter:hover {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* --------------------------------------------------
   ADMIN PAGE LAYOUT
   -------------------------------------------------- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification (Square flat styling) */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
    z-index: 1000;
    font-weight: 600;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.3s var(--transition);
}

/* Modals */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    animation: fadeIn 0.25s var(--transition);
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--text-muted);
}

/* --------------------------------------------------
   ALPHA GROUP MULTI-STRUCTURE SELECTION SCREEN
   -------------------------------------------------- */
.selection-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 100% 100%, rgba(44, 83, 134, 0.05) 0%, transparent 60%),
                      radial-gradient(circle at 0% 0%, rgba(68, 140, 138, 0.05) 0%, transparent 60%);
    padding: 20px;
    animation: fadeIn 0.5s var(--transition);
}

.selection-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.selection-logo {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo-glowing {
    width: 64px;
    height: 64px;
    background-color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.brand-logo-glowing-sm {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 800;
    margin: 0 auto 12px auto;
}

.brand-logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 24px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.brand-logo-img-sm {
    max-width: 140px;
    height: auto;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.brand-logo-img-sidebar {
    height: 28px;
    width: auto;
    display: block;
    margin-right: 4px;
}

.selection-logo h2 {
    font-size: 1.85rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--secondary);
}

.selection-logo p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.structure-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.structure-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.structure-btn[data-structure="AS"]:hover {
    border-color: var(--accent-red);
    background-color: rgba(147, 41, 73, 0.03);
}

.structure-btn[data-structure="MAE"]:hover {
    border-color: var(--primary);
    background-color: rgba(68, 140, 138, 0.03);
}

.structure-btn[data-structure="SAE"]:hover {
    border-color: var(--secondary);
    background-color: rgba(44, 83, 134, 0.03);
}

.structure-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.struct-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.struct-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.structure-btn[data-structure="AS"] .struct-title { color: var(--accent-red); }
.structure-btn[data-structure="MAE"] .struct-title { color: var(--primary); }
.structure-btn[data-structure="SAE"] .struct-title { color: var(--secondary); }

.struct-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.structure-btn .arrow-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.structure-btn:hover .arrow-icon {
    transform: translateX(4px);
}

.structure-btn[data-structure="AS"]:hover .arrow-icon { color: var(--accent-red); }
.structure-btn[data-structure="MAE"]:hover .arrow-icon { color: var(--primary); }
.structure-btn[data-structure="SAE"]:hover .arrow-icon { color: var(--secondary); }

.login-footer-actions {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-text-link:hover {
    color: var(--primary);
}

.structure-badge-text {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------
   RESPONSIVENESS
   -------------------------------------------------- */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    
    .content-header {
        padding: 20px;
    }
    
    .page-container {
        padding: 20px;
    }
}

/* Logs Viewer Styling */
.logs-viewer {
    background-color: #0f172a; /* Slate 900 */
    color: #e2e8f0; /* Slate 200 */
    padding: 20px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow: auto;
    max-height: 500px;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* Spinner Animation for 2FA */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-2fa {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Checkbox group inline styling */
.checkbox-group-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
}
.checkbox-group-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.checkbox-group-inline label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Intervention request form styling */
.intervention-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 25px;
}
.intervention-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}
.intervention-card select,
.intervention-card textarea {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
}
.intervention-card textarea {
    font-family: inherit;
    resize: vertical;
}
.intervention-card .btn-primary {
    margin-top: 20px;
    width: 100%;
}
.intervention-card .success-container {
    padding: 40px 20px;
}
.intervention-card .success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}
.intervention-card .success-title {
    color: var(--primary);
    margin-bottom: 15px;
}
.intervention-card .success-desc {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}
.intervention-card .btn-secondary {
    width: 100%;
}

/* 2FA modal card styling */
.modal-card-2fa {
    text-align: center;
    max-width: 450px;
    padding: 30px;
}
.modal-card-2fa .icon-2fa {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}
.modal-card-2fa h3 {
    margin-bottom: 15px;
}
.modal-card-2fa p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
.modal-card-2fa .spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.modal-card-2fa .btn-cancel {
    margin-top: 25px;
    width: 100%;
}


