:root {
    --wck-blue: #0072BC;
    --wck-blue-dark: #004F87;
    --wck-blue-light: #E8F4FC;
    --wck-yellow: #FDB913;
    --wck-orange: #F7941E;
    --wck-orange-hover: #E07818;
    --wck-orange-soft: #FFF4E8;
    --wck-green: #8DC63F;
    --wck-cyan: #00AEEF;
    --wck-magenta: #9E1F63;
    --wck-red: #BE1E2D;
    --wck-sidebar: #0a2540;
    --wck-sidebar-hover: #123456;
    --wck-bg: #f4f7fb;
    --wck-card: #ffffff;
    --wck-text: #1e293b;
    --wck-muted: #64748b;
    --wck-radius: 16px;
    --wck-shadow: 0 8px 32px rgba(0, 79, 135, 0.09);
    --wck-gradient: linear-gradient(90deg, var(--wck-green), var(--wck-cyan), var(--wck-magenta), var(--wck-orange));
}

* { box-sizing: border-box; }

body.wck-public {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(180deg, #eef6fc 0%, #f8fafc 35%, #fff 100%);
    color: var(--wck-text);
    min-height: 100vh;
}

body.wck-public::before {
    content: '';
    display: block;
    height: 5px;
    background: var(--wck-gradient);
}

body.wck-admin {
    font-family: 'Cairo', sans-serif;
    background: var(--wck-bg);
    color: var(--wck-text);
    min-height: 100vh;
}

.wck-public-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
}
.wck-public-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}
.wck-public-header img {
    max-height: 120px;
    height: auto;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}
.wck-public-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wck-blue-dark);
    margin-top: 0.75rem;
}
.wck-public-header .wck-header-sub {
    font-size: 0.875rem;
    color: var(--wck-muted);
    margin-top: 0.35rem;
}
.wck-lang-switch {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    display: flex;
    gap: 0.35rem;
}
.wck-lang-switch a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--wck-muted);
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.wck-lang-switch a.active {
    background: var(--wck-blue);
    color: white;
    border-color: var(--wck-blue);
}

/* ── Public complaint form ── */
.wck-form-shell {
    max-width: 720px;
    margin: 0 auto;
}

.wck-notices-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.wck-notice {
    display: block;
    border-radius: var(--wck-radius);
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
}
.wck-notice h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.wck-notice p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--wck-text);
}
.wck-notice-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.wck-notice-list {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    padding-inline-start: 1.1rem;
}
.wck-notice-blue { background: var(--wck-blue-light); border-color: rgba(0, 114, 188, 0.15); }
.wck-notice-blue h3 { color: var(--wck-blue-dark); }
.wck-notice-icon-blue { background: rgba(0, 114, 188, 0.12); }
.wck-notice-red { background: #fef2f2; border-color: rgba(190, 30, 45, 0.12); }
.wck-notice-red h3 { color: var(--wck-red); }
.wck-notice-icon-red { background: rgba(190, 30, 45, 0.1); }
.wck-notice-teal { background: #ecfbff; border-color: rgba(0, 174, 239, 0.15); }
.wck-notice-teal h3 { color: #007a9e; }
.wck-notice-icon-teal { background: rgba(0, 174, 239, 0.12); }

.wck-form-step {
    background: var(--wck-card);
    border-radius: var(--wck-radius);
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(0, 114, 188, 0.07);
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.wck-form-step::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
}
.wck-step-1::before { background: var(--wck-blue); }
.wck-step-2::before { background: var(--wck-green); }
.wck-step-3::before { background: var(--wck-cyan); }
.wck-step-4::before { background: var(--wck-magenta); }
.wck-step-5::before { background: var(--wck-yellow); }
.wck-step-6::before { background: var(--wck-orange); }

.wck-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}
.wck-step-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wck-blue-dark);
}
.wck-step-hint {
    font-size: 0.85rem;
    color: var(--wck-muted);
    margin-bottom: 1rem;
}
.wck-step-hint-sm { font-size: 0.78rem; margin-top: 0.5rem; margin-bottom: 0; }

.wck-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--wck-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 114, 188, 0.2);
}

.wck-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 0.5rem;
}
.wck-field-grid-2 {
    grid-template-columns: 1fr 1fr;
}
.wck-field-span-full {
    grid-column: 1 / -1;
}
@media (max-width: 560px) {
    .wck-field-grid-2 { grid-template-columns: 1fr; }
}

