﻿:root {
  --oc-dark: #201d1d;
  --oc-light: #fdfcfc;
  --oc-gray: #9a9898;
  --oc-surface: #302c2c;
  --oc-surface-2: #262222;
  --oc-border: rgba(253, 252, 252, 0.14);
  --oc-border-warm: rgba(15, 0, 0, 0.12);
  --oc-outline: #646262;
  --oc-input: #f8f7f7;
  --oc-input-border: rgba(15, 0, 0, 0.12);
  --text-muted: #6e6e73;
  --accent: #007aff;
  --accent-hover: #0056b3;
  --accent-active: #004085;
  --danger: #ff3b30;
  --danger-hover: #d70015;
  --danger-active: #a50011;
  --success: #30d158;
  --warning: #ff9f0a;
  --warning-hover: #cc7f08;
  --warning-active: #995f06;
  --radius: 4px;
  --radius-input: 6px;
  --font-mono: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  background: var(--oc-dark);
  color: var(--oc-light);
  text-rendering: geometricPrecision;
}

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

button,
select {
  text-transform: none;
}

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

h1,
h2,
h3,
th {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.hero {
  border-bottom: 1px solid var(--oc-border);
  padding: 48px 16px 32px;
}

.hero__bg {
  display: none;
}

.hero__content {
  width: min(100%, 880px);
  margin: 0 auto;
}

.hero__eyebrow {
  margin: 0 0 16px;
  color: var(--oc-gray);
  font-size: 14px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  color: var(--oc-light);
  font-size: clamp(24px, 7vw, 38px);
  font-weight: 700;
  line-height: 1.5;
}

.hero__subtitle {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--oc-gray);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.hero__meta {
  margin: 24px 0 0;
  color: var(--oc-gray);
  font-size: 14px;
  line-height: 2;
}

.hero__meta::before {
  content: "$ ";
  color: var(--success);
}

.layout {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: grid;
  gap: 24px;
}

#loginBox {
  width: min(100%, 760px);
  margin-inline: auto;
}

.card {
  background: var(--oc-surface);
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h2 {
  margin: 0 0 24px;
  color: var(--oc-light);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.card h2::before {
  content: "./";
  color: var(--oc-gray);
  font-weight: 500;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.card__head h2 {
  margin: 0;
}

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

.grid-2 {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--oc-gray);
  font-size: 14px;
  font-weight: 400;
  line-height: 2;
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--oc-input-border);
  border-radius: var(--radius-input);
  padding: 14px 16px;
  color: var(--oc-dark);
  background: var(--oc-input);
  outline: none;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}

.actions {
  display: grid;
  gap: 12px;
}

.actions .btn {
  width: 100%;
}

.actions--wrap {
  grid-template-columns: 1fr;
}

.actions--dialog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.btn {
  min-height: 42px;
  border: 1px solid var(--oc-outline);
  border-radius: var(--radius);
  padding: 4px 20px;
  background: var(--oc-surface-2);
  color: var(--oc-light);
  font-size: 16px;
  font-weight: 500;
  line-height: 2;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--oc-dark);
  border-color: var(--oc-light);
}

.btn:active:not(:disabled) {
  background: #161313;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn--primary {
  background: var(--oc-dark);
  border-color: var(--oc-light);
  color: var(--oc-light);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--primary:active:not(:disabled) {
  background: var(--accent-active);
  border-color: var(--accent-active);
}

.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--oc-light);
}

.btn--danger:hover:not(:disabled) {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.btn--danger:active:not(:disabled) {
  background: var(--danger-active);
  border-color: var(--danger-active);
}

.btn--ghost {
  background: transparent;
  border-color: var(--oc-outline);
  color: var(--oc-gray);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--oc-light);
}

#previewFoto {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--oc-border);
  background: var(--oc-dark);
}

.location {
  background: var(--oc-surface-2);
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--oc-gray);
  font-size: 14px;
  line-height: 2;
}

.location p {
  margin: 0;
}

.location strong {
  color: var(--oc-light);
  font-weight: 700;
}

.notice {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  background: var(--oc-surface-2);
  color: var(--oc-light);
}

.notice::before {
  content: "warn: ";
  color: var(--warning);
  font-weight: 700;
}

