@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --plant-bg: #f4f7fb;
  --plant-surface: #ffffff;
  --plant-ink: #0f172a;
  --plant-muted: #64748b;
  --plant-line: #e8edf5;
  --plant-soft: #f3f6fb;
  --plant-blue: #3b82f6;
  --plant-blue-soft: #e8f1ff;
  --plant-green: #16a34a;
  --plant-red: #ef4444;
  --plant-side: 248px;
  --plant-radius: 16px;
}

body.plant-admin,
body.plant-admin #container {
  background: var(--plant-bg);
  color: var(--plant-ink);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.plant-admin h1,
body.plant-admin h2,
body.plant-admin h3,
body.plant-admin h4,
body.plant-admin h5,
body.plant-admin .plant-topbar-title {
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--plant-ink);
  letter-spacing: -0.02em;
}

/* Sidebar */
body.plant-admin #column-left {
  width: var(--plant-side);
  left: calc(var(--plant-side) * -1);
  background: var(--plant-surface);
  border-right: 1px solid var(--plant-line);
  padding-top: 0;
  z-index: 1040;
}

body.plant-admin #column-left.active {
  left: 0;
}

body.plant-admin .plant-side-brand {
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 22px;
  text-decoration: none;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

body.plant-admin .plant-admin-logo {
  height: 36px;
  width: auto;
  filter: brightness(0.58) contrast(1.35) saturate(1.6);
}

body.plant-admin #navigation {
  display: none;
}

body.plant-admin #menu {
  margin: 8px 14px 24px;
}

body.plant-admin #menu > li {
  border: 0;
  margin-bottom: 4px;
}

body.plant-admin #menu > li > a {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.plant-admin #menu > li > a > i {
  width: 18px;
  margin: 0;
  color: #64748b;
  font-size: 15px;
  text-align: center;
}

body.plant-admin #menu > li > a:hover {
  background: var(--plant-soft);
  color: var(--plant-ink);
}

body.plant-admin #menu > li.active > a {
  background: var(--plant-blue-soft);
  color: var(--plant-blue);
}

body.plant-admin #menu > li.active > a > i {
  color: var(--plant-blue);
}

body.plant-admin #menu > li > ul {
  background: transparent;
  padding: 4px 0 8px 34px;
}

body.plant-admin #menu li li a {
  color: #64748b;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
}

body.plant-admin #menu li li a:before {
  display: none;
}

body.plant-admin #menu li li a:hover,
body.plant-admin #menu li li.active > a {
  background: var(--plant-soft);
  color: var(--plant-blue);
}

body.plant-admin #stats {
  background: var(--plant-soft);
  color: var(--plant-muted);
  border-radius: 14px;
  margin: 12px 16px 24px;
  padding: 8px 0;
}

body.plant-admin #stats li {
  color: #64748b;
  border-bottom-color: #e6ebf3;
}

/* Top bar */
body.plant-admin #header.plant-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 72px;
  margin-left: var(--plant-side);
  width: calc(100% - var(--plant-side));
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--plant-line);
  box-shadow: none;
  padding: 0 8px 0 4px;
}

body.plant-admin #header.plant-topbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
  padding: 0 18px;
}

body.plant-admin .plant-topbar-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

body.plant-admin .plant-icon-btn,
body.plant-admin #nav-notification > .nav-link,
body.plant-admin #nav-language .nav-link {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 16px;
}

body.plant-admin .plant-icon-btn:hover,
body.plant-admin #nav-notification > .nav-link:hover,
body.plant-admin #nav-language .nav-link:hover {
  background: #e9eef6;
  color: var(--plant-ink);
}

body.plant-admin #header .navbar-nav {
  margin-left: 0;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

body.plant-admin #header .navbar-nav > li > .nav-link {
  color: #334155;
}

body.plant-admin #header .navbar-nav > li > .nav-link::after {
  display: none;
}

body.plant-admin #nav-notification .nav-link,
body.plant-admin #nav-language .nav-link,
body.plant-admin #nav-profile .nav-link,
body.plant-admin #nav-logout > .nav-link {
  line-height: 1;
  padding: 0 8px;
}

body.plant-admin #nav-notification > .nav-link .badge {
  top: 2px;
  right: 2px;
}