.wck-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
@media (max-width: 480px) {
    .wck-radio-group { grid-template-columns: 1fr; }
}
.wck-radio-group.wck-radio-inline {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 0.65rem;
}

.wck-radio-card {
    cursor: pointer;
    position: relative;
}
.wck-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.wck-radio-card-body {
    display: block;
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fafbfc;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-align: center;
}
.wck-radio-card input:checked + .wck-radio-card-body {
    border-color: var(--wck-blue);
    background: var(--wck-blue-light);
    box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.1);
}
.wck-radio-card:hover .wck-radio-card-body {
    border-color: var(--wck-cyan);
}

.wck-radio-pill {
    cursor: pointer;
}
.wck-radio-pill input {
    position: absolute;
    opacity: 0;
}
.wck-radio-pill span {
    display: inline-block;
    padding: 0.45rem 1.25rem;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}
.wck-radio-pill input:checked + span {
    background: var(--wck-blue);
    border-color: var(--wck-blue);
    color: white;
}

.wck-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}
.wck-checkbox-label input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: var(--wck-blue);
    flex-shrink: 0;
}

.wck-file-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 1.25rem;
    background: linear-gradient(135deg, #fafbfc 0%, var(--wck-orange-soft) 100%);
    transition: border-color 0.2s, background 0.2s;
}
.wck-file-zone:hover,
.wck-file-zone.is-dragover {
    border-color: var(--wck-orange);
    background: var(--wck-orange-soft);
}
.wck-field-file { margin-bottom: 0; }
.wck-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
}
.wck-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    text-align: center;
}
.wck-file-icon { font-size: 1.75rem; }
.wck-file-text {
    font-weight: 700;
    color: var(--wck-blue-dark);
    font-size: 0.9rem;
}
.wck-file-name {
    font-size: 0.78rem;
    color: var(--wck-muted);
}

.wck-file-summary {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.wck-file-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--wck-text);
    margin-bottom: 0.5rem;
}
.wck-file-summary-max {
    color: var(--wck-muted);
    font-size: 0.75rem;
}
.wck-file-quota-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.wck-file-quota-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--wck-green), var(--wck-cyan));
    border-radius: 999px;
    transition: width 0.3s ease, background 0.2s;
}
.wck-file-quota-fill.is-warn {
    background: linear-gradient(90deg, var(--wck-yellow), var(--wck-orange));
}
.wck-file-quota-fill.is-over {
    background: var(--wck-red);
}

.wck-file-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wck-file-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}
.wck-file-item.is-ready { border-color: rgba(141, 198, 63, 0.45); }
.wck-file-item.is-error { border-color: rgba(190, 30, 45, 0.35); background: #fff5f5; }
.wck-file-item.is-uploading { border-color: rgba(0, 174, 239, 0.45); background: #f0fbff; }
.wck-file-item.is-done { border-color: rgba(141, 198, 63, 0.6); background: #f4faf0; }
.wck-file-item-icon { font-size: 1.15rem; flex-shrink: 0; }
.wck-file-item-body { flex: 1; min-width: 0; }
.wck-file-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wck-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wck-file-item-meta {
    font-size: 0.72rem;
    color: var(--wck-muted);
    margin-top: 0.1rem;
}
.wck-file-item-status {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.wck-file-item.is-ready .wck-file-item-status { background: #eaf6d8; color: #4d7c0f; }
.wck-file-item.is-error .wck-file-item-status { background: #fee2e2; color: var(--wck-red); }
.wck-file-item.is-uploading .wck-file-item-status { background: #e0f5ff; color: #0284c7; }
.wck-file-item.is-done .wck-file-item-status { background: #dcfce7; color: #15803d; }
.wck-file-item-remove {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--wck-muted);
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.15s;
}
.wck-file-item-remove:hover {
    background: #fee2e2;
    color: var(--wck-red);
}

.wck-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 37, 64, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.wck-upload-overlay[hidden] { display: none !important; }
.wck-upload-overlay-card {
    width: min(360px, 100%);
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
}
.wck-upload-overlay-title {
    font-weight: 700;
    color: var(--wck-blue-dark);
    margin-bottom: 1rem;
}
.wck-upload-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.65rem;
}
.wck-upload-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--wck-orange), var(--wck-yellow));
    border-radius: 999px;
    transition: width 0.15s ease;
}
.wck-upload-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wck-muted);
}

#attachments-msg.is-invalid {
    color: var(--wck-red);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

.wck-form-submit {
    background: white;
    border-radius: var(--wck-radius);
    padding: 1.5rem;
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(247, 148, 30, 0.15);
    margin-bottom: 2rem;
}
.wck-recaptcha-box {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.wck-recaptcha-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--wck-blue-dark);
    margin-bottom: 0.25rem;
}
.wck-recaptcha-hint {
    font-size: 0.78rem;
    color: var(--wck-muted);
    margin-bottom: 0.85rem;
}
.wck-recaptcha-error,
#recaptcha-msg.is-invalid {
    color: var(--wck-red);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

