* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, Segoe UI, Roboto, sans-serif; background: #f4f5f7; color: #1a1a1a; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #0e2537; }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 320px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.login-box h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-box .subtitle { color: #888; font-size: 0.85rem; margin-bottom: 24px; }
.login-box input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; }
.login-box button { width: 100%; padding: 10px; background: #0f7c5f; color: #fff; border: none; border-radius: 6px; font-size: 0.95rem; cursor: pointer; }
.login-box button:disabled { background: #aaa; cursor: not-allowed; }
.alert-error { background: #fee2e2; color: #b91c1c; padding: 8px; border-radius: 6px; margin-bottom: 12px; font-size: 0.85rem; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0e2537; color: #fff; padding: 24px 16px; display: flex; flex-direction: column; }
.sidebar h2 { font-size: 1.1rem; margin-bottom: 24px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a { color: #cbd5e1; text-decoration: none; padding: 10px 12px; border-radius: 6px; font-size: 0.9rem; }
.sidebar nav a:hover { background: #17384f; }
.sidebar nav a.active { background: #0f7c5f; color: #fff; }
.sidebar .logout { color: #f87171; text-decoration: none; font-size: 0.85rem; padding: 10px 12px; }
.content { flex: 1; padding: 32px; }
.content h1 { font-size: 1.4rem; margin-bottom: 12px; }

.card { background: #fff; border-radius: 10px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card h2 { font-size: 1.05rem; margin-bottom: 16px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card label { display: block; font-size: 0.82rem; color: #555; margin-bottom: 4px; margin-top: 10px; }
.card input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; }
.card button { margin-top: 16px; padding: 9px 16px; background: #0f7c5f; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table th, table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; color: #fff; }
.badge-php { background: #2b6cb0; }
.badge-proxy { background: #0f9b8e; }
.btn-danger-sm { background: #fee2e2; color: #b91c1c; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.muted { color: #999; font-size: 0.9rem; }
.alert-success { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #b91c1c; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }

.status-on { color: #16a34a; font-weight: 600; }
.status-off { color: #dc2626; font-weight: 600; }
.btn-link { display: inline-block; margin-top: 14px; padding: 8px 14px; background: #0f7c5f; color: #fff; text-decoration: none; border-radius: 6px; font-size: 0.88rem; }

.checkbox-label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.85rem; color: #444; }
.checkbox-label input { width: auto; margin: 0; }

.btn-link-sm { background: none; border: none; color: #0f7c5f; text-decoration: underline; cursor: pointer; font-size: 0.82rem; padding: 0; }

/* ===== Responsive Mobile ===== */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 10px 12px;
    white-space: nowrap;
  }
  .sidebar h2 { display: none; }
  .sidebar nav {
    flex-direction: row;
    flex: none;
    gap: 6px;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  .sidebar .logout { margin-left: 10px; white-space: nowrap; padding: 8px 10px; }
  .brand span { display: none; }
  .brand { margin-bottom: 0; margin-right: 10px; }
  .content { padding: 16px; }
  .content h1 { font-size: 1.2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .table-wrap table { white-space: nowrap; }
}

.pw-wrap { display: inline-flex; align-items: center; gap: 6px; font-family: monospace; font-size: 0.85rem; }
.pw-mask { letter-spacing: 1px; }
.pw-eye, .pw-copy { text-decoration: none; cursor: pointer; font-size: 0.9rem; }


/* ===== UI Revamp: Domain chips, table polish ===== */
table th {
    background: #f8f9fb;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}
table tbody tr:hover { background: #fafbfc; }
table tbody tr { transition: background 0.15s; }

.domain-list { display: flex; flex-direction: column; gap: 5px; }
.domain-primary { font-weight: 600; color: #0e2537; }
.domain-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #e3f5ec; color: #0b6149;
    padding: 3px 8px; border-radius: 12px;
    font-size: 0.76rem; width: fit-content;
}
.domain-chip .remove-x {
    cursor: pointer; color: #b91c1c; font-weight: 700;
    text-decoration: none; line-height: 1; font-size: 0.9rem;
}
.domain-add-inline { display: flex; gap: 4px; margin-top: 4px; }
.domain-add-inline input[type=text] {
    padding: 4px 8px; font-size: 0.76rem;
    border: 1px solid #ddd; border-radius: 12px; width: 120px;
}
.btn-icon-sm {
    background: #0f7c5f; color: #fff; border: none; border-radius: 6px;
    width: 26px; height: 26px; cursor: pointer; font-size: 0.9rem;
    line-height: 1; flex-shrink: 0;
}
.btn-icon-sm:hover { background: #0b6149; }

.ssl-cell { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.ssl-cell .btn-link-sm { white-space: normal; text-align: left; max-width: 130px; }

.card-grid { align-items: start; }

/* ===== WasilahHub branding ===== */
:root { --wh-navy: #0e2537; --wh-green: #0f7c5f; --wh-green-light: #4bc467; }
.login-body { background: linear-gradient(160deg, #0e2537 0%, #0f4c4a 100%); }
.login-box { width: 360px; max-width: 92vw; }
.login-logo { width: 220px; max-width: 80%; height: auto; margin-bottom: 4px; }
.login-box .subtitle { color: #5b6b7a; margin-bottom: 20px; }
.login-box button { background: var(--wh-green); }
.login-box button:hover:not(:disabled) { background: #0b6149; }
.alert-success { margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.brand-icon { width: 38px; height: 38px; background: #fff; border-radius: 8px; padding: 3px; }
.brand div { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 1.05rem; }
.brand span { font-size: 0.68rem; color: #94a3b8; word-break: break-all; }
.sidebar form { margin: 0; }
.sidebar .logout { background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.full-select { width: 100%; padding: 8px; border-radius: 6px; border: 1px solid #ddd; }
.card input[type=password], .card input[type=email] { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; }
.cancel-link { display: block; margin-top: 10px; font-size: 0.85rem; color: #888; }
.btn-link-sm { color: var(--wh-green); }
.status-on { color: #138c63; }
