/* SIP OIMS - lightweight admin styling (no framework, fast load) */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
       background: #f4f6f8; color: #1f2933; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: #6b7280; }

.topnav { display: flex; align-items: center; gap: 18px; background: #111827; color: #fff;
          padding: 0 20px; height: 52px; }
.topnav .brand { font-weight: 700; margin-right: 10px; }
.topnav a { color: #d1d5db; padding: 4px 2px; }
.topnav a.active, .topnav a:hover { color: #fff; text-decoration: none; border-bottom: 2px solid #60a5fa; }
.topnav .spacer { flex: 1; }
.topnav .user { color: #9ca3af; }
.inline-form { display: inline; }

.container { max-width: 1200px; margin: 20px auto; padding: 0 16px; }

.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
        padding: 16px; margin-bottom: 16px; }
.card h2 { border-bottom: 1px solid #eef1f4; padding-bottom: 8px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 8px 10px; border-bottom: 1px solid #eef1f4; text-align: left; }
table.tbl th { background: #f9fafb; font-weight: 600; white-space: nowrap; }
table.tbl tr.clickable { cursor: pointer; }
table.tbl tr.clickable:hover { background: #f3f7ff; }

label { display: block; margin: 8px 0 3px; font-weight: 600; font-size: 13px; }
input[type=text], input[type=number], input[type=date], input[type=password],
input[type=email], input[type=url], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: #60a5fa; }
.checkbox-line { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.checkbox-line label { margin: 0; font-weight: 500; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > div { flex: 1; min-width: 140px; }

.btn { display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid transparent;
       font-size: 14px; cursor: pointer; background: #e5e7eb; color: #1f2933; }
.btn:hover { filter: brightness(0.96); }
.btn-primary { background: #2563eb; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-danger  { background: #dc2626; color: #fff; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-link { background: none; border: none; color: #93c5fd; cursor: pointer; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge-placed     { background: #dbeafe; color: #1d4ed8; }
.badge-processing { background: #fef3c7; color: #b45309; }
.badge-delivered  { background: #dcfce7; color: #15803d; }
.badge-other      { background: #e5e7eb; color: #374151; }

.toast { position: fixed; top: 64px; right: 20px; z-index: 50; background: #111827; color: #fff;
         padding: 10px 16px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.toast.error { background: #b91c1c; }

.alert { padding: 9px 12px; border-radius: 6px; margin-bottom: 12px; }
.alert-error { background: #fee2e2; color: #b91c1c; }

.kv { display: grid; grid-template-columns: 180px 1fr; row-gap: 5px; }
.kv dt { font-weight: 600; color: #4b5563; }
.kv dd { margin: 0; }

.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar > div { min-width: 180px; }
.pager { margin-top: 12px; display: flex; gap: 8px; align-items: center; }

/* login */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #111827; }
.login-card { background: #fff; border-radius: 10px; padding: 30px 34px; width: 340px; }
.login-card h1 { text-align: center; }
.login-card .muted { text-align: center; margin-top: -6px; }
.btn-block { width: 100%; margin-top: 16px; }

.section-note { font-size: 12px; color: #6b7280; margin: 4px 0 8px; }
.hidden { display: none; }
