:root {
  --bs-primary: #0f5c5c !important;
  --bs-focus-ring-color: #0f5c5c !important;
  --bs-form-control-focus-border-color: #0f5c5c !important;
}

body {
  background-color: #f1f5f5;
  min-height: 100vh;
  overflow-x: hidden;
}

.blob-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: #cce9e940;
  top: -150px;
  left: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: #99d3d350;
  bottom: -100px;
  right: -80px;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: #0f5c5c40;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  display: flex;
  width: 900px;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px #0f5c5c;
}

.login-right {
  background: #0f5c5c;
  padding: 48px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-right h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.login-right p.subtitle {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-right .form-control {
  border-radius: 8px;
  border: 1.5px solid white;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.login-right .form-control:focus {
  border-color: white;
  box-shadow: 0 0 0 3px #0f5c5c;
}

.login-right .form-floating label {
  color: black;
}

.btn-login {
  background-color: #557e7e;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition:
    background-color 0.2s,
    transform 0.1s;
  width: 100%;
  color: white;
}

.btn-login:hover {
  background-color: #338585;
  color: white;
  transform: translateY(-1px);
}

.login-left {
  background: white;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  text-align: center;
  color: #0f5c5c;
}

.login-left h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.login-left .tagline {
  font-size: 1rem;
  opacity: 0.8;
  font-style: italic;
  line-height: 1.6;
  max-width: 240px;
}

.login-left .divider {
  width: 48px;
  height: 4px;
  background: #0f5c5c;
  border-radius: 2px;
  margin: 20px auto;
}

#login-form input,
#login-form button {
  pointer-events: none;
  opacity: 0.5;
}

.custom-navbar {
  background-color: #0f5c5c;
  min-height: 60px;
  font-size: 16px;
}

.custom-navbar .navbar-brand {
  color: white !important;
  font-size: 20px;
}

.custom-navbar .nav-link {
  color: white !important;
  padding: 10px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.custom-navbar .nav-link:hover {
  color: #d9f99d !important;
}

.custom-navbar .nav-link:focus,
.custom-navbar .nav-link:active {
  background-color: #0f5c5c !important;
  color: white !important;
}

.custom-navbar .dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
}

.custom-navbar .dropdown-item {
  transition: all 0.3s ease;
}

.custom-navbar .dropdown-item:hover {
  background-color: #0f5c5c;
  color: white;
}

.custom-toggler {
  border: none;
  background-color: #0f5c5c;
  padding: 8px 10px;
}

.custom-toggler:focus {
  box-shadow: none;
}

.card-body {
  background-color: #0f5c5c;
  color: white;
  border-radius: 8px;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #d9f99d;
  color: white;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  font-size: 30px;
  margin: auto;
}

.card-body .text-muted {
  color: white !important;
}

.form-control {
  padding: 4px 8px;
  font-size: small;
  height: auto;
}

.btn-primary {
  background-color: #557e7e;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: small;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition:
    background-color 0.2s,
    transform 0.1s;
  width: 100%;
  color: white;
}

.btn-primary:hover {
  background-color: #338585;
  color: white;
  transform: translateY(-1px);
}

input.form-control:focus,
textarea.form-control:focus,
select.form-select:focus {
  border-color: #0f5c5c !important;
  box-shadow: 0 0 0 0.2rem #0f5c5c !important;
}

.select option:checked {
  background-color: #0f5c5c !important;
  color: white !important;
}

.select2-search__field {
  outline: none !important;
}

.select2-container--default .select2-selection--single:focus {
  border-color: #0f5c5c !important;
}

.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #0f5c5c !important;
  box-shadow: 0 0 0 0.2rem #0f5c5c !important;
}

.select2-results__option--highlighted {
  background-color: #0f5c5c !important;
  color: white !important;
}

.select2-container .select2-selection--single {
  height: 29px !important;
  border: 1px solid #d3d3d3 !important;
  border-radius: 0.25rem !important;
}

.select2-container .select2-selection__rendered {
  line-height: 29px !important;
  padding-left: 8px !important;
  font-size: 0.875rem !important;
}

.select2-container .select2-selection__arrow {
  height: 29px !important;
}

.select2-container {
  width: 100% !important;
}

.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above {
  position: absolute !important;
}

.dataTables_wrapper .dataTables_length select {
  border: 1px solid #ced4da !important;
  border-radius: 8px !important;
  padding: 4px 28px 4px 8px !important;
  font-size: small;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: #0f5c5c !important;
  box-shadow: 0 0 0 0.2rem rgba(15, 92, 92, 0.2) !important;
  outline: none;
}

table.dataTable thead th {
  background-color: #0f5c5c !important;
  color: white !important;
  font-weight: 600;
  font-size: small;
  text-align: center !important;
  vertical-align: middle !important;
}

table.dataTable tbody td {
  padding: 2px;
  vertical-align: middle !important;
  font-size: small;
  text-align: center;
}

table.dataTable tbody tr:hover {
  background-color: #eef7f7 !important;
  transition: 0.2s ease;
}

table.dataTable {
  border: 1px solid #dbe5e5;
  border-radius: 12px;
  overflow: hidden;
}

.dataTables_paginate .paginate_button .page-link {
  font-size: small !important;
  border: none !important;
  border-radius: 8px !important;
  background-color: #0f5c5c !important;
  margin: 0 4px !important;
  color: white;
}

.dataTables_wrapper .dataTables_info {
  color: #555;
  font-size: small;
}

#downtimeTable th {
  background-color: #0f5c5c;
  color: white;
  text-align: center;
  vertical-align: middle;
  font-size: small;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-edit {
  background-color: #d1ffff;
  color: #0f5c5c;
}

.btn-edit:hover {
  background-color: #0f5c5c;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(26, 232, 146, 0.4);
}

.btn-delete {
  background-color: #fdecea;
  color: #e53935;
}

.btn-delete:hover {
  background-color: #e53935;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}

.btn-action .tooltip-label {
  visibility: hidden;
  opacity: 0;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.btn-action .tooltip-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #333;
}

.btn-action:hover .tooltip-label {
  visibility: visible;
  opacity: 1;
}

.action-group {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.info-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.info-card-header {
  background-color: #0f5c5c;
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 16px;
}

.info-card-body {
  padding: 8px 12px;
  background-color: white;
}

.info-table td {
  padding: 4px 4px;
  font-size: small;
  vertical-align: top;
  border: none;
  color: black;
}

.info-table td:first-child {
  font-weight: 600;
  width: 55%;
  color: black;
}

.info-table td:nth-child(2) {
  width: 5%;
  color: black;
}

.detail-table {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dee2e6;
}

.downtime-table {
  border-collapse: collapse;
  margin-bottom: 0;
}

.downtime-table thead th {
  background-color: #0f5c5c;
  font-size: small;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  border-color: #dee2e6;
  color: white;
}

.downtime-table tbody td {
  padding: 4px;
  font-size: 12px;
  vertical-align: middle;
  border-color: #dee2e6;
}

.downtime-table tbody tr:hover {
  background-color: #f0faf7;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: small;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.action-btn-edit {
  background-color: #ffbf00;
  color: #fff;
}
.action-btn-edit:hover {
  background-color: #e0a800;
  color: #fff;
}
.action-btn-delete {
  background-color: #dc3545;
  color: #fff;
}
.action-btn-delete:hover {
  background-color: #b02a37;
  color: #fff;
}
.action-btn-back {
  background-color: #6c757d;
  color: #fff;
}
.action-btn-back:hover {
  background-color: #565e64;
  color: #fff;
}
.action-btn-submit {
  background-color: #04aa6d;
  color: #fff;
}
.action-btn-submit:hover {
  background-color: #059862;
  color: #fff;
}

.form-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  max-width: 550px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.form-card-header {
  background-color: #0f5c5c;
  color: white;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 20px;
}

.form-card-body {
  padding: 16px 20px;
}

.form-card .form-label {
  font-size: small;
  font-weight: 600;
  color: black;
  margin-bottom: 4px;
}

.form-card .form-control {
  font-size: small;
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 4px 8px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-card .form-control:focus {
  border-color: #0f5c5c;
  box-shadow: 0 0 0 3px rgba(26, 107, 90, 0.15);
}

.btn-submit {
  background-color: #0f5c5c;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 28px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 6px;
}

.btn-submit:hover {
  background-color: #557e7e;
  box-shadow: 0 4px 10px rgba(26, 107, 90, 0.3);
  transform: translateY(-1px);
  color: white;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  border: 1px solid #e9ecef;
  height: 100%;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(15, 92, 92, 0.12);
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #212529;
  line-height: 1.2;
  margin-bottom: 4px;
}

.card-footer-text {
  margin: 0;
  color: #495057;
  font-size: 0.9rem;
}

.icon-shape {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background-color: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.03),
    0 2px 4px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.icon-shape img.card-icon-img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}

@media (min-width: 992px) {
  .custom-navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .login-container {
    flex-direction: column;
  }

  .login-left {
    padding: 32px 24px;
  }

  .login-left h2 {
    font-size: 1.5rem;
  }
}
