:root {
  --bg: #f7f5f1;
  --card: #ffffff;
  --text: #1d2731;
  --muted: #6b7280;
  --line: #d9dde3;
  --brand: #12344d;
  --accent: #a67c52;
  --success: #e7f6ec;
  --success-text: #185c37;
  --error: #fdecec;
  --error-text: #8a1f1f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--brand);
  color: #fff;
  padding: 18px 0;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.top-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav a,
.welcome {
  color: #fff;
}

.page-wrap {
  padding: 32px 0 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.auth-card {
  max-width: 520px;
  margin: 40px auto;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

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

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

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

.full-row {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
}

input,
select {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.btn:hover {
  opacity: 0.95;
  text-decoration: none;
}

.btn.secondary {
  background: var(--accent);
}

.btn.small {
  padding: 8px 12px;
  font-size: 0.95rem;
}

.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.alert.success {
  background: var(--success);
  color: var(--success-text);
}

.alert.error {
  background: var(--error);
  color: var(--error-text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

.folder-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.folder-year {
  margin: 16px 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.folder-month {
  margin: 14px 0 14px 14px;
}

.doc-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.site-footer {
  padding: 24px 0 40px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 800px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}