/* =========================================================
   TVS CREDIT USER MANAGER
   Clean Premium Admin UI
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f6fa;
}

body {
  min-height: 100vh;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  color: #161a26;
  background: #f5f6fa;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

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

button {
  border: 0;
}

button,
select {
  cursor: pointer;
}

input,
select {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(99, 91, 255, 0.16);
  outline-offset: 2px;
}

::selection {
  background: rgba(99, 91, 255, 0.18);
}


/* =========================================================
   LOGIN SCREEN
========================================================= */

.login-screen {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 32px 20px;

  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 8% 10%,
      rgba(99, 91, 255, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 92% 90%,
      rgba(214, 76, 154, 0.08),
      transparent 28%
    ),
    #f5f6fa;
}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-card {
  width: min(100%, 460px);

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e3e6ed;

  border-radius: 22px;

  box-shadow:
    0 32px 80px rgba(20, 25, 40, 0.10),
    0 8px 28px rgba(20, 25, 40, 0.045);
}


/* =========================================================
   LOGIN BRAND
   HTML uses .brand, NOT .login-brand
========================================================= */

.login-card > .brand {
  min-height: 112px;

  padding: 25px 30px;

  display: flex;
  align-items: center;

  gap: 14px;

  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #171a2b 0%,
      #202239 52%,
      #2a203a 100%
    );

  color: #ffffff;
}

.login-card > .brand::before {
  content: "";

  position: absolute;

  width: 230px;
  height: 230px;

  top: -155px;
  right: -70px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(112, 101, 255, 0.28),
      transparent 68%
    );

  pointer-events: none;
}

.login-card > .brand::after {
  content: "";

  position: absolute;

  width: 180px;
  height: 180px;

  left: -95px;
  bottom: -135px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(220, 77, 153, 0.18),
      transparent 70%
    );

  pointer-events: none;
}


/* =========================================================
   BRAND ICON
========================================================= */

.login-card > .brand .brand-icon {
  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #8068ff 50%,
      #d94f9b
    );

  border: 1px solid rgba(255, 255, 255, 0.14);

  color: #ffffff;

  font-size: 19px;
  font-weight: 800;

  box-shadow:
    0 10px 25px rgba(99, 91, 255, 0.28);
}


/* =========================================================
   BRAND TEXT
========================================================= */

.login-card > .brand > div:last-child {
  position: relative;
  z-index: 1;

  min-width: 0;
}

.login-card > .brand h1 {
  color: #ffffff;

  font-size: 19px;
  line-height: 1.15;

  font-weight: 750;

  letter-spacing: -0.35px;
}

.login-card > .brand span {
  display: block;

  margin-top: 5px;

  color: #aeb4c8;

  font-size: 11px;
  line-height: 1.2;

  font-weight: 500;
}


/* =========================================================
   LOGIN HEADING
========================================================= */

.login-heading {
  padding: 34px 36px 7px;
}

.login-heading h2 {
  color: #151927;

  font-size: 28px;
  line-height: 1.15;

  font-weight: 760;

  letter-spacing: -0.8px;
}

.login-heading p {
  margin-top: 9px;

  color: #7c8496;

  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   LOGIN FORM
========================================================= */

#loginForm {
  width: 100%;

  padding: 24px 36px 30px;
}

#loginForm .form-group {
  width: 100%;

  margin-bottom: 20px;
}

#loginForm .form-group label {
  display: block;

  margin-bottom: 8px;

  color: #303747;

  font-size: 12px;
  line-height: 1.2;

  font-weight: 700;
}

#loginForm input {
  width: 100%;
  height: 48px;

  display: block;

  padding: 0 14px;

  border: 1px solid #dfe3eb;

  border-radius: 11px;

  background: #fbfcfe;

  color: #171b28;

  font-size: 13px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#loginForm input::placeholder {
  color: #a4aab7;
}

#loginForm input:hover {
  background: #ffffff;

  border-color: #cfd4df;
}

#loginForm input:focus {
  background: #ffffff;

  border-color: #635bff;

  box-shadow:
    0 0 0 4px rgba(99, 91, 255, 0.09);
}


/* =========================================================
   PASSWORD
========================================================= */

#loginForm .password-wrapper {
  width: 100%;

  position: relative;
}

#loginForm .password-wrapper input {
  padding-right: 68px;
}

