/* Base Styling */
.peraturan-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #f0f4ff 0%, #f8fafc 100%);
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

.peraturan-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0rem 3.5rem 3.5rem;
}

/* Card Base - Enhanced */
.p-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.p-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Document Info Section - Wrapper for two cards */
.doc-info-wrapper {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.doc-preview-card {
    flex: 0 0 42%;
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-preview-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.doc-info-card {
    flex: 0 0 calc(58% - 1.5rem);
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-info-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.doc-preview-card {
    color: #1a365d;
    font-weight: 600;
    font-size: 1.1rem;
}

.doc-preview-card .pdf-viewer {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 600px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.doc-preview-card .pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.doc-preview-card .pdf-placeholder {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.doc-preview-card .pdf-icon {
    width: 60px;
    height: 60px;
    opacity: 0.4;
}

.btn-preview {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.btn-preview:hover {
    background: #f8fafc;
}

/* Document Details */
.doc-details-title {
    /* Standard Grey */
    color: #808080;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.info-row {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.info-label {
    flex: 0 0 200px;
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 500;
}

.info-sep {
    flex: 0 0 25px;
    color: #64748b;
    font-size: 1.2rem;
}

.info-value {
    flex: 1;
    font-size: 1.2rem;
    color: #1e293b;
    line-height: 1.7;
    font-weight: 500;
}

.kelengkapan-section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
}

.kelengkapan-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

/* Info Template Box */
.info-template {
    margin-top: 2.5rem;
    padding: 2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.info-template p {
    font-size: 1.15rem;
    color: #475569;
    line-height: 1.8;
    margin: 0;
}

/* Document Buttons */
.doc-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 24px;
    font-size: 1.15rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.doc-btn svg {
    width: 18px;
    height: 18px;
}

.doc-btn.primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.doc-btn.primary:hover {
    background: #2563eb;
}

.doc-btn.secondary {
    background: #fff;
    color: #64748b;
}

.doc-btn.secondary:hover {
    background: #f8fafc;
}

.doc-btn.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* Progress Stepper - Enhanced */
.progress-section h4 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 16px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    min-width: 130px;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-icon svg {
    width: 28px;
    height: 28px;
}

.step-icon.completed {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.step-icon.current {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6);
    }
}

.step-icon.pending {
    background: #e2e8f0;
    color: #94a3b8;
}

.step-label {
    font-size: 1.05rem;
    font-weight: 600;
    max-width: 120px;
}

.step-label.completed {
    color: #16a34a;
}

.step-label.active {
    color: #2563eb;
}

.step-label.inactive {
    color: #94a3b8;
}

/* Step connector line */
.step-connector {
    display: flex;
    align-items: center;
    height: 6vh;
    flex: 1;
    max-width: 120px;
}

.step-connector .line {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
}

.step-connector .line.completed {
    background: #22c55e;
}

.step-connector .line.to-current {
    background: #3b82f6;
}

/* Progress Section Header */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.progress-header h4 {
    margin: 0;
}

.btn-history {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-history:hover {
    background: #e2e8f0;
    color: #475569;
}

.btn-history svg {
    width: 16px;
    height: 16px;
}

/* History Panel */
.history-panel {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.history-panel.show {
    display: block;
}

.history-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.history-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    flex: 0 0 140px;
    font-size: 1.1rem;
    color: #64748b;
}

.history-content {
    flex: 1;
}

.history-status {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.history-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.history-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.05rem;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.2s;
}

.history-file-link:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.history-file-link svg {
    width: 18px;
    height: 18px;
}

/* === Tabs Navigation === */
.detail-info-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    overflow: hidden;
}

.detail-info-header {
    padding: 1.5rem 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-info-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.tabs-nav {
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #3b82f6;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

/* === Accordion === */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    color: #64748b;
    transition: transform 0.3s;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 1.5rem;
    background: #fff;
}

.accordion-item.open .accordion-body {
    display: block;
}

/* === Timeline Items - DPR Inspired Design === */
.accordion-body {
    position: relative;
    padding-left: 2rem;
}

/* Vertical timeline line */
.accordion-body::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 3px;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    padding-left: 1rem;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    margin-top: 0.3rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.4);
    border: 3px solid #fff;
}

.timeline-dot.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.timeline-dot.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.timeline-content {
    flex: 1;
    padding-bottom: 0.5rem;
}

.timeline-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.timeline-badge.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-badge.green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.3);
}

.timeline-badge.red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.3);
}

.timeline-desc {
    font-size: 1.15rem;
    color: #1e293b;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.timeline-date {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.timeline-date svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* Document Links - DPR Style with border */
.timeline-files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.timeline-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #c026d3;
    border-radius: 10px;
    font-size: 1rem;
    color: #c026d3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    max-width: fit-content;
}

.timeline-file-link:hover {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border-color: #a21caf;
    color: #a21caf;
    transform: translateX(4px);
}

.timeline-file-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.timeline-file-link.pdf {
    border-color: #dc2626;
    color: #dc2626;
}

.timeline-file-link.pdf:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #b91c1c;
    color: #b91c1c;
}

.timeline-file-link.word {
    border-color: #2563eb;
    color: #2563eb;
}

.timeline-file-link.word:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #1d4ed8;
    color: #1d4ed8;
}

/* Timeline Notes Section */
.timeline-notes {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 0 10px 10px 0;
}

.timeline-notes .notes-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 0.5rem;
}

.timeline-notes .notes-label svg {
    width: 18px;
    height: 18px;
}

.timeline-notes .notes-content {
    margin: 0;
    font-size: 1.15rem;
    color: #1e293b;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Form Section */
.form-section h4 {
    color: #1e293b;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.form-section .subtitle {
    color: #64748b;
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 2.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.15rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-full {
    grid-column: span 2;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.recaptcha-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.recaptcha-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.recaptcha-box span {
    font-size: 0.875rem;
    color: #475569;
}

.recaptcha-icon {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.5rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    width: 14vw;
    height: 5vh;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 126, 238, 0.3);
}

.btn-submit:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-submit.loading svg {
    animation: spin 1s linear infinite;
}

/* Responsive form footer */
@media (max-width: 640px) {
    .form-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-submit {
        width: 100%;
        padding: 1rem;
    }
}

/* Table Section */
.table-section h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th:first-child {
    text-align: center;
    width: 80px;
}

.text-center {
    text-align: center !important;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.15rem;
    vertical-align: middle;
}

.data-table td:first-child {
    font-weight: 600;
    color: #1e293b;
    width: 60px;
    text-align: center;
}

.data-table td:nth-child(2) {
    font-weight: 500;
    color: #1e293b;
}

.data-table .instansi {
    color: #3b82f6;
    font-weight: 500;
}

.data-table .feedback {
    color: #475569;
    line-height: 1.6;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.data-table tbody tr:hover {
    background: #f0f9ff;
}

/* Responsive */
@media (max-width: 768px) {
    .doc-info-wrapper {
        flex-direction: column;
    }

    .doc-preview-card {
        flex: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-full {
        grid-column: span 1;
    }

    .form-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .stepper::before,
    .stepper::after {
        display: none;
    }

    .stepper {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
        padding: 1rem;
    }

    .step {
        min-width: 80px;
    }

    .step-icon {
        width: 44px;
        height: 44px;
    }

    .step-label {
        font-size: 1rem;
    }

    .page-hero {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .page-hero h1 {
        font-size: 1.25rem;
    }

    .page-hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .peraturan-container {
        padding: 1rem 1rem 2rem;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .step-connector {
        display: none;
    }

    .stepper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .step {
        min-width: auto;
    }
}