/* ============================================
   MTIC Admin Theme
   ============================================ */

/* === Lumo Custom Properties === */
html {
  --lumo-primary-color: hsl(214, 90%, 52%);
  --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);
  --lumo-primary-text-color: hsl(214, 90%, 52%);
  --lumo-border-radius-m: 8px;
  --lumo-border-radius-s: 6px;
  --lumo-border-radius-l: 12px;
  --sidebar-bg: hsl(220, 20%, 16%);
  --sidebar-width: 240px;
}

/* === AppLayout Header (Navbar) === */
/* vaadin-app-layout on Vaadin 25 reads no background custom property for
   its navbar or drawer, so the backgrounds go on the parts themselves. */
vaadin-app-layout::part(navbar) {
  background: var(--lumo-primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  min-height: 52px;
  padding: 0 var(--lumo-space-m);
}

vaadin-app-layout vaadin-drawer-toggle {
  color: white;
}

.logo {
  font-size: var(--lumo-font-size-l);
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.user-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--lumo-font-size-s);
}

/* Make header buttons white on blue background */
.header vaadin-button {
  color: white;
}

/* === Drawer Sidebar === */
vaadin-app-layout::part(drawer) {
  background: var(--sidebar-bg);
  border-right: none;
  width: var(--sidebar-width);
}

.drawer {
  padding: var(--lumo-space-m) var(--lumo-space-s) !important;
}

/* === Navigation Links === */
a.nav-link {
  display: flex;
  align-items: center;
  gap: var(--lumo-space-s);
  padding: 10px var(--lumo-space-m);
  border-radius: var(--lumo-border-radius-m);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: var(--lumo-font-size-s);
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  margin: 1px 0;
}

a.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

a.nav-link[highlight] {
  background: var(--lumo-primary-color);
  color: white;
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* === Login Page === */
.login-view {
  background: linear-gradient(135deg, hsl(220, 20%, 96%) 0%, hsl(214, 30%, 92%) 100%);
}

.login-view h1 {
  color: var(--lumo-primary-text-color);
  font-weight: 800;
  font-size: var(--lumo-font-size-xxxl);
  letter-spacing: 1px;
}

.login-view p {
  color: var(--lumo-secondary-text-color);
  margin-bottom: var(--lumo-space-l);
}

/* === Dashboard === */
.dashboard-view h2 {
  margin-bottom: var(--lumo-space-m);
  font-weight: 700;
}

.metric-card {
  background: var(--lumo-base-color);
  border: 1px solid var(--lumo-contrast-10pct);
  border-radius: var(--lumo-border-radius-l);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.actions-panel vaadin-button {
  border-radius: var(--lumo-border-radius-m);
}

/* === Data Grids === */
vaadin-grid {
  border-radius: var(--lumo-border-radius-m);
  border: 1px solid var(--lumo-contrast-10pct);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* === Page Content Area === */
.dashboard-view,
.kyc-review-view,
.withdrawals-view,
.audit-log-view,
.mt5-testing-view,
.mt5-deposit-view,
.mt5-withdrawal-view,
.operations-dashboard-view {
  padding: var(--lumo-space-l) !important;
  max-width: 1400px;
}

/* Pages that are one wide table each: they take the whole content area rather
   than stopping at 1400px. */
.users-view,
.administrators-view,
.roles-view,
.positions-view,
.settlements-view,
.linked-notes-view,
.mt5-accounts-view {
  padding: var(--lumo-space-l) !important;
}

/* The row of filters above a table; an action button, if any, sits at the far end. */
.filter-bar {
  flex-wrap: wrap;
  align-items: flex-end;
}

/* === Dialogs === */
vaadin-dialog-overlay::part(overlay) {
  border-radius: var(--lumo-border-radius-l);
}

/* === General === */
h2 {
  color: var(--lumo-header-text-color);
  font-weight: 700;
}

h3 {
  color: var(--lumo-secondary-text-color);
  font-weight: 600;
  font-size: var(--lumo-font-size-m);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* A status pill: Gateway Deposits and Deposit Channels. */
.status-pill {
    display: inline-block;
    padding: 0.1em 0.6em;
    border-radius: var(--lumo-border-radius-l, 1em);
    font-size: var(--lumo-font-size-s);
    font-weight: 500;
    background: var(--lumo-contrast-10pct);
    color: var(--lumo-body-text-color);
}
.status-pill.good {
    background: var(--lumo-success-color-10pct);
    color: var(--lumo-success-text-color);
}
.status-pill.bad {
    background: var(--lumo-error-color-10pct);
    color: var(--lumo-error-text-color);
}
.status-pill.muted {
    color: var(--lumo-secondary-text-color);
}