#loginForm .password-toggle {
  position: absolute;

  top: 50%;
  right: 10px;

  transform: translateY(-50%);

  padding: 6px 8px;

  border-radius: 6px;

  background: transparent;

  color: #635bff;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#loginForm .password-toggle:hover {
  background: rgba(99, 91, 255, 0.07);

  color: #4f46e5;
}


/* =========================================================
   ERROR MESSAGE
========================================================= */

.error-message {
  width: 100%;

  padding: 10px 12px;

  margin-bottom: 16px;

  border: 1px solid #fecaca;

  border-radius: 9px;

  background: #fff7f6;

  color: #b42318;

  font-size: 11px;
  line-height: 1.45;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-btn {
  width: 100%;
  height: 49px;

  margin-top: 3px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #5a52ef
    );

  color: #ffffff;

  font-size: 13px;
  font-weight: 750;

  cursor: pointer;

  box-shadow:
    0 11px 26px rgba(99, 91, 255, 0.22);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.login-btn:hover {
  filter: brightness(1.04);

  transform: translateY(-1px);

  box-shadow:
    0 15px 32px rgba(99, 91, 255, 0.27);
}

.login-btn:active {
  transform: translateY(0);

  box-shadow:
    0 8px 18px rgba(99, 91, 255, 0.18);
}

.login-btn:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}


/* =========================================================
   LOGIN FOOTER
========================================================= */

.login-footer {
  min-height: 58px;

  padding: 0 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 4px;

  border-top: 1px solid #edf0f4;

  background: #fcfcfd;

  color: #9aa1b0;

  font-size: 10px;
}

.login-footer strong {
  color: #635bff;

  font-weight: 750;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-screen {
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 5% 5%,
      rgba(99, 91, 255, 0.045),
      transparent 25%
    ),
    #f5f6fa;
}


/* =========================================================
   DASHBOARD HEADER
========================================================= */

.dashboard-header {
  min-height: 76px;

  padding: 0 42px;

  position: relative;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background:
    linear-gradient(
      135deg,
      #15182a 0%,
      #1e2036 52%,
      #29203b 100%
    );

  color: #ffffff;

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);

  box-shadow:
    0 5px 24px rgba(17, 24, 39, 0.13);
}

.dashboard-header::before {
  content: "";

  position: absolute;

  width: 400px;
  height: 180px;

  top: -120px;
  right: 18%;

  border-radius: 50%;

  background:
    radial-gradient(
      ellipse,
      rgba(99, 91, 255, 0.17),
      transparent 70%
    );

  pointer-events: none;
}


/* =========================================================
   HEADER BRAND
========================================================= */

.header-brand {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;

  gap: 12px;

  min-width: 0;
}

.header-brand .brand-icon {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #8068ff 48%,
      #d94f9b
    );

  border: 1px solid rgba(255, 255, 255, 0.12);

  color: #ffffff;

  font-size: 16px;
  font-weight: 800;

  box-shadow:
    0 8px 22px rgba(99, 91, 255, 0.25);
}

.header-brand h1 {
  color: #ffffff;

  font-size: 15px;
  line-height: 1.2;

  font-weight: 750;

  letter-spacing: -0.2px;
}

.header-brand span {
  display: block;

  margin-top: 4px;

  color: #9299ae;

  font-size: 10px;
  line-height: 1.2;

  font-weight: 500;
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;

  gap: 12px;
}


/* =========================================================
   ADMIN INFO
========================================================= */

.admin-info {
  min-height: 42px;

  padding: 6px 12px 6px 10px;

  display: flex;
  align-items: center;

  gap: 9px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.045);
}

.admin-info::before {
  content: "A";

  width: 28px;
  height: 28px;

  flex: 0 0 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #9a5bdd
    );

  color: #ffffff;

  font-size: 10px;
  font-weight: 800;
}

.admin-info span {
  display: block;

  margin-bottom: 2px;

  color: #858ca1;

  font-size: 9px;
  line-height: 1;
}

.admin-info strong {
  display: block;

  max-width: 190px;

  overflow: hidden;

  color: #f5f6fa;

  font-size: 11px;
  font-weight: 650;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   LOGOUT BUTTON
========================================================= */

.logout-btn {
  min-width: 74px;
  height: 40px;

  padding: 0 13px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  border: 1px solid rgba(255, 255, 255, 0.11);

  border-radius: 9px;

  background: rgba(255, 255, 255, 0.055);

  color: #dfe2eb;

  font-size: 11px;
  font-weight: 650;

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.10);

  border-color: rgba(255, 255, 255, 0.18);

  color: #ffffff;

  transform: translateY(-1px);
}

