/**
 * TMS Public Portal Styles
 * Complements Tailwind CSS (loaded via CDN)
 */

.tms-public-portal { box-sizing: border-box; }
.tms-public-portal *, .tms-public-portal *::before, .tms-public-portal *::after {
    box-sizing: border-box;
}

/* Tab buttons */
.tms-tab-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.tms-tab-btn:hover {
    background: #f8fafc;
}
.tms-tab-active {
    background: #0ea5e9 !important;
    color: #fff !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

/* Card container */
.tms-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px;
}
@media (min-width: 768px) {
    .tms-card { padding: 32px; }
}

/* Form elements */
.tms-field { margin-bottom: 16px; }
.tms-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .tms-grid-2 { grid-template-columns: 1fr 1fr; }
}

.tms-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}

.tms-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tms-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* Ethiopian calendar enhancement for existing Gregorian date fields */
.tms-ethiopian-date-picker {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
}
.tms-ethiopian-date-source {
    display: none !important;
}
.tms-ethiopian-date-display {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 48px 10px 12px !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #172a35;
    font: inherit;
    cursor: pointer;
}
.tms-ethiopian-date-display[readonly] {
    background-color: #fff;
}
.tms-ethiopian-date-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #176b52;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}
.tms-ethiopian-date-toggle:hover,
.tms-ethiopian-date-toggle[aria-expanded="true"] {
    background: #e8f3ee;
    color: #10513f;
}
.tms-ethiopian-date-toggle svg {
    width: 20px;
    height: 20px;
}
.tms-ethiopian-calendar-help {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}
.tms-ethiopian-calendar[hidden] {
    display: none !important;
}
.tms-ethiopian-calendar {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    width: min(310px, calc(100vw - 40px));
    padding: 14px;
    border: 1px solid #d5e2dc;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 42, 34, .18);
    color: #172a35;
    animation: tms-calendar-in .16s ease-out;
}
.tms-ethiopian-calendar-heading {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    text-align: center;
}
.tms-ethiopian-calendar-month {
    font-size: 15px;
    font-weight: 750;
}
.tms-ethiopian-calendar-nav {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #e2e8e4;
    border-radius: 9px;
    background: #f7faf8;
    color: #176b52;
    cursor: pointer;
    font-family: inherit;
    font-size: 25px;
    line-height: 1;
}
.tms-ethiopian-calendar-nav:hover {
    border-color: #b7d4c7;
    background: #e8f3ee;
}
.tms-ethiopian-calendar-weekdays,
.tms-ethiopian-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    text-align: center;
}
.tms-ethiopian-calendar-weekdays {
    margin-bottom: 6px;
    color: #64746c;
    font-size: 11px;
    font-weight: 700;
}
.tms-ethiopian-calendar-weekdays span {
    padding: 5px 0;
}
.tms-ethiopian-calendar-days {
    grid-auto-rows: 36px;
}
.tms-ethiopian-calendar-day {
    display: grid;
    min-width: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #243b32;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.tms-ethiopian-calendar-day:hover {
    transform: translateY(-1px);
    border-color: #b7d4c7;
    background: #eef6f1;
}
.tms-ethiopian-calendar-day.is-selected {
    border-color: #176b52;
    background: #176b52;
    color: #fff;
    font-weight: 750;
    box-shadow: 0 3px 8px rgba(23, 107, 82, .2);
}
.tms-ethiopian-calendar-day:focus-visible,
.tms-ethiopian-calendar-nav:focus-visible,
.tms-ethiopian-date-toggle:focus-visible {
    outline: 3px solid rgba(226, 183, 100, .75);
    outline-offset: 2px;
}
@keyframes tms-calendar-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .tms-ethiopian-calendar {
        width: min(310px, calc(100vw - 48px));
        padding: 11px;
    }
}

