/* ===========================
   THIQLA INTRANET - Request Page Styles
   =========================== */

/* =====================
   PAGE HERO
   ===================== */
.req-hero {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 55%, #4f46e5 100%);
}

/* =====================
   REQUEST TYPE SELECTOR
   ===================== */
.req-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.req-type-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.req-type-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,86,219,.03), transparent);
    opacity: 0;
    transition: opacity .25s;
}

.req-type-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 32px rgba(79,70,229,.12);
    transform: translateY(-4px);
}
.req-type-card:hover::before { opacity: 1; }

.req-type-card.selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.12), 0 8px 32px rgba(79,70,229,.18);
}

.req-type-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    flex-shrink: 0;
}

.req-type-info h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.35;
}

.req-type-info p {
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.6;
}

.req-type-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    letter-spacing: .5px;
    width: fit-content;
}
.req-type-badge.blue { background: #eff6ff; color: #1d4ed8; }
.req-type-badge.green { background: #ecfdf5; color: #065f46; }
.req-type-badge.orange { background: #fffbeb; color: #92400e; }

.req-type-arrow {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: all .2s;
}
.req-type-card:hover .req-type-arrow {
    right: 16px;
    color: var(--primary);
}

/* =====================
   FORM SECTION HEADER
   ===================== */
.req-form-section {
    animation: fadeInUp .35s ease forwards;
}

.form-section-header {
    border-radius: var(--radius-xl);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    color: white;
    flex-wrap: wrap;
}

.back-btn {
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.3);
    color: white;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.back-btn:hover {
    background: rgba(255,255,255,.25);
    transform: translateX(-3px);
}

.form-section-header > div:nth-child(2) {
    flex: 1;
}

.form-section-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-header h2 i {
    font-size: 18px;
    opacity: .85;
}

.form-section-header p {
    font-size: 13px;
    opacity: .75;
}

.form-badge {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    flex-shrink: 0;
}

/* =====================
   FORM CARDS
   ===================== */
.req-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.form-card-header {
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-gray);
}

.form-section-num {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    flex-shrink: 0;
}

.form-card-header h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.form-card-header p {
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================
   FORM CONTROLS
   ===================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding: 20px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: white;
    transition: all .2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled {
    background: var(--bg-gray);
    color: var(--text-muted);
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* =====================
   RADIO CARDS (Jenis Request)
   ===================== */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    cursor: pointer;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-content {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all .2s;
    background: white;
}

.radio-content i {
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.radio-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.radio-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.radio-card input:checked + .radio-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.radio-card input:checked + .radio-content i {
    color: var(--primary);
}

.radio-card input:checked + .radio-content .radio-title {
    color: var(--primary);
}

.radio-card:hover .radio-content {
    border-color: #93c5fd;
    background: #f8faff;
}

/* =====================
   DAMAGE LEVEL CARDS
   ===================== */
.damage-level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.damage-card {
    cursor: pointer;
}

.damage-card input[type="radio"] {
    display: none;
}

.damage-content {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: all .2s;
}

.damage-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.damage-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.damage-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.damage-card:hover .damage-content {
    border-color: #fbbf24;
    background: #fffbeb;
}

.damage-card input:checked + .damage-content {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

/* =====================
   ITEM TABLE (Pengadaan)
   ===================== */
.item-table-wrapper {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    overflow-x: auto;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.item-table th {
    background: var(--bg-gray);
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-medium);
    border-bottom: 1.5px solid var(--border);
}

.item-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.item-table tr:last-child td {
    border-bottom: none;
}

.item-table tr:hover td {
    background: #f9fafb;
}

.item-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.form-control-sm {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: white;
    transition: border .2s;
    outline: none;
}

.form-control-sm:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,86,219,.08);
}

.btn-remove-row {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    width: 30px; height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: all .2s;
}

.btn-remove-row:hover {
    background: #dc2626;
    color: white;
}

.btn-add-row {
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px dashed #93c5fd;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
}

.btn-add-row:hover {
    background: #dbeafe;
    border-color: var(--primary);
}

.total-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-gray);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.total-display span {
    font-size: 13px;
    color: var(--text-medium);
}

.total-display strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--success);
}

/* =====================
   FORM ACTIONS
   ===================== */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    flex-wrap: wrap;
}

