/* ===========================
   THIQLA INTRANET – Feedback & Aspirasi
   =========================== */

/* ─── Page Header ──────────────────────────────────────────── */
.feedback-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b3a5c 60%, #1a4a73 100%);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.feedback-hero::before {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(41,128,185,.25) 0%, transparent 70%);
    top: -80px; right: -60px;
    pointer-events: none;
}
.hero-text h1 {
    font-size: 28px; font-weight: 800; color: #fff;
    margin-bottom: 6px; letter-spacing: -.5px;
}
.hero-text p { font-size: 14.5px; color: rgba(255,255,255,.65); line-height: 1.6; }
.hero-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    padding: 10px 18px;
    color: rgba(255,255,255,.85);
    font-size: 13px; font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.hero-badge i { color: #1abc9c; font-size: 16px; }

/* ─── Guarantee Chips ──────────────────────────────────────── */
.guarantee-strip {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
}
.guarantee-chip {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: 50px; padding: 8px 16px;
    font-size: 13px; font-weight: 500; color: var(--text-medium);
    box-shadow: var(--shadow-sm);
}
.guarantee-chip i { font-size: 14px; }
.guarantee-chip.green i { color: #10b981; }
.guarantee-chip.blue  i { color: #2980b9; }
.guarantee-chip.purple i { color: #8b5cf6; }
.guarantee-chip.amber  i { color: #f59e0b; }

/* ─── Two-Column Layout ────────────────────────────────────── */
.feedback-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 1024px) {
    .feedback-layout { grid-template-columns: 1fr; }
}

/* ─── Card Base ────────────────────────────────────────────── */
.fb-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.fb-card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 12px;
}
.fb-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.fb-card-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.fb-card-icon.green  { background: #d1fae5; color: #059669; }
.fb-card-icon.purple { background: #ede9fe; color: #7c3aed; }
.fb-card-icon.amber  { background: #fef3c7; color: #d97706; }
.fb-card-icon.red    { background: #fee2e2; color: #dc2626; }

.fb-card-header h3 {
    font-size: 15px; font-weight: 700; color: var(--text-dark);
    margin-bottom: 2px;
}
.fb-card-header p { font-size: 12px; color: var(--text-light); }
.fb-card-body { padding: 24px; }

/* ─── Category Cards ───────────────────────────────────────── */
.category-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 10px; margin-bottom: 0;
}
@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}
.cat-card {
    border: 2px solid var(--border);
    border-radius: 12px; padding: 14px 10px;
    text-align: center; cursor: pointer;
    transition: all .2s ease;
    background: var(--bg-gray);
    position: relative;
}
.cat-card input[type="radio"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.cat-card:hover { border-color: #93c5fd; background: #eff6ff; }
.cat-card.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.cat-card.selected .cat-icon { transform: scale(1.1); }
.cat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin: 0 auto 8px;
    transition: transform .2s;
}
.cat-icon.red    { background:#fee2e2; color:#dc2626; }
.cat-icon.amber  { background:#fef3c7; color:#d97706; }
.cat-icon.blue   { background:#dbeafe; color:#1d4ed8; }
.cat-icon.green  { background:#d1fae5; color:#059669; }
.cat-icon.purple { background:#ede9fe; color:#7c3aed; }

.cat-label {
    font-size: 12px; font-weight: 600;
    color: var(--text-medium); display: block;
}

/* ─── Anonymity Toggle ─────────────────────────────────────── */
.anon-toggle-wrap {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border: 1.5px solid #fbbf24;
    border-radius: 12px; cursor: pointer;
    transition: all .2s;
    user-select: none;
}
.anon-toggle-wrap:hover { border-color: #f59e0b; background: #fef0c0; }
.anon-toggle-wrap.active {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
    border-color: #34d399;
}

.anon-switch {
    width: 46px; height: 26px; flex-shrink: 0;
    background: #d1d5db; border-radius: 50px;
    position: relative; transition: background .25s;
    margin-top: 2px;
}
.anon-switch::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    background: white; border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform .25s;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.anon-toggle-wrap.active .anon-switch { background: #10b981; }
.anon-toggle-wrap.active .anon-switch::after { transform: translateX(20px); }

.anon-text strong {
    display: block; font-size: 14px;
    font-weight: 700; color: var(--text-dark); margin-bottom: 3px;
}
.anon-text span { font-size: 12.5px; color: var(--text-light); line-height: 1.5; }

.anon-identity-note {
    display: none;
    margin-top: 10px; padding: 10px 14px;
    background: rgba(16,185,129,.08);
    border: 1px solid rgba(16,185,129,.2);
    border-radius: 8px;
    font-size: 12px; color: #065f46;
    line-height: 1.5;
}
.anon-identity-note.show { display: flex; align-items: flex-start; gap: 8px; }
.anon-identity-note i { color: #059669; flex-shrink: 0; margin-top: 1px; }

/* ─── Form Elements ────────────────────────────────────────── */
.fb-form-group { margin-bottom: 20px; }
.fb-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-medium); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .5px;
}
.fb-label span.req { color: #ef4444; margin-left: 2px; }
.fb-input, .fb-select, .fb-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px; font-family: 'Inter', sans-serif;
    color: var(--text-dark); background: #fff;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.fb-input:focus, .fb-select:focus, .fb-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.fb-textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.fb-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 36px; }

.char-counter {
    text-align: right; font-size: 11.5px;
    color: var(--text-muted); margin-top: 4px;
}
.char-counter.warn { color: #f59e0b; }
.char-counter.limit { color: #ef4444; }

/* Priority badges */
.priority-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.priority-btn {
    border: 1.5px solid var(--border);
    border-radius: 8px; padding: 9px 8px;
    text-align: center; cursor: pointer;
    font-size: 12px; font-weight: 600;
    background: var(--bg-gray);
    transition: all .2s; user-select: none;
}
.priority-btn input[type="radio"] { display: none; }
.priority-btn.sel-rendah  { border-color:#10b981; background:#d1fae5; color:#065f46; }
.priority-btn.sel-sedang  { border-color:#f59e0b; background:#fef3c7; color:#92400e; }
.priority-btn.sel-tinggi  { border-color:#ef4444; background:#fee2e2; color:#991b1b; }
.priority-btn.sel-urgent  { border-color:#dc2626; background:#dc2626; color:#fff; }
.priority-btn:not([class*="sel-"]):hover { border-color:#93c5fd; background:#eff6ff; }
.p-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; margin-right: 4px;
}
.p-dot.rendah { background: #10b981; }
.p-dot.sedang { background: #f59e0b; }
.p-dot.tinggi { background: #ef4444; }
.p-dot.urgent { background: #fff; }

/* ─── Submit Button ────────────────────────────────────────── */
.btn-submit-feedback {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    border: none; border-radius: 10px;
    color: #fff; font-size: 15px; font-weight: 700;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: all .2s; letter-spacing: .2px;
    box-shadow: 0 4px 16px rgba(29,78,216,.3);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit-feedback:hover:not(:disabled) {
    opacity: .92; transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(29,78,216,.38);
}
.btn-submit-feedback:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.btn-spinner {
    width: 16px; height: 16px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Right Column Info Panel ──────────────────────────────── */
.info-section { margin-bottom: 16px; }
.info-section:last-child { margin-bottom: 0; }

.privacy-steps { list-style: none; }
.privacy-step {
    display: flex; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.privacy-step:last-child { border-bottom: none; }
.step-num {
    width: 26px; height: 26px; flex-shrink: 0;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700;
    margin-top: 1px;
}
.step-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.step-text span   { font-size: 12px; color: var(--text-light); line-height: 1.5; }

.who-can-see {
    padding: 10px 12px;
    border-radius: 10px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500;
}
.who-can-see.green { background:#d1fae5; color:#065f46; border:1px solid #a7f3d0; }
.who-can-see.blue  { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; }
.who-can-see.gray  { background:#f3f4f6; color:#6b7280; border:1px solid #e5e7eb; }
.who-can-see i { font-size: 14px; flex-shrink: 0; }

/* ─── My History Table ─────────────────────────────────────── */
.history-filters {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.hf-btn {
    padding: 7px 14px; border-radius: 20px;
    border: 1.5px solid var(--border);
    background: #fff; font-size: 12.5px; font-weight: 600;
    color: var(--text-light); cursor: pointer; transition: all .2s;
    font-family: 'Inter', sans-serif;
}
.hf-btn:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.hf-btn.active { border-color: #2563eb; color: #2563eb; background: #eff6ff; }

.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
    border: 1.5px solid var(--border); border-radius: 12px;
    padding: 16px 18px; background: #fff;
    cursor: pointer; transition: all .2s;
}
.history-item:hover { border-color: #93c5fd; box-shadow: var(--shadow-sm); }
.hi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hi-ticket { font-size: 12px; font-weight: 700; color: #2563eb; letter-spacing: .5px; }
.hi-subject { font-size: 14px; font-weight: 600; color: var(--text-dark); margin: 2px 0; }
.hi-meta { font-size: 12px; color: var(--text-light); }
.hi-meta i { margin-right: 4px; }
.hi-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge-cat, .badge-priority, .badge-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    text-transform: capitalize;
}
/* Category */
.bc-pengaduan { background:#fee2e2; color:#991b1b; }
.bc-kritik    { background:#fef3c7; color:#92400e; }
.bc-saran     { background:#dbeafe; color:#1e40af; }
.bc-keluhan   { background:#ede9fe; color:#6d28d9; }
.bc-feedback  { background:#d1fae5; color:#065f46; }
/* Status */
.bs-baru      { background:#dbeafe; color:#1e40af; }
.bs-dibaca    { background:#fef3c7; color:#92400e; }
.bs-diproses  { background:#ede9fe; color:#6d28d9; }
.bs-selesai   { background:#d1fae5; color:#065f46; }
.bs-ditolak   { background:#fee2e2; color:#991b1b; }
/* Priority */
.bp-rendah  { background:#d1fae5; color:#065f46; }
.bp-sedang  { background:#fef3c7; color:#92400e; }
.bp-tinggi  { background:#fee2e2; color:#991b1b; }
.bp-urgent  { background:#dc2626; color:#fff; }

/* ─── Response Panel inside history item ───────────────────── */
.hi-response {
    display: none;
    margin-top: 12px; padding: 12px 14px;
    background: linear-gradient(135deg,#eff6ff,#f0fdf4);
    border: 1px solid #bfdbfe; border-radius: 10px;
    font-size: 13px; color: var(--text-medium); line-height: 1.6;
}
.hi-response.show { display: block; }
.hi-response-by { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.hi-response-by i { margin-right: 4px; }

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ─── Success Modal ────────────────────────────────────────── */
.fb-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.55); z-index: 9999;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.fb-modal-overlay.open { display: flex; }
.fb-modal {
    background: #fff; border-radius: 20px;
    padding: 40px 36px; max-width: 420px; width: 90%;
    text-align: center;
    animation: modalIn .3s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
@keyframes modalIn {
    from { opacity:0; transform: scale(.88) translateY(20px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.modal-icon-wrap {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg,#d1fae5,#a7f3d0);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px; color: #059669;
    box-shadow: 0 8px 24px rgba(16,185,129,.25);
}
.fb-modal h3 { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.fb-modal p  { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 6px; }
.ticket-display {
    display: inline-block;
    background: linear-gradient(135deg,#1d4ed8,#2563eb);
    color: #fff; font-size: 18px; font-weight: 800;
    padding: 10px 24px; border-radius: 10px;
    letter-spacing: 1px; margin: 12px 0 4px;
    box-shadow: 0 4px 16px rgba(29,78,216,.35);
}
.anon-confirm-badge {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px; padding: 7px 14px;
    border-radius: 20px; font-size: 12.5px; font-weight: 600;
    background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0;
}
.modal-close-btn {
    margin-top: 20px; padding: 12px 32px;
    background: linear-gradient(135deg,#1d4ed8,#1e40af);
    border: none; border-radius: 10px;
    color: #fff; font-size: 14px; font-weight: 700;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: opacity .2s;
}
.modal-close-btn:hover { opacity: .88; }

/* ─── Admin/HR Modal Overlay ───────────────────────────────── */
.admin-detail-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 9999;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.admin-detail-overlay.open { display: flex; }
.admin-detail-modal {
    background: #fff; border-radius: 18px;
    width: 90%; max-width: 600px; max-height: 90vh;
    overflow-y: auto;
    animation: modalIn .3s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.adm-modal-header {
    padding: 20px 24px 16px;
    background: linear-gradient(135deg,#0d1b2a,#1b3a5c);
    border-radius: 18px 18px 0 0;
    display: flex; align-items: center; justify-content: space-between;
}
.adm-modal-header h3 { font-size: 16px; font-weight: 700; color: #fff; }
.adm-close { background:none; border:none; color: rgba(255,255,255,.7); font-size: 18px; cursor:pointer; transition: color .2s; }
.adm-close:hover { color: #fff; }
.adm-modal-body { padding: 24px; }

.adm-identity-card {
    background: linear-gradient(135deg,#fffbeb,#fef3c7);
    border: 1.5px solid #fbbf24; border-radius: 12px;
    padding: 16px 18px; margin-bottom: 18px;
}
.adm-identity-card h4 {
    font-size: 13px; font-weight: 700; color: #92400e;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.adm-id-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.adm-id-label { font-size: 12.5px; color: #78350f; font-weight: 600; min-width: 80px; }
.adm-id-value { font-size: 13px; color: #451a03; font-weight: 700; }

.adm-section { margin-bottom: 16px; }
.adm-section-title {
    font-size: 12px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.adm-message {
    background: var(--bg-gray); border: 1px solid var(--border);
    border-radius: 10px; padding: 14px 16px;
    font-size: 14px; color: var(--text-dark); line-height: 1.65;
}

/* Response Form */
.response-form-area textarea {
    width: 100%; min-height: 100px;
    padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: 10px; font-family: 'Inter', sans-serif;
    font-size: 14px; color: var(--text-dark);
    outline: none; resize: vertical; transition: border-color .2s;
}
.response-form-area textarea:focus { border-color: #2563eb; }

.adm-status-select {
    padding: 9px 14px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 13.5px;
    color: var(--text-dark); outline: none; cursor: pointer;
    background: #fff; transition: border-color .2s; margin-bottom: 12px;
    width: 100%;
}
.adm-status-select:focus { border-color: #2563eb; }

.btn-save-response {
    padding: 11px 24px;
    background: linear-gradient(135deg,#059669,#047857);
    border: none; border-radius: 8px;
    color: #fff; font-size: 13.5px; font-weight: 700;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: opacity .2s;
}
.btn-save-response:hover { opacity: .88; }

/* ─── Stats row ────────────────────────────────────────────── */
.fb-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    margin-bottom: 28px;
}
@media (max-width: 768px) {
    .fb-stats-row { grid-template-columns: repeat(2, 1fr); }
}
.fb-stat-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 12px;
}
.fb-stat-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.fb-stat-num { font-size: 22px; font-weight: 800; color: var(--text-dark); line-height: 1; }
.fb-stat-lbl { font-size: 12px; color: var(--text-light); margin-top: 3px; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .feedback-hero { flex-direction: column; padding: 28px 24px; }
    .hero-badge { width: 100%; justify-content: center; }
    .category-grid { grid-template-columns: repeat(3,1fr); }
    .priority-grid { grid-template-columns: repeat(2,1fr); }
}
