/* ===================== High Court Case Manager - Theme ===================== */
/* Saffron/gold + cream only. No dark backgrounds anywhere. */

.hcs-app {
    font-family: -apple-system, "Segoe UI", Arial, sans-serif;
    color: #3a2c1a;
    max-width: 1100px;
    margin: 0 auto;
}
.hcs-app * { box-sizing: border-box; }
.hcs-muted { color: #7a5a2e; }
.hcs-muted-inline { color: #7a5a2e; font-weight: 400; font-size: 12px; }

/* ---------------- Lock screen ---------------- */
.hcs-lock-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999998;
    background: linear-gradient(180deg, #FFFDF7 0%, #FFF6E8 60%, #FCE8C8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}
.hcs-lock-bg-emblem {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    max-width: 520px;
    opacity: 0.06;
    pointer-events: none;
}
.hcs-scales-svg { width: 100%; height: auto; animation: hcsSway 6s ease-in-out infinite; transform-origin: 50px 20px; }
@keyframes hcsSway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}
.hcs-lock-content { position: relative; z-index: 2; }
.hcs-lock-title {
    font-size: 28px;
    font-weight: 900;
    color: #A6531A;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.hcs-lock-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #7a5a2e;
    margin-bottom: 34px;
}
.hcs-enter-btn {
    background: linear-gradient(135deg, #E8A33D, #A6531A);
    color: #FFFDF7;
    border: none;
    border-radius: 40px;
    padding: 18px 46px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(166,83,26,0.35);
    animation: hcsPulse 1.8s ease-in-out infinite;
}
@keyframes hcsPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 22px rgba(166,83,26,0.35); }
    50% { transform: scale(1.06); box-shadow: 0 10px 30px rgba(166,83,26,0.55); }
}
.hcs-enter-btn:hover { filter: brightness(1.05); }

/* ---------------- Header / nav ---------------- */
.hcs-header {
    text-align: center;
    padding: 18px 10px 6px;
}
.hcs-header-title {
    font-size: 24px;
    font-weight: 900;
    color: #A6531A;
    letter-spacing: 1px;
}
.hcs-header-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #7a5a2e;
    margin-top: 4px;
}
.hcs-topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 14px 10px;
    border-bottom: 2px solid #E8C79A;
    margin-bottom: 16px;
}
.hcs-nav-btn {
    background: #FFF6E8;
    border: 2px solid #E8C79A;
    color: #A6531A;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
}
.hcs-nav-btn.hcs-nav-active,
.hcs-nav-btn:hover {
    background: linear-gradient(135deg, #E8A33D, #A6531A);
    color: #FFFDF7;
    border-color: #A6531A;
}

.hcs-view { padding: 0 12px 30px; }
.hcs-view-heading { font-size: 18px; font-weight: 800; color: #A6531A; }
.hcs-subheading { font-size: 14px; font-weight: 800; color: #7a5a2e; margin: 16px 0 8px; text-transform: uppercase; }

/* ---------------- Buttons ---------------- */
.hcs-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}
.hcs-btn-submit { background: linear-gradient(135deg, #E8A33D, #A6531A); color: #FFFDF7; }
.hcs-btn-secondary { background: #FFF6E8; border: 2px solid #E8C79A; color: #7a5a2e; }
.hcs-btn-danger { background: #FDECEA; border: 2px solid #E57373; color: #B71C1C; }
.hcs-btn-block { width: 100%; margin-top: 10px; }
.hcs-btn-small { padding: 6px 12px; font-size: 12px; }
.hcs-btn-small.hcs-icon-btn { padding: 4px 8px; margin-right: 4px; }

/* ---------------- Search row ---------------- */
.hcs-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.hcs-search-input {
    flex: 1;
    min-width: 220px;
    padding: 11px 14px;
    border: 2px solid #E8C79A;
    border-radius: 8px;
    font-weight: 700;
    color: #3a2c1a;
    background: #FFFDF7;
}
.hcs-search-input:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    background: #FFF9C4 !important;
    border-color: #A6531A;
}
.hcs-select {
    padding: 10px;
    border: 2px solid #E8C79A;
    border-radius: 8px;
    font-weight: 700;
    background: #FFFDF7;
    color: #3a2c1a;
}
.hcs-count-row { font-size: 13px; font-weight: 700; color: #7a5a2e; margin-bottom: 8px; }

/* ---------------- Tables ---------------- */
.hcs-table-wrap { overflow-x: auto; border: 2px solid #E8C79A; border-radius: 10px; }
.hcs-table { width: 100%; border-collapse: collapse; background: #FFFDF7; font-size: 13px; }
.hcs-table th {
    background: #FFF6E8;
    color: #7a5a2e;
    font-weight: 800;
    text-align: left;
    padding: 10px 8px;
    white-space: nowrap;
    border-bottom: 2px solid #E8C79A;
}
.hcs-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #F0E0C0;
    color: #3a2c1a;
    font-weight: 700;
    vertical-align: top;
}
.hcs-table tr:hover td { background: #FFF9E5; }
.hcs-empty { text-align: center; padding: 20px; color: #7a5a2e; font-weight: 700; }

.hcs-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.hcs-badge-pending { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.hcs-badge-disposed { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }

/* ---------------- Stat boxes ---------------- */
.hcs-stats-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.hcs-stat-box {
    background: #FFF6E8;
    border: 2px solid #E8C79A;
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 110px;
    text-align: center;
}
.hcs-stat-num { font-size: 20px; font-weight: 900; color: #A6531A; }
.hcs-stat-label { font-size: 11px; font-weight: 800; color: #7a5a2e; text-transform: uppercase; }

/* ---------------- Admin tabs ---------------- */
.hcs-admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hcs-admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.hcs-tab-btn {
    background: #FFF6E8;
    border: 2px solid #E8C79A;
    color: #A6531A;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.hcs-tab-btn.hcs-tab-active { background: #A6531A; color: #FFFDF7; border-color: #A6531A; }
.hcs-admin-login-box { text-align: center; padding: 30px 16px; }

/* ---------------- Cards (Clients / Uploads) ---------------- */
.hcs-cards-wrap { display: flex; flex-direction: column; gap: 12px; }
.hcs-card {
    background: #FFFDF7;
    border: 2px solid #E8C79A;
    border-radius: 12px;
    padding: 14px 16px;
}
.hcs-card-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.hcs-card-name { font-weight: 900; color: #A6531A; font-size: 15px; }
.hcs-card-mobile { font-weight: 700; color: #7a5a2e; font-size: 13px; }
.hcs-card-sub { font-size: 12px; font-weight: 800; color: #7a5a2e; text-transform: uppercase; margin-top: 8px; }
.hcs-case-chip {
    display: inline-block;
    background: #FFF6E8;
    border: 1px solid #E8C79A;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    margin: 3px 4px 0 0;
}
.hcs-doc-link {
    display: inline-block;
    background: #FFF3E0;
    border: 1px solid #FFCC80;
    color: #A6531A;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    margin: 3px 4px 0 0;
}
.hcs-doc-link:hover { background: #FFE0B2; }
.hcs-report-text {
    background: #FFF6E8;
    border: 1px solid #E8C79A;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: pre-wrap;
    margin-top: 6px;
    max-height: 120px;
    overflow-y: auto;
}

/* ---------------- Forms / modals ---------------- */
.hcs-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(60,40,20,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
}
.hcs-modal-box {
    background: #FFFDF7;
    border: 2px solid #E8A33D;
    border-radius: 14px;
    padding: 22px;
    max-width: 480px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.hcs-modal-wide { max-width: 640px; }
.hcs-modal-close {
    position: absolute;
    top: 8px; right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    font-weight: 800;
    color: #A6531A;
    cursor: pointer;
}
.hcs-modal-title { font-size: 18px; font-weight: 900; color: #A6531A; margin-bottom: 14px; }
.hcs-pin-box { text-align: center; }
.hcs-pin-title { font-size: 16px; font-weight: 800; color: #A6531A; margin-bottom: 14px; }
.hcs-pin-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #E8C79A;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 6px;
    font-weight: 800;
    color: #3a2c1a;
    margin-bottom: 12px;
}
.hcs-pin-msg { margin-top: 10px; font-weight: 700; color: #B71C1C; font-size: 13px; }

.hcs-field-row { margin-bottom: 12px; }
.hcs-field-row label {
    display: block;
    font-weight: 800;
    color: #7a5a2e;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.hcs-field-row input[type="text"],
.hcs-field-row input[type="password"],
.hcs-field-row input[type="file"],
.hcs-field-row select,
.hcs-field-row textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #E8C79A;
    border-radius: 8px;
    font-weight: 700;
    color: #3a2c1a;
    background: #FFFDF7;
    font-family: inherit;
}
.hcs-form-msg { margin-top: 10px; font-weight: 700; font-size: 13px; }
.hcs-form-msg.hcs-ok { color: #2E7D32; }
.hcs-form-msg.hcs-err { color: #B71C1C; }

.hcs-toggle-pair { display: flex; gap: 8px; }
.hcs-toggle-btn {
    flex: 1;
    background: #FFF6E8;
    border: 2px solid #E8C79A;
    color: #7a5a2e;
    font-weight: 800;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}
.hcs-toggle-btn.hcs-toggle-active { background: #A6531A; color: #FFFDF7; border-color: #A6531A; }

.hcs-doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hcs-caserow {
    display: grid;
    grid-template-columns: 1fr 1.4fr 32px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.hcs-caserow input { padding: 8px; border: 2px solid #E8C79A; border-radius: 6px; font-weight: 700; }
.hcs-caserow-remove {
    background: #FDECEA;
    border: 1px solid #E57373;
    color: #B71C1C;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
    height: 34px;
}
.hcs-ocr-status { margin-top: 6px; font-size: 12px; font-weight: 700; color: #A6531A; }

@media (max-width: 640px) {
    .hcs-doc-grid { grid-template-columns: 1fr; }
    .hcs-caserow { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hcs-lock-title { font-size: 20px; }
    .hcs-header-title { font-size: 19px; }
    .hcs-enter-btn { padding: 14px 30px; font-size: 15px; }
}
