:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fb;
  font-synthesis: none;
  --primary: #315efb;
  --primary-dark: #2448d8;
  --primary-soft: #eef3ff;
  --text: #172033;
  --muted: #667085;
  --border: #dfe5ef;
  --surface: #ffffff;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 24px 70px rgba(25, 45, 95, .13);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #f5f7fb;
}

button, input { font: inherit; }

a { color: var(--primary); }

.navbar {
  min-height: 70px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e5e9f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand,
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #16213a;
  text-decoration: none;
}

.brand { font-size: 1.08rem; font-weight: 760; }
.LingoM{
  margin-top: 5px;
}

.brand-mark,
.auth-logo {
  display: inline-grid;
  place-items: center;
  color: #fff;
  /* background: linear-gradient(145deg, #4b7bff, #315efb 55%, #6c42f5);
  box-shadow: 0 8px 18px rgba(49, 94, 251, .25); */
  font-weight: 850;
}

.brand-mark {
  width: 168px;
  /* height: 36px; */
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #475467;
  font-size: .88rem;
  font-weight: 650;
}

.container {
  max-width: 1600px;
  margin: 28px auto;
  padding: 0 20px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  padding: 9px 15px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  text-decoration: none;
  font-weight: 680;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.button:hover {
  border-color: #aab5c5;
  background: #f9fafb;
}

.button.primary {
  color: #fff;
  /* border-color: var(--primary); */
  background: #024d91;
  box-shadow: 0 8px 18px rgba(49, 94, 251, .20);
}

.button.primary:hover {
  background: linear-gradient(135deg, #1a2d6d, #0b2688);
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(49, 94, 251, .25);
}

.button:disabled { opacity: .65; cursor: wait; transform: none; }

.alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 42px 14px 14px;
    margin: 0 0 18px;
    border: 1px solid #c7d7fe;
    border-radius: 10px;
    background: #eef4ff;
    color: #1849a9;
    font-size: .9rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);

    transition:
        opacity .4s ease,
        transform .4s ease,
        max-height .4s ease,
        margin .4s ease,
        padding .4s ease;
}

.alert.hide {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.alert.success {
    border-color: #abefc6;
    background: #ecfdf3;
    color: var(--success);
}

.alert.error {
    border-color: #fecdca;
    background: #fff5f4;
    color: var(--danger);
}

.alert.warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #b54708;
}

.alert.info {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #175cd3;
}

.alert-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.alert-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s ease;
}

.alert-close:hover {
    background: rgba(0,0,0,.08);
}
.page-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: 1rem;
    margin-top: 1.5rem;
}
/* Authentication */
.auth-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 15%, rgba(90, 133, 255, .14), transparent 27rem),
    radial-gradient(circle at 92% 84%, rgba(112, 76, 244, .10), transparent 28rem),
    linear-gradient(145deg, #f8faff 0%, #f3f7ff 48%, #fafbff 100%);
}

.auth-layout {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 42px 20px 28px;
  isolation: isolate;
}

.auth-layout::before,
.auth-layout::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
}

.auth-layout::before {
  width: 420px;
  height: 420px;
  left: -210px;
  bottom: -225px;
  background: rgba(91, 132, 255, .08);
}

.auth-layout::after {
  width: 360px;
  height: 360px;
  right: -180px;
  top: -205px;
  background: rgba(96, 126, 255, .07);
}

