/* Alama za Mtihani + Karatasi ya Alama — page additions only.
   Header, fonts and base colours come from ../style.css; the greens match Daftari. */
.alm-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 16px 80px; }
.alm-wrap h1 { margin: 0 0 6px; font-size: 26px; color: #24471f; }
.alm-intro { margin: 0 0 18px; color: #555; font-size: 14px; line-height: 1.5; }

.alm-card { background: #fff; border: 1px solid #d0dad4; border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.alm-card h2 { margin: 0 0 12px; font-size: 18px; color: #24471f; }
.alm-narrow { max-width: 420px; margin: 30px auto; }
.alm-field { margin-bottom: 12px; }
.alm-field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: #333; }
.alm-field input[type="text"], .alm-field input[type="password"], .alm-field select {
  width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #c5d1ca; border-radius: 9px;
  font-size: 16px; font-family: inherit; background: #fff;
}
.alm-btn {
  border-radius: 9px; padding: 11px 16px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit;
  background: #fff; color: #2d5a43; border: 2px solid #2d5a43; text-decoration: none; display: inline-block;
}
.alm-btn.primary { background: #315c2b; color: #fff; border-color: #315c2b; }
.alm-btn.danger { color: #9a3412; border: 1px solid #d9a58a; }
.alm-btn.plain { color: #555; border: 1px solid #c5d1ca; font-weight: 400; }
.alm-btn.small { padding: 7px 11px; font-size: 13px; border-width: 1px; }
.alm-btn.block { width: 100%; }
.alm-btn:disabled { background: #c5d1ca; color: #6b7a72; border-color: #c5d1ca; cursor: not-allowed; }
.alm-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.alm-err { color: #991b1b; font-size: 14px; margin: 8px 0 0; }
.alm-muted { color: #667; font-size: 13px; }

.alm-note { border-radius: 12px; padding: 13px 15px; margin-bottom: 14px; font-size: 14px; line-height: 1.45; }
.alm-note.green { background: #e8f0eb; border: 1px solid #bfd3c6; color: #24471f; }
.alm-note.amber { background: #fffbeb; border: 1px solid #f1deaa; color: #6b4e00; }
.alm-note.red { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alm-note.grey { background: #f3f6f4; border: 1px dashed #b7c6bd; color: #555; }

/* sheet + subject pickers */
.alm-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.alm-choice {
  text-align: left; cursor: pointer; border-radius: 12px; padding: 14px; font-size: 16px; line-height: 1.3;
  background: #fff; border: 1px solid #c5d1ca; color: #24471f; font-family: inherit; font-weight: 700;
}
.alm-choice:hover { border-color: #315c2b; background: #f6faf7; }
.alm-choice small { display: block; font-weight: 400; color: #556; font-size: 13px; margin-top: 4px; }
.alm-choice.done { background: #e8f0eb; }
.alm-choice.locked { opacity: .75; }
.alm-choice:disabled { cursor: not-allowed; background: #f3f4f6; color: #6b7280; border-style: dashed; }
.alm-choice:disabled:hover { border-color: #c5d1ca; background: #f3f4f6; }
.alm-mini { height: 6px; border-radius: 9px; background: #e2e8e4; overflow: hidden; margin-top: 8px; }
.alm-mini > i { display: block; height: 100%; background: #315c2b; }

/* entry screen */
.alm-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.alm-top h1 { font-size: 22px; }
.alm-subject-chip { display: inline-block; background: #315c2b; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; vertical-align: middle; }
.alm-count { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.alm-count strong.big { font-size: 18px; color: #24471f; }
.alm-count.full strong.big { color: #166534; }
.alm-bar { flex: 1 1 100%; height: 10px; border-radius: 9px; background: #e2e8e4; overflow: hidden; }
.alm-bar > i { display: block; height: 100%; background: #315c2b; transition: width .3s; }
.alm-search {
  width: 100%; box-sizing: border-box; padding: 14px 16px; border: 2px solid #315c2b; border-radius: 12px;
  font-size: 17px; font-family: inherit; margin-bottom: 12px; background: #fff;
}
.alm-scroll { overflow-x: auto; background: #fff; border: 1px solid #d0dad4; border-radius: 12px; }
.alm-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; }
.alm-table th { background: #2d5a43; color: #fff; text-align: left; padding: 11px 10px; white-space: nowrap; font-size: 13px; }
.alm-table td { padding: 8px 10px; border-bottom: 1px solid #e2e8e4; vertical-align: middle; white-space: nowrap; }
.alm-table td.sn { color: #667; width: 40px; }
.alm-table .name { position: sticky; left: 0; background: #fff; font-weight: 600; white-space: normal; min-width: 150px; max-width: 240px; z-index: 1; }
.alm-table th.name { background: #2d5a43; z-index: 2; }
.alm-table th.mine { background: #b45309; }
.alm-table td.mine { background: #fffbeb; }
.alm-table td.other { color: #556; text-align: center; font-size: 14px; }
.alm-table td.other.empty { color: #c0c8c3; }
.alm-mark {
  width: 74px; box-sizing: border-box; padding: 9px 8px; border: 2px solid #c5d1ca; border-radius: 8px;
  font-size: 17px; font-family: inherit; text-align: center; font-weight: 700; background: #fff;
}
.alm-mark:focus { border-color: #315c2b; outline: none; box-shadow: 0 0 0 3px rgba(49, 92, 43, .2); }
.alm-mark.bad { border-color: #dc2626; background: #fef2f2; }
.alm-mark:disabled { background: #f3f4f6; color: #555; }
.alm-state { display: inline-block; width: 22px; text-align: center; font-size: 15px; margin-left: 4px; }
.alm-state.ok { color: #15803d; }
.alm-state.wait { color: #b45309; }
.alm-state.err { color: #dc2626; }
.alm-empty { margin: 0; padding: 26px; text-align: center; color: #555; }

/* admin progress table */
.alm-prog { width: 100%; border-collapse: collapse; font-size: 14px; }
.alm-prog td { padding: 7px 6px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.alm-prog { table-layout: fixed; min-width: 520px; }
.alm-prog td:first-child { width: 26%; }
.alm-prog td:nth-child(2) { width: 12%; }
.alm-prog td.bar { width: 34%; }
.alm-prog td:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alm-prog .alm-bar { height: 8px; }
.alm-badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.alm-badge.open { background: #e8f0eb; color: #24471f; }
.alm-badge.locked { background: #fde68a; color: #6b4e00; }
.alm-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: #7f1d1d; max-height: 140px; overflow-y: auto; }

/* Kazi za Likizo (likizo-walimu.js) */
.lk-forms { margin-bottom: 14px; }
.lk-text { width: 100%; box-sizing: border-box; min-height: 96px; padding: 12px; border: 1px solid #c5d1ca; border-radius: 9px; font-size: 16px; font-family: inherit; resize: vertical; }
.lk-file { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #c5d1ca; border-radius: 9px; background: #fff; font-size: 15px; }
.lk-bar { margin-bottom: 12px; }
.lk-item { padding: 14px 0; border-top: 1px solid #e2e8e4; }
.lk-item:first-child { border-top: 0; padding-top: 0; }
.lk-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 4px; }
.lk-head strong { color: #24471f; font-size: 16px; }
.lk-instr { margin: 8px 0 0; font-size: 14px; color: #444; line-height: 1.55; white-space: pre-line; }
.lk-replace { cursor: pointer; }
.lk-count { font-weight: 400; opacity: .85; }
/* Kazi za Likizo admin page (likizo-admin.js) */
.lka-section { margin: 22px 0 10px; font-size: 18px; color: #24471f; }
.lka-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lka-tile { background: #f6faf7; border: 1px solid #d0dad4; border-radius: 12px; padding: 12px; text-align: center; }
.lka-tile strong { display: block; color: #24471f; font-size: 14px; }
.lka-tile .n { display: block; font-size: 28px; font-weight: 800; color: #315c2b; line-height: 1.2; margin: 4px 0 2px; }
.lka-tile small { color: #667; font-size: 12px; }
@media (max-width: 600px) { .lka-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.alm-likizo-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 14px 16px; margin: 18px 0 0; color: #7c2d12; font-size: 14px; }

.alm-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #24471f; color: #fff;
  padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  max-width: 90%; z-index: 80;
}
.alm-toast.bad { background: #991b1b; }

@media (max-width: 600px) {
  .alm-wrap { padding: 16px 12px 70px; }
  .alm-wrap h1 { font-size: 22px; }
  .alm-table .name { min-width: 120px; max-width: 150px; font-size: 14px; }
}
