/* =========================================================
   排水工事ファイル管理システム - 共通スタイル
   ========================================================= */

:root {
  --brand-blue: #0b5ea8;
  --brand-blue-dark: #08406f;
  --brand-blue-light: #e8f2fb;
  --brand-accent: #f5a623;
  --text-main: #253238;
  --text-sub: #6b7b83;
  --border-color: #dde5ea;
  --danger: #e0453f;
  --success: #1c8a4f;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--text-main);
  background-color: #f4f7f9;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
}

.brand-logo-icon {
  background: rgba(255, 255, 255, 0.15);
}

/* ---------- Cards ---------- */
.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 94, 168, 0.08);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-active {
  background: var(--brand-blue);
  color: #fff;
}

.step-inactive {
  background: #e3ebf1;
  color: var(--text-sub);
}

/* ---------- Form elements ---------- */
label.field-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.required-tag {
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.optional-tag {
  background: #eef2f5;
  color: var(--text-sub);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.field-input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fff;
}

.field-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(11, 94, 168, 0.15);
}

.field-input.field-readonly,
.field-input.field-disabled {
  background: #f4f7f9;
  color: var(--text-sub);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.field-hint {
  color: var(--text-sub);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.input-invalid {
  border-color: var(--danger) !important;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.85rem 2.2rem;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 6px 16px rgba(11, 94, 168, 0.3);
}

.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #a9c2d6;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #fff;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.85rem 2.2rem;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background: var(--brand-blue-light);
}

/* ---------- Alert boxes ---------- */
.alert-box {
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  display: none;
}

.alert-error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f7c8c5;
}

.alert-success {
  background: #e9f7ef;
  color: var(--success);
  border: 1px solid #bfe6cf;
}

.alert-info {
  background: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  border: 1px solid #bcdcf3;
}

/* ---------- Demo email preview ---------- */
.demo-mail-box {
  background: #fffdf5;
  border: 1px dashed var(--brand-accent);
  border-radius: 10px;
}

.demo-mail-header {
  background: #fff4dd;
  border-bottom: 1px dashed var(--brand-accent);
}

.password-display {
  font-family: "Courier New", monospace;
  letter-spacing: 0.15em;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brand-blue-dark);
  background: var(--brand-blue-light);
  border: 1px solid #bcdcf3;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  display: inline-block;
}

/* ---------- Table (admin) ---------- */
.admin-table th {
  background: #eef4f9;
  color: var(--text-sub);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table td, .admin-table th {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

.status-pending {
  background: #fff4dd;
  color: #9a6a00;
}

.status-active {
  background: #e9f7ef;
  color: var(--success);
}

footer.site-footer {
  background: #17303f;
  color: #b9c8d1;
}