.dashboard-filters {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-card {
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  background: var(--oc-surface-2);
  padding: 14px;
}

.stat-card span {
  display: block;
  color: var(--oc-gray);
  font-size: 12px;
  line-height: 1.5;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--oc-light);
  font-size: 24px;
  line-height: 1.2;
}

.table-shell {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  background: var(--oc-surface-2);
}

.table-shell--stats {
  margin-bottom: 24px;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--oc-border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

th {
  background: var(--oc-dark);
  color: var(--oc-gray);
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

td {
  color: var(--oc-light);
}

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

.badge {
  display: inline-block;
  border-radius: var(--radius);
  padding: 4px 8px;
  color: var(--oc-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.badge--ok {
  background: var(--success);
}

.badge--wait {
  background: var(--warning);
}

.badge--no {
  background: var(--danger);
  color: var(--oc-light);
}

.foto-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.foto-thumb:hover {
  border-color: var(--accent);
}

.muted {
  color: var(--oc-gray);
  font-size: 12px;
  line-height: 1.5;
}

.row-actions {
  display: grid;
  gap: 8px;
  min-width: 128px;
}

.row-actions .btn {
  width: 100%;
  white-space: nowrap;
}

#fotoDialog {
  width: min(92vw, 700px);
  border: 1px solid var(--oc-outline);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--oc-surface);
  color: var(--oc-light);
}

.app-dialog {
  width: min(92vw, 520px);
  border: 1px solid var(--oc-outline);
  border-radius: var(--radius);
  padding: 0;
  background: var(--oc-surface);
  color: var(--oc-light);
}

.app-dialog::backdrop {
  background: rgba(32, 29, 29, 0.86);
}

.app-dialog__box {
  padding: 24px;
}

.app-dialog h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
}

.app-dialog p {
  margin: 0;
  color: var(--oc-gray);
}

#fotoDialog::backdrop {
  background: rgba(32, 29, 29, 0.86);
}

#fotoDialogImg {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin-bottom: 16px;
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  background: var(--oc-dark);
}

code {
  border: 1px solid var(--oc-border);
  border-radius: var(--radius);
  padding: 1px 4px;
  background: var(--oc-surface-2);
  color: var(--oc-light);
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .hero {
    padding: 64px 24px 40px;
  }

  .layout {
    padding: 40px 24px 80px;
    gap: 32px;
  }

  .card {
    padding: 32px;
  }

  input,
  select {
    padding: 18px 20px;
  }

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

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

  .actions--wrap {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

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

@media (min-width: 1024px) {
  .hero {
    padding-top: 80px;
  }

  .layout {
    padding-bottom: 96px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 14px 28px;
  }

  .layout {
    padding-inline: 14px;
  }

  .card {
    padding: 20px;
  }

  .card__head {
    align-items: stretch;
  }

  .card__head .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .hero {
    padding-inline: 12px;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  .layout {
    width: 100%;
    padding: 24px 10px 56px;
    gap: 16px;
  }

  .card {
    padding: 16px;
  }

  #dashboardGuru {
    margin-inline: -10px;
    border-inline: 0;
  }

  .card h2,
  .card__head {
    margin-bottom: 16px;
  }

  .dashboard-filters {
    gap: 12px;
    margin-bottom: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card span {
    font-size: 11px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .table-shell--stats {
    margin-bottom: 16px;
  }

  .table-shell table,
  .table-shell thead,
  .table-shell tbody,
  .table-shell tr,
  .table-shell th,
  .table-shell td {
    display: block;
  }

  .table-shell table {
    min-width: 0;
  }

  .table-shell thead {
    display: none;
  }

  .table-shell tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--oc-border);
    border-radius: var(--radius);
    background: var(--oc-surface-2);
  }

  .table-shell td {
    display: grid;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid var(--oc-border);
    padding: 10px 12px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .table-shell td::before {
    content: attr(data-label);
    color: var(--oc-gray);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
  }

  .table-shell td:not([data-label]) {
    display: block;
  }

  .table-shell td:not([data-label])::before {
    content: none;
  }

  .table-shell td:last-child {
    border-bottom: 0;
  }

  .table-shell td[data-label="Aksi"] {
    display: block;
  }

  .table-shell td[data-label="Aksi"]::before {
    display: block;
    margin-bottom: 8px;
  }

  .row-actions {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .row-actions .btn {
    min-height: 38px;
    line-height: 1.6;
  }

  .foto-thumb {
    width: 72px;
    height: 72px;
  }
}
