/* Import Google Fonts and Icons */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/dist/tabler-icons.min.css');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f0f9ff;
  color: #0c1a2e;
  min-height: 100vh;
  line-height: 1.5;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

/* ── LOGIN SCREEN ── */
.LOGIN {
  min-height: 100vh;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.LOGIN-CARD {
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid #bae6fd;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.1);
}

.LC-HEAD {
  background: #0c1a2e;
  padding: 28px 28px 22px;
  text-align: center;
}

.LC-BRAND {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #38bdf8;
  font-weight: 500;
  margin-bottom: 6px;
}

.LC-NAME {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
}

.LC-NAME span {
  color: #38bdf8;
}

.LC-LOGO {
  color: #fff;
  line-height: 0;
}

.LC-LOGO svg {
  height: 42px;
  width: auto;
}

.LC-SUB {
  font-size: 11px;
  color: rgba(255, 255, 255, .35);
  margin-top: 4px;
  letter-spacing: .3px;
}

.LC-BADGE {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, .15);
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 20px;
  padding: 4px 12px;
  margin-top: 12px;
  font-size: 11px;
  color: #38bdf8;
  font-weight: 500;
}

.LC-BODY {
  padding: 28px;
}

.FG {
  margin-bottom: 16px;
}

.FL2 {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 6px;
}

.LF-W {
  position: relative;
}

.LF-I {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1.5px solid #e0f2fe;
  border-radius: 9px;
  font-size: 13px;
  color: #0c1a2e;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.LF-I:focus {
  border-color: #0ea5e9;
  background: #fff;
}

.LF-IC {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #94a3b8;
}

.LF-ERR {
  font-size: 11px;
  color: #dc2626;
  margin-top: 4px;
}

.BTN-LOGIN {
  width: 100%;
  background: #0ea5e9;
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .2px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.BTN-LOGIN:hover {
  background: #0284c7;
}

.LC-FOOT {
  text-align: center;
  padding: 0 28px 24px;
  font-size: 11px;
  color: #94a3b8;
}

.hint-pill {
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 11px;
  color: #475569;
  text-align: left;
}

.hint-pill strong {
  color: #0c1a2e;
}

/* ── DASHBOARD LAYOUT ── */
.DASH {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #f0f9ff;
}

.DB-WRAP {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

/* Sidebar */
.SB {
  width: 240px;
  min-width: 240px;
  background: #0c1a2e;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.SB-HEAD {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(56, 189, 248, .18);
}

.SB-LOGO {
  display: block;
  color: #fff;
  text-decoration: none;
  line-height: 0;
}

.SB-LOGO svg {
  height: 34px;
  width: auto;
  display: block;
}

.SB-TYPE {
  font-size: 9px;
  color: rgba(255, 255, 255, .28);
  letter-spacing: 1.2px;
  margin-top: 2px;
}

.SB-NAV {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.18) transparent;
}

.NL {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, .2);
  padding: 12px 20px 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.NI {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255, 255, 255, .45);
  border-left: 3px solid transparent;
  font-size: 13px;
  transition: all .15s;
  text-decoration: none;
}

.NI:hover {
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .04);
}

.NI.ac {
  color: #38bdf8;
  background: rgba(56, 189, 248, .08);
  border-left-color: #38bdf8;
  font-weight: 500;
}

.NI i {
  font-size: 16px;
}

