/* ══════════════════════════════════════════════════════════════
   AIPA License Manager — Base Styles
   Azure / Microsoft Fluent Design inspired
   ══════════════════════════════════════════════════════════════ */

:root {
  --primary: #0078D4;
  --primary-hover: #106EBE;
  --primary-dark: #005A9E;
  --primary-light: #DEECF9;
  --bg: #F3F2F1;
  --surface: #FFFFFF;
  --border: #EDEBE9;
  --border-light: #F3F2F1;
  --text: #323130;
  --text-2: #605E5C;
  --text-3: #A19F9D;
  --success: #107C10;
  --success-bg: #DFF6DD;
  --danger: #D13438;
  --danger-bg: #FDE7E9;
  --danger-border: #F1BBBC;
  --warning: #FFB900;
  --warn: #FFB900;
  --warn-bg: #FFF4CE;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 1.6px 3.6px 0 rgba(0,0,0,.132), 0 0.3px 0.9px 0 rgba(0,0,0,.108);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', sans-serif;
  --mono: 'Cascadia Code', 'SF Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Remove default browser outline on all elements ── */
*:focus {
  outline: none;
}
/* ── Focus visible (keyboard only) ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
input:focus, select:focus, textarea:focus, button:focus {
  outline: none;
  box-shadow: none;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  transition: top .2s;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ── Screen-reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Utility Classes ── */
.mono { font-family: var(--mono); font-size: .85rem; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: .85rem; }
.mb-6 { margin-bottom: 6px; }

/* ══════════════════════════════════════════════════════════════
   Language Dropdown — Flag-based selector in header
   ══════════════════════════════════════════════════════════════ */
.lang-dropdown {
  position: relative;
  z-index: 200;
}

.lang-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none !important;
  border: none !important;
  outline: none;
  box-shadow: none !important;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  -webkit-appearance: none;
  appearance: none;
}

.lang-trigger:hover {
  background: rgba(0,0,0,.04) !important;
}

.lang-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-flag-svg {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  box-shadow: none;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 160px;
  padding: 4px;
  overflow: hidden;
}

.lang-dropdown.open .lang-menu {
  display: block;
  animation: fadeIn .12s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: none; }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--text-2);
  text-align: left;
  transition: all .1s;
}

.lang-option:hover {
  background: var(--bg);
  color: var(--text);
}

.lang-option.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
}

.lang-label {
  font-size: .875rem;
}