/* Supervisor resource management */
.tms-resource-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.tms-resource-form, .tms-resource-list { min-width: 0; padding: 22px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.tms-resource-form h3, .tms-resource-list h3 { margin: 0 0 18px; color: #0f172a; font-size: 19px; }
.tms-resource-form .tms-button { margin-right: 8px; }
.tms-resource-files { padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; }
.tms-resource-files legend { padding: 0 5px; font-size: 14px; font-weight: 600; }
.tms-resource-files label { display: block; margin: 6px 0; overflow-wrap: anywhere; }
.tms-resource-cards { display: grid; gap: 12px; }
.tms-resource-card { min-width: 0; padding: 16px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.tms-resource-card h4 { margin: 8px 0; color: #0f172a; font-size: 16px; overflow-wrap: anywhere; }
.tms-resource-card p { margin: 6px 0; color: #475569; }
.tms-resource-category { display: inline-block; padding: 4px 9px; border-radius: 99px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 700; }
.tms-resource-downloads { margin: 10px 0; padding-left: 20px; overflow-wrap: anywhere; }
.tms-resource-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tms-resource-actions form { margin: 0; }
@media (max-width: 900px) {
    .tms-resource-layout { grid-template-columns: 1fr; }
}

/* Attachment picker */
.tms-upload { width: 100%; }
.tms-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.tms-upload-input:focus-visible + .tms-upload-dropzone {
    outline: 3px solid rgba(14, 165, 233, 0.28);
    outline-offset: 3px;
}
.tms-upload-dropzone {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 100px;
    padding: 18px;
    border: 1.5px dashed #94a3b8;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f9ff 100%);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tms-upload-dropzone:hover,
.tms-upload.is-dragging .tms-upload-dropzone {
    border-color: #0284c7;
    background: #e0f2fe;
    box-shadow: 0 8px 22px rgba(2, 132, 199, .11);
}
.tms-upload.is-dragging .tms-upload-dropzone { transform: scale(1.01); }
.tms-upload-icon {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 12px;
    color: #0284c7;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .07);
}
.tms-upload-icon svg { width: 25px; height: 25px; }
.tms-upload-copy { display: grid; flex: 1; gap: 4px; color: #64748b; font-size: 13px; }
.tms-upload-copy strong { color: #1e293b; font-size: 14px; font-weight: 650; }
.tms-upload-browse {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 9px;
    color: #fff;
    background: #0284c7;
    font-size: 12px;
    font-weight: 650;
    transition: background .2s ease;
}
.tms-upload-dropzone:hover .tms-upload-browse,
.tms-upload.is-dragging .tms-upload-browse { background: #0369a1; }
.tms-upload-meta { margin: 8px 2px 0; color: #64748b; font-size: 11px; }
.tms-upload-error {
    margin-top: 9px;
    padding: 9px 11px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: 12px;
}
.tms-upload-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.tms-upload-list:empty { display: none; }
.tms-upload-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    animation: tms-upload-in .18s ease-out;
}
.tms-upload-file-icon,
.tms-upload-thumb {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}
.tms-upload-thumb { object-fit: cover; }
.tms-upload-file-info { display: grid; flex: 1; min-width: 0; gap: 3px; }
.tms-upload-file-name { overflow: hidden; color: #1e293b; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tms-upload-file-size { color: #64748b; font-size: 10px; }
.tms-upload-remove {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.tms-upload-remove:hover { color: #b91c1c; background: #fee2e2; }
@keyframes tms-upload-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .tms-upload-dropzone { min-height: 88px; gap: 10px; padding: 12px; }
    .tms-upload-icon { flex-basis: 38px; width: 38px; height: 38px; }
    .tms-upload-copy strong { font-size: 12px; }
    .tms-upload-copy span { font-size: 11px; }
    .tms-upload-browse { padding: 8px 9px; font-size: 11px; }
}

/* Buttons */
.tms-btn-primary {
    width: 100%;
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.tms-btn-primary:hover { background: #0284c7; }
.tms-btn-primary:disabled { background: #7dd3fc; cursor: not-allowed; }

.tms-btn-secondary {
    width: 100%;
    background: #334155;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.tms-btn-secondary:hover { background: #1e293b; }
.tms-btn-secondary:disabled { background: #64748b; cursor: not-allowed; }

/* Error message */
.tms-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Success box */
.tms-success-box {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    animation: tmsFadeIn 0.4s ease-in-out;
}

@keyframes tmsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Track result */
.tms-track-result {
    margin-top: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    animation: tmsFadeIn 0.3s ease-in-out;
}
.tms-track-result dt {
    color: #64748b;
    font-size: 13px;
    margin-top: 12px;
}
.tms-track-result dt:first-child { margin-top: 0; }
.tms-track-result dd {
    color: #1e293b;
    font-weight: 500;
    font-size: 14px;
    margin: 2px 0 0;
}
.tms-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Notice (staff dashboard access denied) */
.tms-notice {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans Ethiopic', sans-serif;
    max-width: 800px;
    margin: 20px auto;
}
.tms-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.tms-staff-dashboard,
.tms-staff-login {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 20px auto;
    padding: 18px;
    color: #172a35;
    font-family: 'Noto Sans Ethiopic', sans-serif;
}
.tms-staff-dashboard *,
.tms-staff-login * {
    box-sizing: border-box;
}
.tms-staff-header,
.tms-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.tms-staff-header {
    position: relative;
    overflow: hidden;
    align-items: center;
    margin-bottom: 14px;
    padding: clamp(14px, 2vw, 22px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background:
        radial-gradient(circle at 88% 12%, rgba(226, 183, 100, .2), transparent 25%),
        linear-gradient(118deg, #102d34 0%, #176b52 72%, #24765c 100%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(16, 45, 52, .16);
}
.tms-staff-header::after {
    position: absolute;
    top: -85px;
    right: -52px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(255, 255, 255, .035), 0 0 0 48px rgba(255, 255, 255, .025);
    content: "";
    pointer-events: none;
}
.tms-staff-heading,
.tms-staff-header-actions {
    position: relative;
    z-index: 1;
}
.tms-staff-heading {
    min-width: 0;
    flex: 1 1 0;
}
.anre-content .tms-staff-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 750;
    line-height: 1.16;
    letter-spacing: -.025em;
}
.tms-staff-header h1 span {
    display: block;
    overflow-wrap: anywhere;
}
.tms-staff-header h1 .tms-staff-title-amharic {
    margin-top: 3px;
    color: #e8f4ec;
    font-size: .72em;
    font-weight: 600;
    letter-spacing: 0;
}
.tms-staff-dashboard[data-tms-language="en"] .tms-staff-title-amharic,
.tms-staff-dashboard[data-tms-language="am"] .tms-staff-title-english {
    display: none;
}
.tms-staff-login h2 {
    margin: 0;
    color: #172a35;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.35;
}
.tms-staff-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    padding: 5px 10px 5px 7px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .025em;
}
.tms-staff-eyebrow svg {
    width: 21px;
    height: 21px;
    padding: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}
.tms-staff-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .92);
    font-size: .88rem;
    font-weight: 600;
}
.tms-staff-user-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
}
.tms-staff-user-avatar svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}
.tms-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}
.tms-role-badge.is-supervisor { background: #dcefe4; color: #14523f; }
.tms-role-badge.is-encoder { background: #e4ebee; color: #344b55; }
.tms-logout-link {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, transform .18s ease;
}
.tms-logout-link:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .17); color: #fff; }
.tms-staff-header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 7px;
}
.tms-staff-header-actions > a {
    padding: 8px 10px;
    font-size: .82rem;
    text-align: center;
}
.tms-staff-header-actions .tms-button.is-primary {
    border: 1px solid rgba(255, 255, 255, .26);
    background: #f0c66f;
    color: #18382f;
}
.tms-staff-header-actions .tms-button.is-primary:hover {
    background: #ffda8b;
    color: #18382f;
}
.tms-button.is-secondary {
    border: 1px solid #cbd7d1;
    background: #fff;
    color: #344b55;
}
.tms-button.is-secondary:hover { background: #f1f5f3; color: #172a35; }
.tms-staff-notice {
    margin: 0 0 18px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 9px;
}
.tms-staff-notice.is-success {
    border-color: #9bd5b2;
    background: #f0faf3;
    color: #176b3b;
}
.tms-staff-notice.is-error {
    border-color: #f0b5b5;
    background: #fff5f5;
    color: #a52e2e;
}
.tms-profile-settings {
    margin: 0 0 14px;
    border: 1px solid #dfe8e3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(23, 42, 53, .04);
}
.tms-profile-settings > summary {
    padding: 11px 15px;
    color: #176b52;
    font-weight: 700;
    cursor: pointer;
}
.tms-profile-settings > summary:focus-visible {
    outline: 3px solid #d9a83b;
    outline-offset: 3px;
}
.tms-profile-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 14px 14px;
}
.tms-profile-form {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e5ece8;
    border-radius: 10px;
    background: #fbfcfb;
}
.tms-profile-form h2 {
    margin: 0 0 3px;
    color: #203b42;
    font-size: 1rem;
    line-height: 1.4;
}
.tms-profile-form label {
    color: #344b55;
    font-size: .82rem;
    font-weight: 650;
}
.tms-profile-form input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd7d1;
    border-radius: 7px;
    background: #fff;
    color: #172a35;
    font: inherit;
}
.tms-profile-form input:focus {
    border-color: #176b52;
    outline: 2px solid rgba(23, 107, 82, .16);
}
.tms-profile-form .tms-button {
    justify-self: start;
    margin-top: 3px;
}
[data-tms-other-sector-field][hidden] {
    display: none !important;
}
[data-tms-other-resource-category-field][hidden] {
    display: none !important;
}
.tms-staff-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.tms-metric-card,
.tms-staff-section {
    border: 1px solid #e1e9e5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(23, 42, 53, .04);
}
.tms-metric-card {
    display: grid;
    min-width: 0;
    min-height: 78px;
    align-content: space-between;
    gap: 4px;
    padding: 12px 14px;
}
.tms-metric-card span,
.tms-muted {
    color: #667780;
    font-size: .76rem;
    line-height: 1.4;
}
.tms-metric-card strong {
    color: #172a35;
    font-size: 1.45rem;
    line-height: 1.2;
}
.tms-metric-card strong.is-amber { color: #bd7800; }
.tms-metric-card strong.is-red { color: #c64040; }
.tms-metric-card strong.is-green { color: #23804d; }
.tms-metric-card.is-pending { border-color: #f0d7a2; background: #fffaf0; }
.tms-metric-card.is-pending strong { color: #a56700; }
.tms-workspace-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 9px;
    margin: 0 0 20px;
}
.tms-workspace-tab {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 68px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dfe8e3;
    border-radius: 10px;
    background: #fff;
    color: #344b55;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.tms-workspace-tab:hover {
    transform: translateY(-2px);
    border-color: #9dc9b6;
    box-shadow: 0 8px 20px rgba(23, 107, 82, .09);
}
.tms-workspace-tab[aria-selected="true"],
.tms-workspace-tab.is-active {
    border-color: #176b52;
    background: linear-gradient(135deg, #f3faf6, #fff 75%);
    box-shadow: 0 0 0 2px rgba(23, 107, 82, .11), 0 8px 20px rgba(23, 107, 82, .08);
}
.tms-workspace-tab-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 9px;
    background: #edf6f1;
    color: #176b52;
}
.tms-workspace-tab-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}
.tms-workspace-tab-copy {
    display: grid;
    min-width: 0;
    gap: 0;
}
.tms-workspace-tab-copy strong {
    color: #203b42;
    font-size: .78rem;
    line-height: 1.35;
}
.tms-workspace-tab-copy small {
    display: none;
}
.tms-workspace-tab-count {
    display: grid;
    min-width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: #f0f4f1;
    color: #43565f;
    font-size: .75rem;
    font-weight: 750;
}
.tms-workspace-tab[aria-controls="tms-panel-supervisor-tools"] .tms-workspace-tab-count {
    background: #fff2d6;
    color: #8b5a00;
}
.tms-workspace-tab-arrow {
    margin-left: auto;
    color: #176b52;
    font-size: 1.15rem;
}
.tms-workspace-panel[hidden] {
    display: none !important;
}
.tms-workspace-panel:not([hidden]) {
    animation: tmsWorkspaceReveal .24s ease-out;
}
.tms-workspace-panel:focus {
    outline: none;
}
@keyframes tmsWorkspaceReveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.tms-staff-section {
    margin: 0 0 22px;
    padding: 22px;
}
.tms-section-heading {
    align-items: center;
    margin-bottom: 18px;
}
.tms-section-heading h2 {
    margin: 0;
    color: #172a35;
    font-size: 1.25rem;
    line-height: 1.4;
}
.tms-section-heading .tms-muted { margin: 0; }
.tms-pending-list {
    display: grid;
    gap: 12px;
}
.tms-pending-card {
    padding: 18px;
    border: 1px solid #ead9b5;
    border-left: 4px solid #d9a83b;
    border-radius: 10px;
    background: #fffdf8;
}
.tms-pending-card p { margin: 8px 0 0; }
.tms-pending-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #6e7c82;
    font-size: .8rem;
}
.tms-pending-topline code {
    padding: 3px 7px;
    border-radius: 5px;
    background: #f1f5f3;
    color: #344b55;
}
.tms-report-description {
    padding: 12px;
    border-radius: 7px;
    background: #f7f8f6;
    white-space: pre-wrap;
}
.tms-review-actions,
.tms-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.tms-staff-form {
    padding: 18px;
    border-radius: 10px;
    background: #f7f9f7;
}
.tms-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.tms-staff-field {
    display: grid;
    gap: 6px;
}
.tms-staff-field.is-full { grid-column: 1 / -1; }
.tms-staff-field label {
    color: #344b55;
    font-size: .85rem;
    font-weight: 650;
}
.tms-staff-field input,
.tms-staff-field select,
.tms-staff-field textarea,
.tms-records-table select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd7d1;
    border-radius: 7px;
    background: #fff;
    color: #172a35;
    font: inherit;
}
.tms-staff-field textarea { resize: vertical; }
.tms-staff-filters {
    display: grid;
    grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(145px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 9px;
    background: #f7f9f7;
}
.tms-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.tms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    background: #176b52;
    color: #fff;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.tms-button:hover { background: #10513f; color: #fff; }
.tms-button.is-danger { background: #b83d3d; }
.tms-button.is-danger:hover { background: #922f2f; }
.tms-button.is-small { min-height: 34px; padding: 6px 10px; }
.tms-records-wrap {
    overflow-x: auto;
    border: 1px solid #e1e9e5;
    border-radius: 10px;
}
.tms-records-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: .82rem;
}
.tms-records-table th,
.tms-records-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf1ee;
    text-align: left;
    vertical-align: middle;
}
.tms-records-table th {
    background: #f5f8f6;
    color: #43565f;
    font-weight: 700;
    white-space: nowrap;
}
.tms-records-table tr:last-child td { border-bottom: 0; }
.tms-records-table select { min-width: 145px; min-height: 36px; padding: 6px; font-size: .78rem; }
.tms-record-actions { margin: 0; }
.tms-record-actions form,
.tms-review-actions form { margin: 0; }
.tms-empty-state {
    padding: 20px;
    color: #718087;
    text-align: center;
}
.tms-staff-login {
    max-width: 540px;
    padding: 28px;
    border: 1px solid #e1e9e5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(23, 42, 53, .08);
}
.tms-staff-login > p { color: #667780; }
#tms-staff-loginform p { margin: 16px 0; }
#tms-staff-loginform label {
    display: block;
    margin-bottom: 6px;
    color: #344b55;
    font-size: .88rem;
    font-weight: 650;
}
#tms-staff-loginform input[type="text"],
#tms-staff-loginform input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #cbd7d1;
    border-radius: 7px;
    font: inherit;
}
#tms-staff-loginform .login-remember label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 400;
}
#tms-staff-loginform .login-submit { margin-bottom: 10px; }
#tms-staff-loginform input[type="submit"] {
    min-height: 42px;
    padding: 9px 18px;
    border: 0;
    border-radius: 7px;
    background: #176b52;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tms-lost-password {
    color: #176b52;
    font-size: .85rem;
}
.tms-workspace-tab:focus-visible {
    outline: 3px solid #d9a83b;
    outline-offset: 3px;
}
@media (max-width: 700px) {
    .tms-staff-dashboard,
    .tms-staff-login { margin: 18px auto; padding: 16px; }
    .tms-staff-header,
    .tms-section-heading { align-items: flex-start; flex-direction: column; }
    .tms-staff-header { gap: 11px; padding: 15px; }
    .tms-staff-heading { flex: 0 1 auto; }
    .tms-staff-header-actions { width: 100%; }
    .tms-staff-header-actions > a { min-width: 0; flex: 1 1 0; padding-inline: 7px; text-align: center; white-space: normal; }
    .anre-content .tms-staff-header h1 { font-size: clamp(1.3rem, 6vw, 1.75rem); }
    .tms-staff-user { margin-top: 7px; }
    .tms-profile-settings-grid { grid-template-columns: 1fr; gap: 10px; padding: 0 10px 10px; }
    .tms-profile-form { padding: 12px; }
    .tms-staff-section { padding: 16px; }
    .tms-staff-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tms-metric-card { min-height: 72px; padding: 10px 11px; }
    .tms-metric-card span { font-size: .7rem; }
    .tms-metric-card strong { font-size: 1.3rem; }
    .tms-form-grid { grid-template-columns: 1fr; }
    .tms-staff-filters { grid-template-columns: 1fr; }
    .tms-workspace-nav { grid-template-columns: 1fr; gap: 9px; }
    .tms-workspace-tab { min-height: 62px; padding: 8px 10px; }
    .tms-staff-field.is-full { grid-column: auto; }
    .tms-pending-topline { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .tms-workspace-tab,
    .tms-workspace-panel:not([hidden]) {
        animation: none;
        transition: none;
    }
}
@media (min-width: 701px) and (max-width: 900px) {
    .tms-staff-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