body.plant-admin .plant-search {
  margin-left: auto;
  position: relative;
  width: min(360px, 34vw);
}

body.plant-admin .plant-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
}

body.plant-admin .plant-search input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--plant-line);
  padding: 0 14px 0 38px;
  color: var(--plant-ink);
  font-size: 14px;
}

body.plant-admin .plant-search input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px #bfd4f5;
}

body.plant-admin .plant-user-link {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 4px !important;
  border-radius: 14px;
}

body.plant-admin .plant-user-link:hover {
  background: #e9eef6;
}

body.plant-admin .plant-user-link img {
  width: 36px;
  height: 36px;
  max-width: 36px;
  object-fit: cover;
}

body.plant-admin .plant-user {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

body.plant-admin .plant-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--plant-ink);
}

body.plant-admin .plant-user-role {
  font-size: 11px;
  color: var(--plant-muted);
  font-weight: 500;
}

body.plant-admin .dropdown-menu {
  border: 1px solid var(--plant-line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 8px;
}

body.plant-admin .dropdown-item {
  border-radius: 8px;
  font-size: 13px;
}

/* Content */
@media (min-width: 992px) {
  body.plant-admin #column-left {
    left: 0;
  }

  body.plant-admin #column-left + #content,
  body.plant-admin #column-left ~ #footer {
    margin-left: var(--plant-side);
    left: 0;
  }

  body.plant-admin #container.plant-nav-collapsed #column-left {
    left: calc(var(--plant-side) * -1);
  }

  body.plant-admin #container.plant-nav-collapsed #header.plant-topbar,
  body.plant-admin #container.plant-nav-collapsed #column-left + #content,
  body.plant-admin #container.plant-nav-collapsed #footer {
    margin-left: 0;
    width: 100%;
  }
}

body.plant-admin #content {
  padding: 6px 22px 28px;
  background: transparent;
}

body.plant-admin #footer {
  height: auto;
  padding: 8px 22px 28px;
  color: #94a3b8;
  font-size: 12px;
  background: transparent;
}

body.plant-admin .page-header {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
}

body.plant-admin .page-header .container-fluid {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 0;
}

body.plant-admin .page-header .float-end {
  float: none !important;
}

body.plant-admin .page-header h1,
body.plant-admin .breadcrumb {
  display: none;
}

body.plant-admin .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

body.plant-admin .plant-construction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--plant-line);
  border-radius: var(--plant-radius);
}

body.plant-admin .plant-construction.is-on {
  background: #fffaf3;
  border-color: #f3d7a1;
}

body.plant-admin .plant-construction-title {
  font-size: 16px;
  font-weight: 700;
}

body.plant-admin .plant-construction-help {
  margin: 4px 0 0;
  color: var(--plant-muted);
  font-size: 13px;
}

body.plant-admin .plant-construction-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

body.plant-admin .plant-construction-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

body.plant-admin .plant-construction-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}

body.plant-admin .plant-construction-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

body.plant-admin .plant-construction-switch input:checked + .plant-construction-track {
  background: #f59e0b;
}

body.plant-admin .plant-construction-switch input:checked + .plant-construction-track::after {
  transform: translateX(20px);
}

body.plant-admin .plant-construction-switch input:focus-visible + .plant-construction-track {
  outline: 2px solid var(--plant-blue);
  outline-offset: 2px;
}

body.plant-admin .plant-construction-state {
  min-width: 2.2em;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 640px) {
  body.plant-admin .plant-construction {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Cards and tables */
body.plant-admin .card,
body.plant-admin .plant-panel,
body.plant-admin .plant-stat {
  background: var(--plant-surface);
  border: 1px solid var(--plant-line);
  border-radius: var(--plant-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.plant-admin .card-header {
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  color: var(--plant-ink);
  font-weight: 600;
  font-size: 15px;
  padding: 16px 18px;
}

body.plant-admin .card-header > i {
  color: var(--plant-blue);
  margin-right: 8px;
}

body.plant-admin .card-body {
  padding: 16px 18px 18px;
}

body.plant-admin .table {
  margin-bottom: 0;
}

body.plant-admin .table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: #f1f5f9;
  color: #334155;
  padding: 14px 16px;
  font-size: 13px;
  vertical-align: middle;
}

body.plant-admin .table thead th {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}

body.plant-admin .plant-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--plant-green);
  font-weight: 600;
  font-size: 12px;
}

body.plant-admin .plant-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plant-green);
}

