:root {
  --ui-bg: #f4f7fb;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f8fbff;
  --ui-border: #d8e3f0;
  --ui-border-strong: #c3d3e6;
  --ui-text: #1c3550;
  --ui-text-soft: #607b98;
  --ui-primary: #279af0;
  --ui-primary-hover: #1789df;
  --ui-danger: #cf4d59;
  --ui-danger-soft: #fff5f6;
  --ui-success: #1e9d74;
  --ui-shadow: 0 10px 24px rgba(29, 55, 86, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}

a {
  color: #1f78b9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.container,
.container-fluid {
  width: 100%;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container {
  max-width: 1320px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

[class*="col-"],
.col {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
  .col-md-4 {
    width: 33.3333%;
  }
  .col-md-3 {
    width: 25%;
  }
}

@media (min-width: 992px) {
  .col-lg-6 {
    width: 50%;
  }
  .col-lg-4 {
    width: 33.3333%;
  }
  .col-lg-3 {
    width: 25%;
  }
}

.card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  box-shadow: var(--ui-shadow);
}

.card-body {
  padding: 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ui-surface);
}

.table th,
.table td {
  border-bottom: 1px solid #e4edf7;
  padding: 0.58rem 0.62rem;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f5f9ff;
  color: #48637d;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table tbody tr:hover td {
  background: #f8fbff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.82rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #54bbff 0%, #1f9fff 100%);
  border-color: #2e9ef0;
  color: #fff;
  box-shadow: 0 8px 16px rgba(34, 148, 235, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #43b2ff 0%, #1789df 100%);
  border-color: #1789df;
}

.btn-outline-secondary {
  background: #f8fbff;
  border-color: var(--ui-border-strong);
  color: #2e4967;
}

.btn-outline-secondary:hover {
  background: #edf5ff;
}

.btn-outline-danger {
  background: var(--ui-danger-soft);
  border-color: #e5c1c5;
  color: #8d3440;
}

.btn-outline-danger:hover {
  background: #ffeef0;
}

.btn-sm {
  padding: 0.35rem 0.64rem;
  font-size: 0.82rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid #c9d9eb;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ui-text);
  font: inherit;
  padding: 0.56rem 0.66rem;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px rgba(39, 154, 240, 0.15);
  outline: none;
}

label {
  color: #395572;
  font-size: 0.86rem;
  font-weight: 600;
}

.alert {
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-sm);
  padding: 0.66rem 0.76rem;
  background: #f8fbff;
}

.alert-danger {
  border-color: #efc4c8;
  color: #8f3641;
  background: #fff6f7;
}

.alert-info {
  border-color: #bfdff5;
  color: #245b83;
  background: #f2f9ff;
}

.text-muted {
  color: var(--ui-text-soft) !important;
}

.navbar {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  box-shadow: var(--ui-shadow);
}

.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #2c4765;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.68rem;
}

.nav-link:hover,
.nav-link.active {
  background: #eef6ff;
  border-color: #d3e3f4;
  text-decoration: none;
}

.dropdown-menu {
  min-width: 210px;
  margin-top: 0.35rem;
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--ui-shadow);
  padding: 0.35rem;
  display: none;
  z-index: 30;
}

.dropdown-menu .nav-link-dropdown,
.dropdown-menu a {
  display: block;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
}

.dropdown-menu .nav-link-dropdown:hover,
.dropdown-menu a:hover {
  background: #f4f9ff;
}

.collapse {
  display: block;
}

#page-footer {
  margin-top: 2rem;
  background: #16253a;
  color: #d4e2f0;
  padding: 1.5rem 1rem;
}

#page-footer a {
  color: #fff;
}

.icc-footer {
  background-color: #0f1f31;
  text-align: center;
}

.icc-footer img {
  margin-top: 4px;
  margin-bottom: 8px;
  height: 40px;
}

#carousel-9 .carousel-box {
  background-color: #96d3f0;
}

/* FE Login */
.tx-felogin-pi1,
.tx-felogin {
  max-width: 460px;
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.tx-felogin-pi1 h1,
.tx-felogin-pi1 h2,
.tx-felogin h1,
.tx-felogin h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #14314d;
}

.tx-felogin-pi1 form,
.tx-felogin form {
  display: grid;
  gap: 0.8rem;
}

.tx-felogin-pi1 input[type="submit"],
.tx-felogin-pi1 button[type="submit"],
.tx-felogin input[type="submit"],
.tx-felogin button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #2e9ef0;
  background: linear-gradient(135deg, #54bbff 0%, #1f9fff 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(34, 148, 235, 0.24);
}

.tx-felogin-pi1 input[type="submit"]:hover,
.tx-felogin-pi1 button[type="submit"]:hover,
.tx-felogin input[type="submit"]:hover,
.tx-felogin button[type="submit"]:hover {
  border-color: #1789df;
  background: linear-gradient(135deg, #43b2ff 0%, #1789df 100%);
}

.tx-felogin-pi1 .error,
.tx-felogin .error {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #efc2c5;
  background: #fff7f8;
  color: #8f3841;
  font-size: 0.86rem;
}

@media (max-width: 768px) {
  .container,
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .navbar-nav {
    flex-direction: column;
  }
}