.logout-btn:active {
  transform: translateY(0);
}


/* =========================================================
   DASHBOARD CONTENT
========================================================= */

.dashboard-content {
  width: min(1220px, calc(100% - 48px));

  margin: 0 auto;

  padding: 42px 0 60px;

  animation:
    dashboardIn 0.3s ease both;
}

@keyframes dashboardIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   PAGE HEADING
========================================================= */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 25px;
}

.page-heading h2 {
  color: #111827;

  font-size: 29px;
  line-height: 1.15;

  font-weight: 760;

  letter-spacing: -0.8px;
}

.page-heading p {
  margin-top: 7px;

  color: #737b8f;

  font-size: 13px;
  line-height: 1.45;
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.primary-btn {
  min-height: 42px;

  padding: 0 17px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      #635bff,
      #5a52ef
    );

  color: #ffffff;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 7px 18px rgba(99, 91, 255, 0.17);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.primary-btn:hover {
  filter: brightness(1.04);

  transform: translateY(-1px);

  box-shadow:
    0 10px 22px rgba(99, 91, 255, 0.22);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}


/* =========================================================
   STAT CARDS
========================================================= */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 18px;

  margin-bottom: 22px;
}

.stat-card {
  min-height: 126px;

  padding: 22px 23px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: #ffffff;

  border: 1px solid #e5e8ef;

  border-radius: 14px;

  box-shadow:
    0 5px 18px rgba(17, 24, 39, 0.035);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 26px rgba(17, 24, 39, 0.06);
}

.stat-label {
  color: #7b8394;

  font-size: 12px;
  font-weight: 600;
}

.stat-value {
  color: #111827;

  font-size: 30px;
  line-height: 1;

  font-weight: 750;

  letter-spacing: -1px;
}


/* =========================================================
   USERS CARD
========================================================= */

.users-card {
  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e4e7ee;

  border-radius: 15px;

  box-shadow:
    0 6px 22px rgba(17, 24, 39, 0.035);
}


/* =========================================================
   CARD HEADER
========================================================= */

.card-header {
  min-height: 82px;

  padding: 18px 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  border-bottom: 1px solid #edf0f4;
}

.card-header h3 {
  color: #182033;

  font-size: 14px;
  line-height: 1.3;

  font-weight: 700;
}

.card-header p {
  margin-top: 4px;

  color: #8a91a1;

  font-size: 11px;
  line-height: 1.4;
}


/* =========================================================
   SEARCH
   HTML uses .table-search
========================================================= */

.table-search {
  width: 270px;

  flex: 0 0 270px;
}