body.plant-admin .list-group-item {
  border-color: #f1f5f9;
  padding: 14px 18px;
  font-size: 13px;
}

/* Stat cards */
body.plant-admin .plant-stat {
  padding: 18px 18px 16px;
  min-height: 132px;
  margin-bottom: 0;
}

body.plant-admin .plant-stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.plant-admin .plant-stat-label {
  color: var(--plant-muted);
  font-size: 13px;
  font-weight: 600;
}

body.plant-admin .plant-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--plant-soft);
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

body.plant-admin .plant-stat-icon:hover {
  background: var(--plant-blue-soft);
  color: var(--plant-blue);
}

body.plant-admin .plant-stat-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--plant-ink);
}

body.plant-admin .plant-stat-delta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--plant-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

body.plant-admin .plant-stat-delta.is-up {
  color: var(--plant-green);
}

body.plant-admin .plant-stat-delta.is-down {
  color: var(--plant-red);
}

body.plant-admin .plant-stat-delta a {
  color: inherit;
  text-decoration: none;
}

body.plant-admin .plant-stat-delta a:hover {
  color: var(--plant-blue);
}

/* Forms and buttons */
body.plant-admin .form-control,
body.plant-admin .form-select {
  border-radius: 12px;
  border-color: var(--plant-line);
  background: #fff;
  min-height: 40px;
  font-size: 14px;
}

body.plant-admin .form-control:focus,
body.plant-admin .form-select:focus {
  border-color: #bfd4f5;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body.plant-admin .btn {
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
}

body.plant-admin .btn-primary {
  background: var(--plant-blue);
  border-color: var(--plant-blue);
}

body.plant-admin .btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

body.plant-admin .table .btn-primary {
  background: #fff;
  color: var(--plant-blue);
  border: 1px solid #d7e4fb;
}

body.plant-admin .table .btn-primary:hover {
  background: var(--plant-blue-soft);
}

body.plant-admin .btn-info,
body.plant-admin .btn-light,
body.plant-admin .btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid var(--plant-line);
}

body.plant-admin .btn-danger {
  background: #fff;
  color: var(--plant-red);
  border: 1px solid #fecaca;
}

body.plant-admin .pagination .page-link {
  border-radius: 10px;
  margin: 0 2px;
  border-color: var(--plant-line);
  color: #334155;
}

body.plant-admin .alert {
  border-radius: 14px;
}

body.plant-admin .modal-content {
  border: 0;
  border-radius: 18px;
}

body.plant-admin #vmap {
  height: 320px !important;
}

body.plant-admin .jqvmap-zoomin,
body.plant-admin .jqvmap-zoomout {
  width: 22px;
  height: 22px;
  line-height: 20px;
  border-radius: 7px;
  background: #e8eef6;
  color: #334155;
  left: 12px;
}

/* Login */
.plant-login-bar {
  display: none;
}

.plant-login-mark {
  display: flex;
  justify-content: center;
  margin: 56px 0 18px;
}

.plant-login-mark .plant-admin-logo {
  height: 46px;
  width: auto;
  filter: brightness(0.58) contrast(1.35) saturate(1.6);
}

.plant-login-bar .container-fluid {
  justify-content: center;
}

.plant-login-brand .plant-admin-logo {
  height: 48px;
  filter: brightness(0.58) contrast(1.35) saturate(1.6);
}

body:not(.plant-admin) {
  background: var(--plant-bg);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body:not(.plant-admin) #container {
  background: var(--plant-bg);
}

.plant-login {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.plant-login .card {
  border: 1px solid var(--plant-line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.plant-login .card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  padding: 16px 18px;
}

.plant-login .btn-primary {
  background: var(--plant-blue);
  border-color: var(--plant-blue);
  border-radius: 12px;
}

@media (max-width: 991.98px) {
  body.plant-admin #header.plant-topbar {
    margin-left: 0;
    width: 100%;
  }

  body.plant-admin .plant-search {
    display: none;
  }

  body.plant-admin .plant-topbar-title {
    font-size: 18px;
  }
}
