/* ==========================================
   GLOBAL VARIABLES, RESET & PAGE LAYOUT
   ========================================== */
:root {
  --navy-primary: #0f2b48;
  --navy-dark: #081b30;
  --navy-light: #1b4168;
  --gold-accent: #e5a823;
  --red-accent: #e63946;
  --green-accent: #10b981;
  --bg-grid-color: rgba(15, 43, 72, 0.06);
  --bg-page: #f2f4f8;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-light: #d1d5db;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-main: 12px;
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-page);
  background-image: 
    linear-gradient(to right, var(--bg-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-grid-color) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-main);
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

.app-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* FIX: LOCKED GRID COLUMN WIDTH PREVENTS BANNER SHRINKING */
.app-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
}

.main-content-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.section-banner {
  background: var(--navy-primary);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: var(--radius-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 14px rgba(15, 43, 72, 0.2);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.section-banner h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.subsection-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-top: 20px;
  margin-bottom: 12px;
  display: block;
}

.tab-view {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 90px;
  width: 100%;
  box-sizing: border-box;
}

.tab-view::-webkit-scrollbar { width: 6px; }
.tab-view::-webkit-scrollbar-track { background: rgba(15, 43, 72, 0.05); border-radius: 4px; }
.tab-view::-webkit-scrollbar-thumb { background: var(--navy-primary); border-radius: 4px; }

.btn-primary {
  background: var(--navy-primary);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary.full-width { width: 100%; }

.btn-secondary {
  background: #f3f4f6;
  color: var(--navy-primary);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-sm { padding: 6px 10px; font-size: 0.75rem; }
.error-msg { color: var(--red-accent); font-size: 0.8rem; margin-bottom: 12px; font-weight: 600; }
.hidden { display: none !important; }