/* =========================================================
   IDG CORE UI - INDUNGI ROMANIA
   Clean CSS classes, no Tailwind utilities, no IPS dependency
   ========================================================= */

:root {
  --idg-bg: #07090f;
  --idg-bg-soft: #0a0e16;
  --idg-panel: #090d15;
  --idg-panel-2: #0d141f;
  --idg-panel-3: #111926;
  --idg-border: rgba(255,255,255,.08);
  --idg-border-soft: rgba(255,255,255,.045);
  --idg-text: #f7f9ff;
  --idg-muted: #9aa6ba;
  --idg-muted-2: #7f8899;
  --idg-cyan: #00eaff;
  --idg-orange: #ff6a00;
  --idg-gold: #ffd84d;
  --idg-purple: #8b57ff;
  --idg-red: #ff3347;
  --idg-green: #39ff87;
  --idg-radius: 18px;
  --idg-radius-sm: 12px;
  --idg-shadow: 0 18px 46px rgba(0,0,0,.45);
  --idg-font: Segoe UI, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--idg-font);
  color: var(--idg-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(0,234,255,.08), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(255,106,0,.08), transparent 22%),
    linear-gradient(135deg,#040509,#0b1018 48%,#07090f);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.idg-page {
  width: min(1450px, calc(100% - 28px));
  margin: 24px auto;
  position: relative;
  z-index: 1;
}

.idg-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border: 1px solid var(--idg-border);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.03), transparent 42%),
    rgba(9,13,21,.86);
  box-shadow: var(--idg-shadow);
  margin-bottom: 18px;
}

.idg-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.idg-brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0,92% 22%,92% 78%,50% 100%,8% 78%,8% 22%);
  border: 2px solid rgba(0,234,255,.22);
  background:
    radial-gradient(circle, rgba(0,234,255,.18), transparent 70%),
    rgba(255,255,255,.035);
  color: #fff;
  box-shadow: 0 0 18px rgba(0,234,255,.14);
}

.idg-brand h1 {
  margin: 0;
  line-height: 1;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.idg-brand p {
  margin: 4px 0 0;
  color: var(--idg-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.idg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Generic components */

.idg-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: var(--idg-radius-sm);
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.035);
  color: var(--idg-text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .8px;
  cursor: pointer;
  transition: .18s ease;
}

.idg-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0,234,255,.24);
  box-shadow: 0 10px 18px rgba(0,0,0,.20);
}

.idg-btn-primary {
  border-color: rgba(255,51,71,.28);
  background: linear-gradient(135deg, rgba(255,51,71,.36), rgba(255,106,0,.14));
}

.idg-btn-cyan {
  border-color: rgba(0,234,255,.28);
  background: rgba(0,234,255,.07);
}

.idg-input,
.idg-select {
  min-height: 42px;
  border-radius: var(--idg-radius-sm);
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.035);
  color: var(--idg-text);
  padding: 0 12px;
  outline: none;
}

.idg-input:focus,
.idg-select:focus {
  border-color: rgba(0,234,255,.35);
  box-shadow: 0 0 0 3px rgba(0,234,255,.06);
}

.idg-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: start;
}

.idg-card,
.idg-widget {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--idg-border);
  border-radius: var(--idg-radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.026), transparent 42%),
    rgba(9,13,21,.88);
  box-shadow: var(--idg-shadow);
}

.idg-widget {
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.idg-widget::before,
.idg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.016), transparent 42%),
    radial-gradient(circle at 0 0, rgba(0,234,255,.035), transparent 28%);
}

.idg-widget-head,
.idg-card-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--idg-border-soft);
  color: var(--idg-cyan);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 13px;
  font-weight: 950;
  position: relative;
  z-index: 1;
}

.idg-widget-body,
.idg-card-body {
  position: relative;
  z-index: 1;
  padding: 18px;
}

/* Tabs / 2FA */

