/* ============================================================
   LPM - Laporan Pengaduan Masyarakat
   public/css/lpm.css
   ============================================================ */

:root {
    --c-bg:     #f0f4f9;
    --c-white:  #ffffff;
    --c-border: #e2e8f0;
    --c-text:   #1a1a2e;
    --c-muted:  #64748b;
    --c-req:    #d93025;
    --c-blue:   #1a73e8;
    --c-red:    #d93025;
    --c-green:  #0f9d58;
    --c-purple: #673ab7;
    --c-err:    #d93025;
    --c-radius: 8px;
    --c-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}


/* ── Header ─────────────────────────────────────── */
.lpm-header {
    background: linear-gradient(135deg, #b71c1c 0%, #7f0000 100%);
    padding: 80px 16px 56px; /* 64px navbar + 16px ruang napas */
    position: relative;
    overflow: hidden;
}
.lpm-header::after {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.lpm-header-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
}
.lpm-header-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lpm-header-icon svg { width: 28px; height: 28px; color: #fff; }
.lpm-header-label {
    font-size: 12px; font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase; letter-spacing: .08em;
    margin: 0 0 6px;
}
.lpm-header-title {
    font-size: 24px; font-weight: 700;
    color: #fff; margin: 0 0 10px; line-height: 1.2;
}
.lpm-header-desc {
    font-size: 14px; color: rgba(255,255,255,0.85);
    margin: 0; line-height: 1.6;
}

/* ── Wrapper ─────────────────────────────────────── */
.lpm-wrapper {
    max-width: 680px;
    margin: 24px auto 60px;
    padding: 0 16px;
}

/* ── Alert ───────────────────────────────────────── */
.lpm-alert {
    display: flex; gap: 12px;
    padding: 14px 16px;
    border-radius: var(--c-radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.lpm-alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.lpm-alert-title { font-weight: 600; margin-bottom: 4px; }
.lpm-alert-error { background: #fce8e6; color: #b31412; }
.lpm-alert-error svg { color: var(--c-err); }
.lpm-alert ul { margin: 4px 0 0 16px; padding: 0; }

/* ── Cards ───────────────────────────────────────── */
.lpm-card {
    background: var(--c-white);
    border-radius: var(--c-radius);
    box-shadow: var(--c-shadow);
    margin-bottom: 16px;
    overflow: hidden;
    border-top: 4px solid transparent;
}
.lpm-card-header {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--c-border);
}
.lpm-card-header h2 {
    font-size: 16px; font-weight: 600;
    color: var(--c-text); margin: 0;
}
.lpm-card-body { padding: 20px 24px; }

.lpm-num {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.lpm-card-blue  { border-top-color: var(--c-blue);  }
.lpm-num-blue   { background: var(--c-blue);  }
.lpm-card-red   { border-top-color: var(--c-red);   }
.lpm-num-red    { background: var(--c-red);   }
.lpm-card-green { border-top-color: var(--c-green); }
.lpm-num-green  { background: var(--c-green); }
.lpm-card-purple{ border-top-color: var(--c-purple);}
.lpm-num-purple { background: var(--c-purple);}

/* ── Form Layout ─────────────────────────────────── */
.lpm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lpm-group { margin-bottom: 20px; }
.lpm-group:last-child { margin-bottom: 0; }
.lpm-label { display: block; font-size: 14px; font-weight: 500; color: var(--c-text); margin-bottom: 6px; }
.lpm-req { color: var(--c-req); margin-left: 2px; }

/* ── Input ───────────────────────────────────────── */
.lpm-input {
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px; color: var(--c-text); background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box; outline: none; font-family: inherit;
}
.lpm-input:hover  { border-color: #b0bec5; }
.lpm-input:focus  { border-color: var(--c-blue); box-shadow: 0 0 0 2px rgba(26,115,232,.18); }
.lpm-input-err    { border-color: var(--c-err) !important; }
.lpm-input-err:focus { box-shadow: 0 0 0 2px rgba(217,48,37,.15) !important; }
.lpm-textarea     { resize: vertical; min-height: 90px; }

.lpm-input-icon-wrap { position: relative; }
.lpm-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: #94a3b8; pointer-events: none;
}
.lpm-input-pad { padding-left: 34px !important; }

.lpm-meta   { display: flex; justify-content: space-between; margin-top: 4px; min-height: 18px; }
.lpm-count  { font-size: 11px; color: var(--c-muted); }
.lpm-err    { font-size: 12px; color: var(--c-err); margin: 4px 0 0; }
.lpm-hint-block {
    font-size: 13px; color: var(--c-muted);
    background: #f8fafc; border-radius: 6px;
    padding: 10px 14px; border-left: 3px solid var(--c-border);
    margin-bottom: 20px; line-height: 1.6;
}

/* ── Upload Tanda Tangan ─────────────────────────── */
.lpm-upload-zone {
    border: 2px dashed var(--c-border); border-radius: 8px;
    padding: 32px 20px; text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s; position: relative;
}
.lpm-upload-zone:hover,
.lpm-upload-zone.dragover { border-color: var(--c-blue); background: #f0f7ff; }
.lpm-upload-err  { border-color: var(--c-err) !important; }
.lpm-upload-input {
    position: absolute; inset: 0; opacity: 0;
    cursor: pointer; width: 100%; height: 100%;
}
.lpm-upload-icon {
    width: 52px; height: 52px; background: #fce4e4; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.lpm-upload-icon svg { width: 24px; height: 24px; color: var(--c-red); }
.lpm-upload-text  { font-size: 14px; color: var(--c-text); margin: 0 0 4px; }
.lpm-upload-link  { color: var(--c-blue); font-weight: 500; text-decoration: underline; }
.lpm-upload-hint  { font-size: 12px; color: var(--c-muted); margin: 0; }
.lpm-upload-remove {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px;
    background: #fee2e2; border: none; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #ef4444; z-index: 2;
}
.lpm-upload-remove svg { width: 12px; height: 12px; }

/* ── Declaration ─────────────────────────────────── */
.lpm-declaration {
    background: #f8fafc; border-radius: 8px; padding: 16px 20px;
    margin-bottom: 20px; font-size: 13px; color: var(--c-muted);
    border: 1px solid var(--c-border);
}
.lpm-declaration p  { margin: 0 0 10px; color: var(--c-text); font-weight: 500; }
.lpm-declaration ul { margin: 0; padding-left: 18px; }
.lpm-declaration li { margin-bottom: 6px; line-height: 1.5; }
.lpm-declaration strong { color: var(--c-text); }

/* ── Checkbox ────────────────────────────────────── */
.lpm-check-label {
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; font-size: 14px; color: var(--c-text);
    padding: 12px 16px; border-radius: 6px;
    border: 1px solid transparent; transition: background .15s;
}
.lpm-check-label:hover { background: #f8fafc; }
.lpm-check-err { border-color: var(--c-err) !important; background: #fffafa; }
.lpm-check { position: absolute; opacity: 0; width: 0; height: 0; }
.lpm-check-box {
    width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 3px;
    flex-shrink: 0; margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s, background .15s;
    background: #fff; position: relative;
}
.lpm-check:checked + .lpm-check-box { background: var(--c-blue); border-color: var(--c-blue); }
.lpm-check:checked + .lpm-check-box::after {
    content: ''; display: block;
    width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}
.lpm-info-box {
    display: flex; align-items: flex-start; gap: 10px;
    background: #e8f0fe; border-radius: 6px;
    padding: 12px 14px; font-size: 13px; color: #1a56ab; margin-top: 16px;
}
.lpm-info-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── Submit ──────────────────────────────────────── */
.lpm-submit-area { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.lpm-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; background: #b71c1c; color: #fff;
    border: none; border-radius: 4px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit; box-shadow: 0 1px 3px rgba(183,28,28,.4);
}
.lpm-submit-btn svg   { width: 18px; height: 18px; }
.lpm-submit-btn:hover { background: #9b1717; }
.lpm-submit-btn:active { transform: scale(.98); }
.lpm-submit-btn:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; }
.lpm-cancel       { font-size: 14px; font-weight: 500; color: var(--c-muted); text-decoration: none; }
.lpm-cancel:hover { color: var(--c-text); }

.lpm-track-link { text-align: center; padding: 16px 0 8px; }
.lpm-track-link a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-blue); text-decoration: none; }
.lpm-track-link a:hover { text-decoration: underline; }
.lpm-track-link svg { width: 14px; height: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 720px) {
    .lpm-header      { padding: 80px 16px 44px; } /* navbar tetap 64px di mobile */
    .lpm-header-title { font-size: 20px; }
    .lpm-card-body   { padding: 16px; }
    .lpm-card-header { padding: 14px 16px; }
}
@media (max-width: 600px) {
    .lpm-row { grid-template-columns: 1fr; }
}