* {
  box-sizing: border-box;
}

:root {
  --background: #050b18;
  --panel: rgba(15, 29, 53, 0.9);
  --panel-soft: rgba(20, 38, 69, 0.76);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f8fbff;
  --muted: #91a4c8;
  --blue: #4c8dff;
  --blue-dark: #2858e8;
  --green: #22c55e;
  --red: #ef4444;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #13316b 0, transparent 36%),
    radial-gradient(circle at bottom right, #1d255b 0, transparent 32%),
    var(--background);
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 29, 53, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.logo {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 22px;
  font-size: 29px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 18px 44px rgba(76, 141, 255, 0.35);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 9px;
  font-size: 32px;
}

.subtitle {
  color: var(--muted);
  line-height: 1.65;
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #b9c7e3;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  color: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: #071225;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(76, 141, 255, 0.13);
}

.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 13px;
  padding: 13px 20px;
  color: white;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.secondary-button {
  border: 1px solid var(--border);
  background: #273552;
}

.danger-button {
  background: #8f2424;
}

.full-button {
  width: 100%;
  margin-top: 22px;
}

.error-message,
.success-message {
  display: none;
  margin-top: 15px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
}

.error-message {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.55);
}

.success-message {
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.55);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 11, 24, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page {
  width: min(1420px, calc(100% - 38px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.user-badge {
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #c8d5ee;
  background: var(--panel-soft);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
}

.module-card {
  min-height: 205px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(18, 35, 65, 0.96),
    rgba(10, 21, 40, 0.92)
  );
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.23);
  transition: 0.18s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 141, 255, 0.48);
}

.module-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 23px;
  border-radius: 16px;
  font-size: 21px;
  background: rgba(76, 141, 255, 0.15);
}

.module-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
}

.module-card p {
  min-height: 43px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.module-card button {
  width: 100%;
}

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.toolbar input {
  min-width: 280px;
  height: 44px;
  padding: 0 14px;
  color: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #071225;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

th {
  color: #abc3f7;
  background: #13213c;
}

.status-active {
  color: #86efac;
}

.status-inactive {
  color: #fca5a5;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-row button {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #101d35;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 720px) {
  .topbar {
    padding: 13px 16px;
  }

  .page {
    width: min(100% - 24px, 1420px);
    padding-top: 24px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
.dm-session-expiry-warning{position:fixed;z-index:2147483647;right:20px;bottom:20px;max-width:440px;padding:16px 18px;border:1px solid #d8a33b;border-radius:12px;color:#fff;background:#412f0d;box-shadow:0 20px 60px rgba(0,0,0,.55);font:600 14px/1.5 system-ui}