.wck-btn-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--wck-orange);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(247, 148, 30, 0.35);
}
.wck-btn-submit-icon { font-size: 1.15rem; }
.wck-btn-submit:hover:not(:disabled) {
    background: var(--wck-orange-hover);
    box-shadow: 0 6px 20px rgba(224, 120, 24, 0.4);
    transform: translateY(-1px);
}
.wck-btn-submit:active:not(:disabled) { transform: translateY(0); }
.wck-btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ── Success page ── */
.wck-success-shell { padding-top: 0.5rem; }

.wck-success-hero {
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
    background: white;
    border-radius: var(--wck-radius);
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(0, 114, 188, 0.07);
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.wck-success-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wck-gradient);
}
.wck-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
}
.wck-success-check { width: 100%; height: 100%; }
.wck-success-circle {
    stroke: var(--wck-green);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: wck-circle-draw 0.6s ease forwards;
}
.wck-success-tick {
    stroke: var(--wck-green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: wck-tick-draw 0.4s 0.5s ease forwards;
}
@keyframes wck-circle-draw { to { stroke-dashoffset: 0; } }
@keyframes wck-tick-draw { to { stroke-dashoffset: 0; } }

.wck-success-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--wck-blue-dark);
    margin-bottom: 0.5rem;
}
.wck-success-subtitle {
    font-size: 0.9rem;
    color: var(--wck-muted);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

.wck-success-ref-card {
    background: linear-gradient(135deg, var(--wck-blue-light) 0%, #fff 100%);
    border-radius: var(--wck-radius);
    border: 1px solid rgba(0, 114, 188, 0.12);
    box-shadow: var(--wck-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.wck-success-ref-inner {
    padding: 1.5rem;
    text-align: center;
}
.wck-success-ref-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wck-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}
.wck-success-ref-no {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    color: var(--wck-blue);
    letter-spacing: 0.04em;
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
    word-break: break-all;
}
.wck-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 2px solid var(--wck-blue);
    background: white;
    color: var(--wck-blue);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.wck-copy-btn:hover {
    background: var(--wck-blue);
    color: white;
}
.wck-copy-btn-done {
    background: var(--wck-green) !important;
    border-color: var(--wck-green) !important;
    color: white !important;
}

.wck-success-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
    .wck-success-grid { grid-template-columns: 1fr; }
}
.wck-success-qr-card,
.wck-success-info-card {
    margin-bottom: 0;
    height: 100%;
}
.wck-success-qr-wrap {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    background: white;
    border-radius: 14px;
    border: 2px solid #f1f5f9;
    margin-bottom: 0.75rem;
}
.wck-success-qr-wrap svg {
    display: block;
    border-radius: 8px;
}

.wck-success-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.wck-success-meta li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}
.wck-success-meta li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.wck-success-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wck-muted);
}
.wck-success-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wck-text);
    line-height: 1.45;
}
.wck-success-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--wck-blue-light);
    color: var(--wck-blue-dark);
    width: fit-content;
}

.wck-success-notice { margin-bottom: 1.25rem; }

.wck-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}
.wck-btn-submit-link {
    text-decoration: none;
    text-align: center;
}
.wck-btn-secondary {
    display: block;
    text-align: center;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--wck-text);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}
.wck-btn-secondary:hover {
    border-color: var(--wck-blue);
    color: var(--wck-blue);
    background: var(--wck-blue-light);
}