.btn-form-secondary {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text-medium);
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
}
.btn-form-secondary:hover { border-color: #9ca3af; background: var(--bg-gray); }

.btn-form-draft {
    background: var(--bg-gray);
    border: 1.5px solid var(--border);
    color: var(--text-dark);
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
}
.btn-form-draft:hover { background: #e5e7eb; border-color: #9ca3af; }

.btn-form-submit {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border: none;
    color: white;
    padding: 10px 28px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 14px rgba(26,86,219,.3);
}
.btn-form-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,86,219,.4); }
.btn-form-submit:active { transform: translateY(0); }

.btn-form-submit.loading {
    opacity: .75;
    pointer-events: none;
}

/* =====================
   RIWAYAT SECTION
   ===================== */
.riwayat-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 8px;
}

.riwayat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg-gray);
}

.riwayat-header h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.riwayat-header h3 i { color: var(--primary); }

.riwayat-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.riwayat-filters {
    display: flex;
    gap: 8px;
}

/* Request item card in list */
.req-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background .15s;
    cursor: pointer;
}

.req-item:last-child { border-bottom: none; }
.req-item:hover { background: var(--bg-gray); }

.req-item-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.req-item-info {
    flex: 1;
}

.req-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.req-item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.req-item-meta span {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.req-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.status-Draft { background: #f3f4f6; color: #6b7280; }
.status-Submitted { background: #dbeafe; color: #1d4ed8; }
.status-Review, .status-Review\ HR, .status-Review\ GA, .status-Review\ Finance { background: #fef3c7; color: #92400e; }
.status-Disetujui { background: #d1fae5; color: #065f46; }
.status-Ditolak { background: #fee2e2; color: #991b1b; }
.status-Proses\ Rekrutmen, .status-Proses\ Pengadaan { background: #ede9fe; color: #5b21b6; }
.status-Dijadwalkan, .status-Dalam\ Perbaikan { background: #fce7f3; color: #9d174d; }
.status-Selesai { background: #ecfdf5; color: #047857; }
.status-Tidak\ Dapat\ Diperbaiki { background: #fef2f2; color: #991b1b; }

/* Empty state */
.riwayat-empty {
    text-align: center;
    padding: 60px 24px;
}

.empty-icon {
    width: 72px; height: 72px;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: var(--text-muted);
    margin: 0 auto 16px;
}

.riwayat-empty h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.riwayat-empty p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =====================
   SUCCESS MODAL
   ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .2s ease;
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.2);
    animation: scaleIn .25s ease forwards;
}

@keyframes scaleIn {
    from { opacity:0; transform: scale(.88); }
    to { opacity:1; transform: scale(1); }
}

.modal-success-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: white;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(5,150,105,.3);
}

.modal-box h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}

.modal-nomor {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    margin: 16px 0 24px;
    display: inline-block;
}

.modal-nomor span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.modal-nomor strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    font-family: monospace;
    letter-spacing: 1px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn-close {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all .2s;
}
.modal-btn-close:hover { background: #1341b0; }

.modal-btn-new {
    background: white;
    color: var(--text-medium);
    border: 1.5px solid var(--border);
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all .2s;
}
.modal-btn-new:hover { background: var(--bg-gray); }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
    .req-type-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: auto; }
    .radio-group { grid-template-columns: 1fr; }
    .damage-level-grid { grid-template-columns: 1fr 1fr; }
    .form-section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .damage-level-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .form-actions > * { width: 100%; justify-content: center; }
}
