/* =====================================================
   GLOBAL.CSS - Basis-Layout für ALLE Seiten
   ===================================================== */

/* Inter Font - Lokal gehostet */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Inter-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-700.woff2') format('woff2');
}

* { box-sizing: border-box; }

:root {
  /* Standard-Höhen (können per Rolle überschrieben werden) */
  --header-h: 50px;
  --footer-h: 50px;
  
  /* NOAF Farben */
  --color-primary: #fbe703;
  --color-bg: #000;
  --color-text: #fff;
  --color-border: #333;
  --color-muted: #666;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4;
}

/* =====================================================
   HEADER - Fixed oben
   ===================================================== */

   header {
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-h);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  box-sizing: border-box;
}

header .app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 12px;
}

header .app-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
}

header .app-header-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

header .app-header-link:hover {
  opacity: 0.85;
}

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

header .app-logo {
  max-height: 60px !important;
  max-width: 118px !important;
  object-fit: contain;
  padding: 6px;
}

header .app-title {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

header .app-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-text);
}

header .app-sub {
  font-size: 12px;
  color: var(--color-muted);
}

/* Header Buttons */
header .header-btn {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

/* =====================================================
   SUB-HEADER - Einheitliche Seiten-Titel
   ===================================================== */

.sub-header {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(255, 238, 40, 0.05);
  border-bottom: 1px solid var(--color-primary);
  margin-bottom: 0;
  box-sizing: border-box;
}

.sub-header h1 {
  margin: 0;
  font-size: 10px;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sub-header h1 i {
  color: var(--color-primary);
  font-size: 12px;
}

.sub-header .back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.sub-header .back-btn:hover {
  opacity: 0.7;
}

/* =====================================================
   MAIN - Scrollbarer Hauptinhalt
   ===================================================== */
main {
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: 0;
  right: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  
  /* Scrollbar ausblenden - browserübergreifend */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

main::-webkit-scrollbar {
  display: none;
}

/* =====================================================
   FOOTER - Fixed unten
   ===================================================== */
footer {
  display: flex;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--footer-h);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  z-index: 1000;
}

/* Footer Navigation */
footer nav,
footer .app-footer-nav {
  display: flex;
  width: 100%;
  height: 100%;
}

footer nav a,
footer .app-footer-nav a {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer nav a i,
footer .app-footer-nav a i {
  font-size: 20px;
}

footer nav a:hover,
footer .app-footer-nav a:hover {
  color: #fff;
}

footer nav a.active,
footer .app-footer-nav a.active,
footer nav a.active i,
footer .app-footer-nav a.active i {
  color: #fff;
}

/* =====================================================
   WICHTIG FÜR ALLE AG GRID TABLES!!!
   ===================================================== */

/* =====================================================
   COLUMN CONTROLS
   (Falls vorhanden! Ansonsten .grid-container { height: calc(100svh - ?) } Werte anpassen
   ===================================================== */

.column-controls {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  box-sizing: border-box;
  height: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.column-controls::-webkit-scrollbar {
  display: none;
}

.column-controls h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-controls h3 i {
    color: #ffee28;
}




/* =====================================================
   LINKS & TEXT
   ===================================================== */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  margin: 0 0 1rem 0;
}

/* =====================================================
   BUTTONS - Basis
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #303030;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary {
  background: var(--color-primary);
  color: #303030;
  border: 1px solid var(--color-primary);
}

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

.btn-secondary {
  background: #333;
  color: var(--color-text);
  border: 1px solid #333;
}

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

.btn-danger {
  background: #ff4444;
  color: var(--color-text);
  border: 1px solid #ff4444;
}

.btn-danger:hover {
  background: var(--color-bg);
  color: #ff4444;
}

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

/* =====================================================
   FORMULARE - Basis
   ===================================================== */
.form-control {
  width: 100%;
  padding: 0.75rem;
  background: #111;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-control::placeholder {
  color: var(--color-muted);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* =====================================================
   ROLLEN-SPEZIFISCHE HEADER/FOOTER OVERRIDES
   ===================================================== */

/* Public Header (größer für Landing Pages) */
header.public-header {
  height: 60px;
}

/* Public Footer (mit mehr Inhalt) */
footer.public-footer {
  height: auto;
  min-height: var(--footer-h);
  padding: 10px 0;
  flex-direction: column;
  justify-content: center;
}

footer.public-footer .footer-content {
  text-align: center;
  font-size: 10px;
  color: var(--color-muted);
}

footer.public-footer a {
  color: var(--color-muted);
  font-size: 10px;
}

footer.public-footer a:hover {
  color: var(--color-primary);
}

/* Crew Header */
header.crew-header {
  height: var(--header-h);
}

/* Admin nutzt gleiche Crew-Header Styles */

/* Main Anpassung wenn public-header verwendet wird */
body:has(header.public-header) main {
  top: 60px;
}

body:has(footer.public-footer) main {
  bottom: 60px;
}

/* =====================================================
   TOAST BENACHRICHTIGUNGEN
   ===================================================== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--color-primary);
  color: #000;
  font-weight: 500;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-left: 4px solid #d4c520;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

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

.toast-error {
  background: #ff4444;
  color: #fff;
  border-left-color: #cc0000;
}

.toast-success {
  background: #4CAF50;
  color: #fff;
  border-left-color: #388E3C;
}