.idg-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.idg-tab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.025);
  color: var(--idg-muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: 11px;
  font-weight: 900;
}

.idg-tab.is-active {
  color: #fff;
  border-color: rgba(0,234,255,.30);
  background: rgba(0,234,255,.08);
}

.idg-tab-panel {
  display: none;
}

.idg-tab-panel.is-active {
  display: block;
}

/* Cover photo */

.idg-cover {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: var(--idg-radius);
  border: 1px solid var(--idg-border);
  background:
    radial-gradient(circle at 20% 26%, rgba(255,51,71,.20), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(0,234,255,.16), transparent 28%),
    linear-gradient(135deg,#151d2b,#080c13);
}

.idg-cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  object-fit: cover;
  opacity: .55;
  top: 0;
  user-select: none;
}

.idg-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
}

.idg-cover-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.idg-cover-content h2 {
  margin: 0;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.idg-cover-content p {
  margin: 6px 0 0;
  color: #d3dbea;
}

.idg-cover-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.idg-cover.is-positioning .idg-cover-photo {
  cursor: grab;
  opacity: .78;
}

.idg-cover.is-positioning::after {
  content: "Trage poza sus/jos și apasă Save";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,234,255,.25);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

/* Cropper */

.idg-cropper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: start;
}

.idg-cropper-stage {
  position: relative;
  min-height: 300px;
  border-radius: 16px;
  border: 1px solid var(--idg-border);
  background: rgba(0,0,0,.24);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.idg-cropper-stage img {
  max-width: 100%;
  max-height: 420px;
  display: block;
  user-select: none;
}

.idg-crop-box {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px solid var(--idg-cyan);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.45), 0 0 14px rgba(0,234,255,.25);
  border-radius: 18px;
  cursor: move;
}

.idg-crop-preview {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.035);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.idg-crop-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tables */

.idg-table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.idg-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.idg-filter {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.025);
  color: var(--idg-muted);
  padding: 0 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.idg-filter.is-active {
  color: #fff;
  border-color: rgba(255,106,0,.35);
  background: rgba(255,106,0,.08);
}

.idg-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.idg-table th,
.idg-table td {
  border-bottom: 1px solid var(--idg-border-soft);
  padding: 12px;
  text-align: left;
}

.idg-table th {
  color: var(--idg-orange);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.idg-table td {
  color: #dce4f2;
  font-size: 13px;
}

.idg-table tr:hover td {
  background: rgba(255,255,255,.018);
}

.idg-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.idg-page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--idg-border);
  background: rgba(255,255,255,.025);
  color: var(--idg-text);
  cursor: pointer;
}

.idg-page-btn.is-active {
  border-color: rgba(0,234,255,.35);
  background: rgba(0,234,255,.08);
}

/* Autocomplete */

.idg-autocomplete {
  position: relative;
}

.idg-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.idg-token {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(0,234,255,.22);
  background: rgba(0,234,255,.06);
  color: #dffcff;
  font-size: 12px;
  font-weight: 800;
}

.idg-token button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

/* Notifications */

.idg-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.idg-toast {
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--idg-border);
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), transparent 45%),
    rgba(9,13,21,.95);
  color: var(--idg-text);
  box-shadow: var(--idg-shadow);
  animation: idgToastIn .2s ease-out;
}

.idg-toast strong {
  display: block;
  margin-bottom: 4px;
}

.idg-toast span {
  color: var(--idg-muted);
  font-size: 13px;
}

.idg-toast.is-success {
  border-color: rgba(57,255,135,.25);
}

.idg-toast.is-error {
  border-color: rgba(255,51,71,.35);
}

@keyframes idgToastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */

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

  .idg-cropper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .idg-page {
    width: calc(100% - 16px);
    margin: 12px auto;
  }

  .idg-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .idg-table {
    display: block;
    overflow-x: auto;
  }

  .idg-cover-content {
    align-items: flex-start;
    flex-direction: column;
  }
}