/* ── Form cards (legacy) ── */
.wck-card {
    background: var(--wck-card);
    border-radius: var(--wck-radius);
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(0, 114, 188, 0.08);
    padding: 1.5rem;
}
.wck-notice {
    border-radius: var(--wck-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-inline-start: 4px solid;
}
.wck-notice-blue { background: var(--wck-blue-light); border-color: var(--wck-blue); }
.wck-notice-red { background: #fef2f2; border-color: var(--wck-red); }

.wck-step-badge-legacy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--wck-orange);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

/* ── Form fields + validation ── */
.wck-field { margin-bottom: 1rem; position: relative; }
.wck-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--wck-text);
}
.wck-field label .req { color: var(--wck-red); }
.wck-input, .wck-select, .wck-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.wck-input:focus, .wck-select:focus, .wck-textarea:focus {
    outline: none;
    border-color: var(--wck-blue);
    box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.15);
}
.wck-field.is-valid .wck-input,
.wck-field.is-valid .wck-select,
.wck-field.is-valid .wck-textarea {
    border-color: var(--wck-green);
    padding-inline-end: 2.5rem;
}
.wck-field.is-invalid .wck-input,
.wck-field.is-invalid .wck-select,
.wck-field.is-invalid .wck-textarea {
    border-color: var(--wck-red);
}
.wck-field-icon {
    position: absolute;
    inset-inline-end: 0.75rem;
    bottom: 0.7rem;
    font-size: 1rem;
    pointer-events: none;
}
.wck-field.is-valid .wck-field-icon::after { content: '✓'; color: var(--wck-green); }
.wck-field.is-invalid .wck-field-icon::after { content: '✕'; color: var(--wck-red); }
.wck-field-msg {
    font-size: 0.78rem;
    margin-top: 0.3rem;
    min-height: 1.1rem;
}
.wck-field.is-invalid .wck-field-msg { color: var(--wck-red); }
.wck-field.is-valid .wck-field-msg { color: var(--wck-green); }

/* Progress bar */
.wck-progress-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.wck-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.wck-progress-fill {
    height: 100%;
    background: var(--wck-gradient);
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 0%;
}
.wck-progress-text {
    font-size: 0.8rem;
    color: var(--wck-muted);
    margin-top: 0.35rem;
    text-align: center;
}

.wck-btn-primary {
    width: 100%;
    padding: 0.85rem;
    background: var(--wck-orange);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.wck-btn-primary:hover:not(:disabled) { background: var(--wck-orange-hover); }
.wck-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Admin sidebar layout ── */
.wck-admin-shell { display: flex; min-height: 100vh; }
.wck-sidebar {
    width: 260px;
    background: var(--wck-sidebar);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 40;
}
[dir="rtl"] .wck-sidebar { inset-inline-start: auto; inset-inline-end: 0; }
.wck-sidebar-logo {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}
.wck-sidebar-logo img { height: 56px; margin: 0 auto; filter: brightness(1.1); }
.wck-sidebar-logo span {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}
.wck-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.wck-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}
.wck-nav a:hover { background: var(--wck-sidebar-hover); color: white; }
.wck-nav a.active {
    background: var(--wck-blue);
    color: white;
    font-weight: 600;
}
.wck-nav-icon { width: 1.25rem; text-align: center; font-size: 1.1rem; }
.wck-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.wck-main-wrap {
    flex: 1;
    margin-inline-start: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
[dir="rtl"] .wck-main-wrap { margin-inline-start: 0; margin-inline-end: 260px; }

.wck-topbar {
    background: white;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 30;
}
.wck-topbar h2 { font-size: 1.15rem; font-weight: 700; color: var(--wck-blue-dark); }
.wck-topbar-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}
.wck-topbar-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: var(--wck-bg);
    font-family: inherit;
    font-size: 0.875rem;
}
.wck-topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.wck-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wck-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.wck-main-content { padding: 1.5rem; flex: 1; }

/* Stat cards */
.wck-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.wck-stat-card {
    background: white;
    border-radius: var(--wck-radius);
    padding: 1.25rem;
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.wck-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--wck-blue);
}
.wck-stat-card.stat-new::before { background: var(--wck-blue); }
.wck-stat-card.stat-progress::before { background: var(--wck-yellow); }
.wck-stat-card.stat-resolved::before { background: var(--wck-green); }
.wck-stat-card.stat-overdue::before { background: var(--wck-red); }
.wck-stat-card.stat-total::before { background: var(--wck-orange); }
.wck-stat-label { font-size: 0.8rem; color: var(--wck-muted); }
.wck-stat-value { font-size: 2rem; font-weight: 700; color: var(--wck-blue-dark); line-height: 1.2; }
.wck-stat-card.stat-overdue .wck-stat-value { color: var(--wck-red); }