.SB-FOOT {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.UA-ROW {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.UA {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(56, 189, 248, .18);
  border: 1.5px solid rgba(56, 189, 248, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 700;
  flex-shrink: 0;
}

.UN {
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  font-weight: 600;
}

.UR {
  font-size: 10px;
  color: #38bdf8;
  font-weight: 500;
}

.ROLE-BADGE {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  color: #38bdf8;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
}

.BTN-LOGOUT {
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .5);
  padding: 8px;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.BTN-LOGOUT:hover {
  background: rgba(220, 38, 38, .15);
  border-color: rgba(220, 38, 38, .3);
  color: #fca5a5;
}

/* Main Area */
.MA {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f0f9ff;
}

.TB {
  background: #fff;
  border-bottom: 1.5px solid #e0f2fe;
  padding: 0 20px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.TB-T {
  font-size: 15px;
  font-weight: 600;
  color: #0c1a2e;
}

.TB-R {
  display: flex;
  align-items: center;
  gap: 8px;
}

.TB-CHIP {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #bae6fd;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.TB-IB {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 0.2s;
}

.TB-IB:hover {
  background: #f8fafc;
  color: #0c1a2e;
}

.CA {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 165, 233, 0.25) transparent;
}

/* ── UI COMPONENTS ── */
.KROW {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.KC {
  background: #fff;
  border: 1.5px solid #e0f2fe;
  border-radius: 11px;
  padding: 14px;
  border-top: 3px solid #0ea5e9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.KC-L {
  font-size: 10px;
  color: #64748b;
  letter-spacing: .6px;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.KC-V {
  font-size: 22px;
  font-weight: 700;
  color: #0c1a2e;
  line-height: 1;
}

.KC-D {
  font-size: 11px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.up {
  color: #059669;
}

.dn {
  color: #dc2626;
}

/* Card Container */
.CC {
  background: #fff;
  border: 1.5px solid #e0f2fe;
  border-radius: 11px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.CC-H {
  font-size: 13px;
  font-weight: 600;
  color: #0c1a2e;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.CC-H span {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 400;
}

.CROW {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .CROW {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.TBL-CONTAINER {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0f2fe;
}

.TBL {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.TBL th {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 10px 12px;
  border-bottom: 1.5px solid #e0f2fe;
  background: #f8fafc;
  text-transform: uppercase;
}

.TBL td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f9ff;
  font-size: 12.5px;
  color: #0c1a2e;
  vertical-align: middle;
  background: #fff;
}

.TBL tr:hover td {
  background: #f8fafc;
}

/* Actions in tables */
.TACT {
  display: flex;
  gap: 5px;
}

.TEB {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
}

.t-edit {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.t-edit:hover {
  background: #0ea5e9;
  color: #fff;
}

.t-del {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.t-del:hover {
  background: #dc2626;
  color: #fff;
}

.t-view {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.t-view:hover {
  background: #166534;
  color: #fff;
}

/* Status Badges */
.badge {
  display: inline-flex;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 500;
  line-height: 1;
}

.b-sale, .b-active, .b-success {
  background: #e0f2fe;
  color: #075985;
}

.b-rent, .b-active-green {
  background: #f0fdf4;
  color: #166534;
}

.b-off, .b-pending, .b-warning {
  background: #fef3c7;
  color: #92400e;
}

.b-hot, .b-suspended, .b-danger {
  background: #fee2e2;
  color: #991b1b;
}

.b-done, .b-registered, .b-info {
  background: #dcfce7;
  color: #166534;
}

/* ── FORMS, INPUTS & MODALS ── */
.ROW-TOP {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.RT-L {
  font-size: 14px;
  font-weight: 600;
  color: #0c1a2e;
}

.RT-S {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.RT-R {
  display: flex;
  align-items: center;
  gap: 8px;
}

.SRCH {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #e0f2fe;
  border-radius: 8px;
  padding: 5px 10px;
  width: 200px;
}

.SRCH input {
  border: none;
  outline: none;
  font-size: 12px;
  color: #0c1a2e;
  background: transparent;
  width: 100%;
}

.ADD-BTN, .BTN-SKY {
  background: #0ea5e9;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.2s;
}

.ADD-BTN:hover, .BTN-SKY:hover {
  background: #0284c7;
}

.BTN-OUT {
  background: #fff;
  color: #334155;
  border: 1.5px solid #e0f2fe;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: all 0.2s;
}

.BTN-OUT:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.BTN-DEL {
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.2s;
}

.BTN-DEL:hover {
  background: #fee2e2;
}

.FI {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e0f2fe;
  border-radius: 8px;
  font-size: 12px;
  color: #0c1a2e;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s;
}

.FI:focus {
  border-color: #0ea5e9;
  background: #fff;
}

.FG2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 576px) {
  .FG2 {
    grid-template-columns: 1fr;
  }
}

.FG3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.RT-CHIP {
  padding: 6px 10px;
  border: 1.5px solid #e0f2fe;
  border-radius: 7px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  text-align: center;
  background: #f8fafc;
  transition: all 0.2s;
  user-select: none;
}

.RT-CHIP.sel {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}

/* Modals */
.MOD-BG {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(12, 26, 46, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

.MOD {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  border: 1.5px solid #bae6fd;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.MH {
  background: #0c1a2e;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.MH-T {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.MH-S {
  font-size: 10px;
  color: #38bdf8;
  margin-top: 1px;
}

.MX {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, .12);
  transition: all 0.2s;
}

.MX:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.MB {
  padding: 16px 18px;
  overflow-y: auto;
}

.MF {
  padding: 12px 18px 16px;
  border-top: 1px solid #f0f9ff;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.TOAST {
  position: relative;
  background: #0ea5e9;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 10px;
  display: none;
}

.TOAST.show {
  display: block;
}

.TOAST.err {
  background: #dc2626;
}

/* Validation Errors */
.text-danger {
  color: #dc2626 !important;
  font-size: 11px;
  margin-top: 4px;
  display: block;
}

/* Custom form grid toggles */
.switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #334155;
}

.switch-input {
  cursor: pointer;
}