/* Elemen dasar, tata letak, komponen umum, dan tampilan mobile. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font:
    14px/1.5 'Segoe UI',
    Inter,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

button:hover {
  background: var(--soft);
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

button.primary {
  background: var(--lime);
  color: var(--accent-ink, #172820);
  border-color: transparent;
}

button.dark {
  background: var(--dark);
  color: #fff;
}

button.ghost {
  background: transparent;
  border-color: transparent;
}

button.danger {
  color: var(--red);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #7d9c3b;
  outline-offset: 3px;
}

a {
  color: #55782e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  letter-spacing: -1.3px;
  line-height: 1.15;
  margin-bottom: 10px;
}

h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin-bottom: 7px;
}

h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

.small,
small {
  font-size: 12px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: #83976a;
  margin-bottom: 12px;
}

.flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.between {
  justify-content: space-between;
}

.wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1;
}

.stack {
  display: grid;
  gap: 15px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.brand {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -1.6px;
  color: inherit;
}

.brand i {
  font-style: normal;
  color: var(--lime);
}

.mark {
  width: 38px;
  height: 38px;
  background: var(--lime);
  color: #203327;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 900;
  transform: rotate(-7deg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 235px;
  background: var(--dark);
  color: #bccbbf;
  display: flex;
  flex-direction: column;
  padding: 30px 18px;
  z-index: 40;
}

.sidebar .brand {
  color: white;
}

.workspace {
  margin: 30px 0 17px;
  padding: 13px 10px;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
}

.avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e5eccf;
  color: #40532d;
  object-fit: cover;
}

.sidebar nav {
  overflow: auto;
  flex: 1;
}

.nav-label {
  font-size: 9px;
  letter-spacing: 2px;
  margin: 18px 12px 9px;
  color: #809888;
}

.sidebar nav button {
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  justify-content: flex-start;
  margin: 2px 0;
  font-size: 12px;
  padding: 11px 13px;
  font-weight: 500;
}

.sidebar nav button.active {
  background: var(--lime);
  color: var(--accent-ink, #203327);
  font-weight: 700;
}

.sidebar nav button:hover:not(.active) {
  background: #ffffff0a;
  color: white;
}

.sidebar footer {
  border-top: 1px solid #ffffff16;
  padding-top: 17px;
  margin-top: 20px;
}

.app {
  margin-left: 235px;
}

.topbar {
  height: 76px;
  background: #ffffffcf;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search {
  width: 230px;
  background: #f5f7f1;
}

.crumb {
  color: var(--muted);
  font-size: 12px;
}

main {
  padding: 30px 36px 60px;
  max-width: 1700px;
  margin: auto;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 26px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.metric {
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 20px;
}

.metric.dark {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.metric .label {
  color: var(--muted);
  font-size: 11px;
}

.metric.dark .label,
.metric.dark small {
  color: #a8bba9;
}

.metric .number {
  font-size: 29px;
  letter-spacing: -1.2px;
  font-weight: 700;
  line-height: 1.2;
  margin: 16px 0 10px;
  overflow-wrap: anywhere;
}

.metric small {
  color: var(--muted);
  font-size: 10px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 23px;
  min-width: 0;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
  margin: 22px 0;
}

.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero {
  background: var(--soft);
  border: 1px solid #dfe7d1;
  border-radius: 16px;
  padding: 25px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

.hero p {
  color: #798765;
  margin: 0;
  font-size: 12px;
}

.hero-orbit {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid #bdcd9a;
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 0 0 12px #c9d8ad35;
}

.tag {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf3df;
  color: #5b752f;
  display: inline-block;
  white-space: nowrap;
}

.tag.red {
  background: #fbece8;
  color: #a74937;
}

.tag.blue {
  background: #eaf1f7;
  color: #4e7297;
}

.tag.amber {
  background: #fff2d9;
  color: #956b28;
}

.tag.gray {
  background: #f0f2ee;
  color: #748071;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.tabs button {
  white-space: nowrap;
  font-size: 12px;
}

.tabs .active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}

th {
  text-align: left;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

td {
  padding: 16px 12px;
  border-bottom: 1px solid #edf0e9;
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
}

tr:last-child td {
  border-bottom: 0;
}

td button {
  padding: 5px 9px;
  min-height: 30px;
  font-size: 11px;
}

.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
}

.empty b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 8px;
}

.board {
  display: grid;
  grid-template-columns: repeat(6, 250px);
  gap: 14px;
  overflow: auto;
  padding-bottom: 16px;
}

.column {
  background: #eaf0e5;
  border-radius: 13px;
  padding: 13px;
  min-height: 260px;
}

.column-head {
  font-weight: 650;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  margin: 3px 3px 16px;
}

.project-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e0e7d8;
  background: white;
  box-shadow: 0 3px 10px #20332704;
  border-radius: 11px;
  padding: 17px;
  margin: 11px 0;
  cursor: pointer;
}

.project-card h3 {
  font-size: 14px;
  white-space: normal;
}

.project-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 16px;
}

.project-card .flex {
  margin-top: 14px;
  justify-content: space-between;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0e9;
}

.row:last-child {
  border-bottom: 0;
}

.row p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.row .bubble {
  background: var(--soft);
  border-radius: 10px;
  padding: 9px;
  color: #829a54;
}

.row b {
  font-size: 12px;
}

.bar-chart {
  height: 180px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 20px 5px 30px;
}

.bar-pair {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.bar {
  width: 18px;
  border-radius: 5px 5px 0 0;
  background: var(--lime);
  min-height: 2px;
}

.bar.out {
  background: #dbe5d7;
}

.bar-pair span {
  position: absolute;
  bottom: -24px;
  font-size: 10px;
  color: var(--muted);
}

.notice {
  border: 1px solid #e8d8b2;
  background: #fff8e8;
  border-radius: 11px;
  padding: 13px 16px;
  font-size: 12px;
  color: #86692f;
  margin-bottom: 17px;
}

.notice.error {
  color: var(--red);
  background: #fff1ec;
  border-color: #ebc7bd;
}

.notice.demo {
  background: #eaf1df;
  border-color: #d8e3c5;
  color: #61793c;
  margin: 0;
  border-radius: 0;
  text-align: center;
  font-size: 11px;
}

.progress {
  height: 5px;
  background: #ecf0e5;
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}

.progress i {
  display: block;
  height: 100%;
  background: #acc669;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #6b7c6f;
  font-size: 11px;
}

.fields .wide {
  grid-column: 1/-1;
}

.fields label.check {
  flex-direction: row;
  align-items: center;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3d6;
  background: white;
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--ink);
  min-width: 0;
}

input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: #7e9e47;
}

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

select[multiple] {
  min-height: 95px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #b6ce7d;
}

dialog {
  width: min(850px, 95vw);
  max-height: 92vh;
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

dialog::backdrop {
  background: #13281dcc;
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

.dialog-head h2 {
  margin: 0;
}

.dialog-body {
  padding: 24px 25px;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 25px;
  border-top: 1px solid var(--line);
}

.detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.detail > div {
  background: #f2f5ec;
  border-radius: 11px;
  padding: 15px;
}

.detail small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.detail b {
  font-size: 18px;
}

.section-title {
  margin: 24px 0 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 2fr 0.65fr 1fr 0.8fr 36px;
  gap: 7px;
  margin-bottom: 8px;
}

.item-row input {
  font-size: 12px;
  padding: 9px;
}

.item-row button {
  padding: 4px;
}

.error-text {
  color: var(--red);
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 15px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.login-art {
  background: var(--dark);
  color: white;
  padding: 55px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.login-art h1 {
  font-size: clamp(38px, 4.3vw, 66px);
  line-height: 1.06;
  max-width: 550px;
  letter-spacing: -3px;
  margin: 50px 0 23px;
}

.login-art h1 span {
  color: var(--lime);
}

.login-art p {
  color: #b4c7b8;
  max-width: 400px;
}

.login-art small {
  color: #96ad9b;
}

.mini-preview {
  padding: 23px;
  background: #2c4437;
  border: 1px solid #6b876344;
  border-radius: 18px;
  margin: 32px 0;
  max-width: 470px;
  transform: rotate(-3deg);
}

.mini-preview .mini-stat {
  font-size: 32px;
  color: var(--lime);
  font-weight: 700;
  margin: 12px 0;
}

.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}

.login-form > div {
  width: 100%;
  max-width: 370px;
}

.login-form h2 {
  font-size: 29px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.login-form label {
  display: block;
  font-size: 12px;
  margin-top: 17px;
}

.login-form input {
  margin-top: 7px;
}

.login-form .primary {
  width: 100%;
  margin: 23px 0 15px;
}

.wizard {
  max-width: 760px;
  margin: 45px auto;
  padding: 25px;
}

.wizard .steps {
  display: flex;
  gap: 10px;
  margin: 28px 0;
}

.step {
  height: 5px;
  background: #dee6d5;
  flex: 1;
  border-radius: 3px;
}

.step.active {
  background: #8aaa47;
}

.profile-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-option {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
}

.profile-option:has(input:checked) {
  border-color: #8daa51;
  background: var(--soft);
}

.profile-option input {
  width: 17px;
  vertical-align: middle;
  margin-right: 8px;
}

.profile-option p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}

.mobile-menu,
.bottom-nav {
  display: none;
}

.scrim {
  display: none;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 20px;
  background: var(--dark);
  color: white;
  border-radius: 12px;
  z-index: 200;
  max-width: 90vw;
  box-shadow: var(--shadow);
}

#toast:empty {
  display: none;
}

.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}

.loading:before {
  content: '';
  display: block;
  width: 25px;
  height: 25px;
  border: 3px solid #e1e9d0;
  border-top-color: #8aaa47;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.calendar-list .row {
  align-items: flex-start;
}

.datebox {
  width: 45px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  flex-shrink: 0;
}

.datebox strong {
  font-size: 20px;
  display: block;
}

.datebox small {
  font-size: 9px;
  text-transform: uppercase;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
}

.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hide {
  display: none !important;
}

@media (max-width: 1150px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 210px;
  }

  .app {
    margin-left: 210px;
  }

  main {
    padding: 25px;
  }

  .topbar {
    padding: 0 25px;
  }

  .login-art {
    padding: 40px;
  }

  .detail {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 250px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    background: #10281b77;
    z-index: 35;
  }

  .app {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    height: 64px;
    padding: 0 16px;
  }

  .topbar .search,
  .topbar .connection {
    display: none;
  }

  main {
    padding: 23px 16px 100px;
  }

  .page-head {
    align-items: flex-start;
  }

  h1 {
    font-size: 27px;
  }

  .page-head .tools button {
    padding: 8px 10px;
    font-size: 11px;
  }

  .metrics {
    gap: 10px;
  }

  .metric {
    padding: 16px;
  }

  .metric .number {
    font-size: 24px;
  }

  .hero {
    padding: 20px;
  }

  .hero h2 {
    font-size: 20px;
  }

  .hero-orbit {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .panel {
    padding: 18px;
  }

  .equal {
    grid-template-columns: 1fr;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .fields .wide {
    grid-column: auto;
  }

  .detail b {
    font-size: 15px;
  }

  .dialog-body {
    padding: 20px;
  }

  .dialog-head {
    padding: 17px 20px;
  }

  .item-row {
    grid-template-columns: 1fr 1fr;
  }

  .item-row input:first-child {
    grid-column: 1/-1;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    padding: 25px;
    min-height: 210px;
  }

  .login-art h1 {
    font-size: 34px;
    letter-spacing: -1.5px;
    margin: 25px 0 15px;
  }

  .login-art p,
  .login-art .mini-preview,
  .login-art footer {
    display: none;
  }

  .login-form {
    padding: 32px 25px;
  }

  .wizard {
    margin: 15px auto;
    padding: 20px;
  }

  .profile-options {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-around;
    background: #ffffffed;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 8px 4px max(8px, env(safe-area-inset-bottom));
    z-index: 30;
  }

  .bottom-nav button {
    background: transparent;
    border: 0;
    flex-direction: column;
    font-size: 9px;
    padding: 3px 10px;
    gap: 3px;
  }

  .bottom-nav .active {
    color: #789c35;
  }

  #toast {
    bottom: 85px;
    right: 16px;
  }

  .crumb {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