.table-search input {
  width: 100%;
  height: 40px;

  padding: 0 13px 0 36px;

  border: 1px solid #dfe3ea;

  border-radius: 9px;

  background:
    #fbfcfe
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239198a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='20' y1='20' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")
    no-repeat
    12px center;

  color: #202637;

  font-size: 12px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.table-search input::placeholder {
  color: #9aa1b0;
}

.table-search input:hover {
  background-color: #ffffff;

  border-color: #cfd4df;
}

.table-search input:focus {
  background-color: #ffffff;

  border-color: #635bff;

  box-shadow:
    0 0 0 4px rgba(99, 91, 255, 0.08);
}


/* =========================================================
   TABLE WRAPPER
========================================================= */

.table-wrapper {
  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  scrollbar-width: thin;

  scrollbar-color:
    #d4d7df
    transparent;
}

.table-wrapper::-webkit-scrollbar {
  height: 7px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #d4d7df;

  border-radius: 999px;
}


/* =========================================================
   USERS TABLE
========================================================= */

.users-table {
  width: 100%;

  min-width: 1120px;

  border-collapse: collapse;

  table-layout: auto;
}

.users-table th {
  height: 46px;

  padding: 0 18px;

  background: #fafbfc;

  border-bottom: 1px solid #edf0f4;

  color: #7d8494;

  text-align: left;

  font-size: 10px;
  line-height: 1;

  font-weight: 750;

  text-transform: uppercase;

  letter-spacing: 0.55px;

  white-space: nowrap;
}

.users-table td {
  height: 70px;

  padding: 0 18px;

  border-bottom: 1px solid #f0f2f5;

  color: #303747;

  font-size: 12px;

  vertical-align: middle;
}

.users-table tbody tr {
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.users-table tbody tr:hover {
  background: #fafaff;

  box-shadow:
    inset 3px 0 0 rgba(99, 91, 255, 0.32);
}

.users-table tbody tr:last-child td {
  border-bottom: 0;
}


/* =========================================================
   USER CELL
========================================================= */

.user-cell {
  min-width: 190px;

  display: flex;
  align-items: center;

  gap: 11px;
}

.user-avatar {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      #eeecff,
      #f9e8f3
    );

  border: 1px solid rgba(99, 91, 255, 0.08);

  color: #635bff;

  font-size: 12px;
  font-weight: 750;
}

.user-info {
  min-width: 0;
}

.user-name {
  overflow: hidden;

  color: #202637;

  font-size: 12px;
  font-weight: 650;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-id-small {
  margin-top: 3px;

  overflow: hidden;

  color: #9aa1b0;

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   USERNAME
========================================================= */

.username-text {
  display: inline-flex;
  align-items: center;

  max-width: 150px;

  padding: 5px 8px;

  overflow: hidden;

  border-radius: 6px;

  background: #f7f7fa;

  color: #4d5364;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: 10px;
  font-weight: 600;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   EMAIL
========================================================= */

.email-text {
  display: block;

  max-width: 210px;

  overflow: hidden;

  color: #596174;

  font-size: 11px;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   DATE
========================================================= */

.date-cell {
  display: flex;
  flex-direction: column;

  gap: 2px;

  white-space: nowrap;
}

.date-main {
  color: #596174;

  font-size: 11px;
  font-weight: 500;
}

.never-login {
  color: #a0a6b3;

  font-size: 11px;

  font-style: italic;
}


/* =========================================================
   STATUS BADGES
========================================================= */

.status-badge,
.login-status-badge {
  min-height: 25px;

  padding: 0 9px;

  display: inline-flex;
  align-items: center;

  gap: 6px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;

  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;

  flex: 0 0 6px;

  border-radius: 50%;
}


/* =========================================================
   ACCOUNT STATUS
========================================================= */

.status-badge.active {
  background: #ecfdf3;

  color: #067647;
}

.status-badge.active .status-dot {
  background: #12b76a;
}

.status-badge.disabled {
  background: #fef3f2;

  color: #b42318;
}

.status-badge.disabled .status-dot {
  background: #f04438;
}


/* =========================================================
   LOGIN STATUS
========================================================= */

.login-status-badge.active {
  background: #ecfdf3;

  color: #067647;
}

.login-status-badge.active .status-dot {
  background: #12b76a;

  box-shadow:
    0 0 0 3px rgba(18, 183, 106, 0.10);
}

.login-status-badge.logged-out {
  background: #f2f4f7;

  color: #667085;
}

.login-status-badge.logged-out .status-dot {
  background: #98a2b3;
}

.login-status-badge.disabled {
  background: #fef3f2;

  color: #b42318;
}

.login-status-badge.disabled .status-dot {
  background: #f04438;
}


/* =========================================================
   ACTION COLUMN
========================================================= */

.actions-column {
  width: 125px;

  text-align: right !important;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 6px;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.action-btn {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #e2e5ec;

  border-radius: 8px;

  background: #ffffff;

  color: #667085;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.action-btn svg {
  width: 15px;
  height: 15px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-btn:hover {
  background: #f7f7ff;

  border-color: #d8d8ff;

  color: #635bff;

  transform: translateY(-1px);

  box-shadow:
    0 3px 10px rgba(17, 24, 39, 0.06);
}

.action-btn:active {
  transform: translateY(0);

  box-shadow: none;
}

.action-btn.edit:hover {
  background: #f5f4ff;

  border-color: #d8d5ff;

  color: #635bff;
}

.action-btn.logout-user:hover {
  background: #fff8ed;

  border-color: #fed7aa;

  color: #c2410c;
}

.action-btn.delete:hover {
  background: #fff5f4;

  border-color: #fecaca;

  color: #d92d20;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
  height: 170px !important;

  text-align: center !important;

  color: #9aa1b0 !important;

  font-size: 12px !important;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
  position: fixed;

  inset: 0;

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
}

.modal-overlay {
  position: absolute;

  inset: 0;

  background: rgba(15, 18, 31, 0.50);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  z-index: 1;

  width: min(100%, 480px);

  max-height: calc(100vh - 48px);

  overflow-y: auto;

  background: #ffffff;

  border: 1px solid #e5e7ed;

  border-radius: 16px;

  box-shadow:
    0 28px 80px rgba(15, 18, 31, 0.18);

  animation:
    modalIn 0.2s ease both;
}

@keyframes modalIn {
  from {
    opacity: 0;

    transform:
      translateY(8px)
      scale(0.985);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}


/* =========================================================
   MODAL HEADER
========================================================= */

.modal-header {
  padding: 22px 24px 19px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  border-bottom: 1px solid #edf0f4;
}

.modal-header h2 {
  color: #111827;

  font-size: 18px;
  line-height: 1.25;

  font-weight: 750;

  letter-spacing: -0.3px;
}

.modal-header p {
  margin-top: 5px;

  color: #858c9c;

  font-size: 11px;
  line-height: 1.45;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.close-btn {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #f5f6f8;

  color: #6b7280;

  font-size: 19px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.close-btn:hover {
  background: #eceef2;

  color: #111827;
}


/* =========================================================
   USER FORM
========================================================= */

#userForm {
  padding: 22px 24px 24px;
}

#userForm .form-group {
  margin-bottom: 17px;
}

#userForm .form-group:last-of-type {
  margin-bottom: 0;
}

#userForm label {
  display: block;

  margin-bottom: 7px;

  color: #303747;

  font-size: 12px;
  line-height: 1.2;

  font-weight: 650;
}

#userForm input,
#userForm select {
  width: 100%;
  height: 43px;

  display: block;

  padding: 0 12px;

  border: 1px solid #dfe3ea;

  border-radius: 9px;

  background: #fbfcfe;

  color: #202637;

  font-size: 13px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#userForm input::placeholder {
  color: #a4aab7;
}

#userForm input:hover,
#userForm select:hover {
  background: #ffffff;

  border-color: #cfd4df;
}

#userForm input:focus,
#userForm select:focus {
  background: #ffffff;

  border-color: #635bff;

  box-shadow:
    0 0 0 4px rgba(99, 91, 255, 0.08);
}

#userForm select {
  padding-right: 34px;

  appearance: auto;

  cursor: pointer;
}

#passwordHint {
  display: block;

  margin-top: 6px;

  color: #969dac;

  font-size: 10px;
  line-height: 1.4;
}


/* =========================================================
   MODAL ACTIONS
========================================================= */

.modal-actions {
  margin-top: 23px;

  padding-top: 18px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 9px;

  border-top: 1px solid #edf0f4;
}


/* =========================================================
   SECONDARY BUTTON
========================================================= */

.secondary-btn {
  min-height: 42px;

  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #dfe3ea;

  border-radius: 9px;

  background: #ffffff;

  color: #596174;

  font-size: 12px;
  font-weight: 650;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.secondary-btn:hover {
  background: #f8f9fb;

  border-color: #cfd4de;

  color: #303747;
}


/* =========================================================
   CONFIRM CARD
========================================================= */

.confirm-card {
  width: min(100%, 410px);

  padding: 28px;

  position: relative;
  z-index: 1;

  background: #ffffff;

  border: 1px solid #e5e7ed;

  border-radius: 16px;

  box-shadow:
    0 28px 80px rgba(15, 18, 31, 0.18);

  text-align: center;

  animation:
    modalIn 0.2s ease both;
}

.confirm-card h2 {
  color: #111827;

  font-size: 18px;
  line-height: 1.25;

  font-weight: 750;

  letter-spacing: -0.3px;
}

.confirm-card p {
  margin-top: 9px;

  color: #737b8f;

  font-size: 13px;
  line-height: 1.55;
}

.confirm-card > strong {
  display: block;

  margin-top: 7px;

  color: #303747;

  font-size: 13px;
  font-weight: 700;
}


/* =========================================================
   CONFIRM ICON
========================================================= */

.confirm-icon {
  width: 48px;
  height: 48px;

  margin: 0 auto 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #fff5f4;

  color: #d92d20;

  font-size: 20px;
  font-weight: 800;
}


/* =========================================================
   DANGER BUTTON
========================================================= */

.danger-btn {
  min-height: 42px;

  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #d92d20;

  color: #ffffff;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.danger-btn:hover {
  background: #b42318;

  transform: translateY(-1px);

  box-shadow:
    0 6px 16px rgba(217, 45, 32, 0.18);
}

.danger-btn:active {
  transform: translateY(0);
}

.danger-btn:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #f5f6fa;
}

::-webkit-scrollbar-thumb {
  background: #d4d7df;

  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c2c6d0;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .dashboard-header {
    padding: 0 28px;
  }

  .dashboard-content {
    width: calc(100% - 36px);

    padding-top: 34px;
  }

  .users-table {
    min-width: 1120px;
  }
}


/* =========================================================
   TABLET SMALL
========================================================= */

@media (max-width: 900px) {

  .dashboard-header {
    padding: 0 24px;
  }

  .dashboard-content {
    width: calc(100% - 32px);

    padding-top: 32px;
  }

  .stats-grid {
    gap: 13px;
  }

  .admin-info {
    max-width: 230px;
  }

  .admin-info strong {
    max-width: 130px;
  }

  .users-table {
    min-width: 1120px;
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  /* LOGIN */

  .login-screen {
    padding: 18px 14px;
  }

  .login-card {
    border-radius: 18px;
  }

  .login-card > .brand {
    min-height: 100px;

    padding: 23px;
  }

  .login-card > .brand .brand-icon {
    width: 44px;
    height: 44px;

    flex-basis: 44px;

    border-radius: 12px;
  }

  .login-heading {
    padding: 28px 24px 7px;
  }

  .login-heading h2 {
    font-size: 25px;
  }

  #loginForm {
    padding: 22px 24px 27px;
  }

  .login-footer {
    min-height: 54px;

    padding: 0 20px;
  }


  /* HEADER */

  .dashboard-header {
    min-height: 68px;

    padding: 12px 16px;
  }

  .header-brand {
    gap: 9px;
  }

  .header-brand .brand-icon {
    width: 38px;
    height: 38px;

    flex-basis: 38px;

    border-radius: 10px;
  }

  .header-brand h1 {
    font-size: 13px;
  }

  .header-brand span {
    font-size: 9px;
  }

  .admin-info {
    display: none;
  }

  .logout-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;

    padding: 0;

    font-size: 0;
  }

  .logout-btn::before {
    content: "↪";

    font-size: 17px;
  }


  /* CONTENT */

  .dashboard-content {
    width: calc(100% - 24px);

    padding: 25px 0 40px;
  }

  .page-heading {
    align-items: flex-start;

    flex-direction: column;

    gap: 16px;
  }

  .page-heading h2 {
    font-size: 26px;
  }

  .page-heading .primary-btn {
    width: 100%;
  }


  /* STATS */

  .stats-grid {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  .stat-card {
    min-height: 105px;
  }


  /* USERS CARD */

  .users-card {
    border-radius: 12px;
  }

  .card-header {
    align-items: stretch;

    flex-direction: column;

    padding: 17px;
  }

  .table-search {
    width: 100%;

    flex: none;
  }

  .users-table {
    min-width: 1120px;
  }


  /* MODAL */

  .modal {
    padding: 14px;
  }

  .modal-card,
  .confirm-card {
    max-height: calc(100vh - 28px);
  }

  .modal-header {
    padding: 19px;
  }

  #userForm {
    padding: 19px;
  }

  .modal-actions {
    flex-direction: column-reverse;

    align-items: stretch;
  }

  .modal-actions button {
    width: 100%;
  }

  .confirm-card {
    padding: 23px;
  }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  .login-screen {
    padding: 12px;
  }

  .login-card {
    width: 100%;

    border-radius: 17px;
  }

  .login-card > .brand {
    padding: 21px;
  }

  .login-card > .brand .brand-icon {
    width: 42px;
    height: 42px;

    flex-basis: 42px;
  }

  .login-card > .brand h1 {
    font-size: 17px;
  }

  .login-card > .brand span {
    font-size: 10px;
  }

  .login-heading {
    padding: 26px 21px 6px;
  }

  .login-heading h2 {
    font-size: 24px;
  }

  #loginForm {
    padding: 21px;
  }

  .login-footer {
    padding: 0 16px;
  }

  .dashboard-header {
    padding: 12px 13px;
  }

  .dashboard-content {
    width: calc(100% - 18px);
  }

  .page-heading h2 {
    font-size: 24px;
  }

  .users-table th,
  .users-table td {
    padding-left: 15px;
    padding-right: 15px;
  }
}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 360px) {

  .login-heading h2 {
    font-size: 22px;
  }

  #loginForm input {
    height: 46px;
  }

  .login-btn {
    height: 47px;
  }

  .dashboard-content {
    width: calc(100% - 14px);
  }
}