.wck-panel {
    background: white;
    border-radius: var(--wck-radius);
    box-shadow: var(--wck-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    padding: 1.5rem;
}
.wck-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.wck-panel-header h3 { font-weight: 700; font-size: 1rem; }

.wck-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.wck-badge-new { background: #e2e8f0; color: #475569; }
.wck-badge-assigned { background: var(--wck-blue-light); color: var(--wck-blue); }
.wck-badge-progress { background: #fef9c3; color: #a16207; }
.wck-badge-resolved { background: #dcfce7; color: #15803d; }

.wck-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.wck-table th {
    text-align: start;
    padding: 0.75rem 1rem;
    background: var(--wck-bg);
    color: var(--wck-muted);
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}
.wck-table td { padding: 0.85rem 1rem; border-bottom: 1px solid #f1f5f9; }
.wck-table tr:hover td { background: #f8fafc; }

.wck-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s;
}
.wck-btn-blue { background: var(--wck-blue); color: white; }
.wck-btn-blue:hover { background: var(--wck-blue-dark); }
.wck-btn-outline { background: white; border: 1px solid #e2e8f0; color: var(--wck-text); }
.wck-btn-outline:hover { border-color: var(--wck-blue); color: var(--wck-blue); }

@media (max-width: 768px) {
    .wck-sidebar { width: 72px; }
    .wck-sidebar-logo span, .wck-nav a span { display: none; }
    .wck-main-wrap { margin-inline-start: 72px; }
    [dir="rtl"] .wck-main-wrap { margin-inline-end: 72px; margin-inline-start: 0; }
}

/* ── Admin login ── */
.wck-login-page {
    font-family: 'Cairo', sans-serif;
    min-height: 100vh;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #050d18;
    color: #e2e8f0;
    overflow-x: hidden;
}
.wck-login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 114, 188, 0.35), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(247, 148, 30, 0.12), transparent 50%),
        radial-gradient(ellipse 40% 30% at 0% 80%, rgba(141, 198, 63, 0.1), transparent 45%),
        #050d18;
    pointer-events: none;
}
.wck-login-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wck-gradient);
}
.wck-login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}
.wck-login-card {
    background: rgba(10, 37, 64, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    padding: 1.75rem 1.5rem 1.5rem;
    backdrop-filter: blur(12px);
}
.wck-login-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}
.wck-login-logo-wrap {
    width: 148px;
    height: 148px;
    margin: 0 auto 1rem;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 12px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wck-login-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.wck-login-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7dd3fc;
    margin: 0 0 0.4rem;
}
.wck-login-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.wck-login-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}
.wck-login-camera {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.wck-login-camera video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wck-login-camera-ring {
    position: absolute;
    inset: 12%;
    border: 2px dashed rgba(253, 185, 19, 0.35);
    border-radius: 50%;
    pointer-events: none;
}
.wck-login-status {
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0 0 1rem;
    min-height: 1.25rem;
}
.wck-login-pin {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
}
.wck-login-pin summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: #e2e8f0;
    list-style: none;
}
.wck-login-pin summary::-webkit-details-marker { display: none; }
.wck-login-pin summary::after {
    content: '+';
    float: inline-end;
    color: #7dd3fc;
    font-weight: 800;
}
.wck-login-pin[open] summary::after { content: '−'; }
.wck-login-pin-form {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.wck-login-pin-form .wck-select,
.wck-login-pin-form .wck-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}
.wck-login-pin-form .wck-select:focus,
.wck-login-pin-form .wck-input:focus {
    border-color: var(--wck-cyan);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}
.wck-login-pin-form .wck-select option {
    background: #0a2540;
    color: #fff;
}
.wck-login-submit {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    background: var(--wck-orange);
    color: #fff;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(247, 148, 30, 0.3);
    transition: background 0.2s, transform 0.1s;
}
.wck-login-submit:hover {
    background: var(--wck-orange-hover);
    transform: translateY(-1px);
}
.wck-login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wck-login-footer a {
    color: #7dd3fc;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.wck-login-footer a:hover { color: #fff; }
.wck-login-lang {
    display: flex;
    gap: 0.35rem;
}
.wck-login-lang a {
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    border: 1px solid transparent;
}
.wck-login-lang a.is-active {
    background: var(--wck-yellow);
    color: #0a2540;
}
.wck-login-lang a:not(.is-active):hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

@media (max-width: 420px) {
    .wck-login-logo-wrap {
        width: 120px;
        height: 120px;
        border-radius: 22px;
    }
    .wck-login-card { padding: 1.35rem 1.1rem 1.25rem; }
}