.auth-decoration {
  position: fixed;
  z-index: -1;
  width: 110px;
  height: 110px;
  opacity: .55;
  background-image: radial-gradient(#9db7ff 2px, transparent 2px);
  background-size: 22px 22px;
}

.auth-decoration-one { left: 5%; top: 42%; }
.auth-decoration-two { right: 5%; bottom: 20%; }

.auth-main {
  width: 100%;
  display: grid;
  justify-items: center;
}

.auth-card {
  width: min(100%, 500px);
  padding: 38px 40px 32px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(214, 222, 237, .9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.auth-brand {
  width: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo {
  width: 164px;
  margin-bottom: 12px;
  /* height: 120px; */
  /* border-radius: 14px; */
  object-fit: contain;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: #172033;
  font-size: 1.22rem;
  letter-spacing: -.02em;
}

.auth-brand small {
  margin-top: 2px;
  color: #7a8498;
  font-size: .78rem;
  font-weight: 520;
}

.auth-heading {
  margin-bottom: 27px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(1.72rem, 4vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.auth-heading p {
  margin: 9px auto 0;
  max-width: 350px;
  color: var(--muted);
  line-height: 1.55;
  font-size: .94rem;
}

.auth-heading strong { color: #344054; }

.auth-form {
  display: grid;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group > label,
.label-row label {
  color: #344054;
  font-size: .87rem;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* 
.input-shell {
  min-height: 50px;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #d7deea;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
  border-color: #7796ff;
  box-shadow: 0 0 0 4px rgba(49, 94, 251, .10);
} */

.input-shell {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    width: 100%;
    min-height: 52px;

    padding: 0 1rem;

    border: 1px solid #d6e2f1;
    border-radius: 14px;

    background: #fff;

    transition: border-color .2s, box-shadow .2s;
}

.input-shell:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.input-shell input {
    flex: 1;
    width: 100%;
    min-width: 0;

    border: none;
    outline: none;
    background: transparent;

    font-size: 1rem;
    color: #1e293b;

    box-shadow: none;
}

.input-shell input:focus {
    outline: none;
    box-shadow: none;
}

.input-icon {
  width: 48px;
  height: 100%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #496df5;
  border-right: 1px solid #eef1f6;
  background: #fbfcff;
}

.input-icon svg,
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-control {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
}

.form-control::placeholder { color: #98a2b3; }

.password-toggle {
  width: 45px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #7b879a;
  cursor: pointer;
}

.password-toggle:hover { color: var(--primary); }

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border-radius: 11px;
}

.auth-switch,
.resend-form {
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid #edf0f5;
  text-align: center;
  color: #667085;
  font-size: .88rem;
}

.auth-switch a {
  margin-left: 5px;
  font-weight: 760;
  text-decoration: none;
}

.resend-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 760;
  cursor: pointer;
}

.text-button:hover,
.auth-switch a:hover { text-decoration: underline; }

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: .78rem;
  line-height: 1.4;
}

.field-help {
  margin: 0;
  color: #7a8498;
  font-size: .76rem;
  line-height: 1.45;
}

.field-help ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.otp-input {
  height: 58px;
  padding: 0 16px;
  border: 1px solid #d7deea;
  border-radius: 11px;
  outline: 0;
  background: #fff;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 780;
  letter-spacing: .38em;
}

.otp-input:focus {
  border-color: #7796ff;
  box-shadow: 0 0 0 4px rgba(49, 94, 251, .10);
}

.auth-copyright {
  margin: 22px 0 0;
  color: #8a94a6;
  font-size: .77rem;
}

/* Records */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0 0 5px;
  font-size: 1.65rem;
  letter-spacing: -.025em;
}

.page-header p { margin: 0; color: var(--muted); }

.search { display: flex; gap: 8px; }

.search input {
  min-width: 280px;
  padding: 9px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  outline: none;
}

.search input:focus {
  border-color: #7796ff;
  box-shadow: 0 0 0 4px rgba(49, 94, 251, .09);
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(16, 24, 40, .035);
}

.forgot-password {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
}

.forgot-password a {
  color: var(--primary, #2563eb);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.auth-footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-register {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-register a,
.forgot-password-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-register a:hover,
.forgot-password-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.forgot-password-link {
    font-size: 0.9rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: .85rem;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid #eaecf0;
  text-align: left;
}

th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 2;
  color: #080808;
  font-size: .77rem;
  letter-spacing: .015em;
}

tr:hover td { background: #f8fbff; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 18px;
}

.link-button {
  background: none;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  padding: 10px 0;
}

.actions-column {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  text-align: center;
}

.row-actions {
  position: sticky;
  right: 0;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  text-align: center;
  background: #fff;
  z-index: 2;
}

tr:hover .row-actions { background: #f8fbff; }
.row-actions form { margin: 0; }

.icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--primary);
    cursor: pointer;
    transition: all .2s ease;
}

.icon-button:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.icon-button i {
    font-size: 1rem;
}
.icon-button.danger {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.edited-cell {
  background: #fff3cd !important;
  font-weight: 650;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(16, 24, 40, .22);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #eaecf0;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid #eaecf0;
  border-bottom: 0;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 22px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: .9rem;
}

.form-grid input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
}



.dashboard-link {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}

.dashboard-mini {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  width: 240px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  box-sizing: border-box;
  padding: 24px 20px;
  border: 1px solid #0283b1;
  border-bottom: 5px solid #016b91;
  border-radius: 16px;
  background: #0296CA;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(2, 100, 140, .22);
  cursor: pointer;
  transition: background .18s, transform .18s, box-shadow .18s;
}

.dashboard-mini:hover { background: #0283b1; transform: translateY(-3px); box-shadow: 0 12px 24px rgba(2, 100, 140, .3); }
.dashboard-mini:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(2, 100, 140, .2); }
.dashboard-mini:focus-visible { outline: 3px solid #0296CA; outline-offset: 4px; }
.dashboard-strip-title { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.dashboard-strip-title small { display: block; margin-top: 8px; font-size: .75rem; font-weight: 400; color: #fff; }
.dashboard-strip-charts { display: block; width: 100%; height: 64px; min-width: 0; box-sizing: border-box; padding: 10px; background: #fff; border-radius: 8px; }
.dashboard-strip-action { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid rgba(255,255,255,.65); border-radius: 8px; background: rgba(255,255,255,.16); font-size: .85rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .dashboard-mini { transition: none; }
  .dashboard-mini:hover, .dashboard-mini:active { transform: none; }
}

@media (max-width: 700px) {
  .navbar,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions { flex-wrap: wrap; }
  .search { width: 100%; }
  .search input { min-width: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }

  .auth-layout { padding: 22px 14px; }
  .auth-card { padding: 30px 22px 25px; border-radius: 18px; }
  .auth-brand { margin-bottom: 27px; }
  .auth-decoration { display: none; }
  .resend-form { flex-wrap: wrap; }
}


.dashboard-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: dashboard-spin .75s linear infinite;
}
.dashboard-loader[hidden] { display: none; }
@keyframes dashboard-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .dashboard-loader { animation: none; }
}

.dashboard-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.dashboard-loading[hidden] { display: none; }
.dashboard-loader-large {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  border-width: 5px;
  border-color: #dceef6;
  border-top-color: #0296CA;
}

.fetch-records-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(242, 246, 251, .85);
}
.fetch-records-loading[open] { display: flex; }
.fetch-records-loading:not([open]) { display: none; }
.fetch-records-loading::backdrop { background: rgba(242, 246, 251, .4); }
.fetch-records-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px;
  max-width: 420px;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  background: #fff;
  color: #344054;
  text-align: center;
  box-shadow: 0 12px 36px rgba(2, 77, 145, .12);
}
.fetch-records-loading-card strong { color: #024d91; font-size: 1.1rem; }
.fetch-records-loading-card > span:last-child { font-size: .9rem; line-height: 1.5; }
