/* =========================
   TEMA UTAMA (WHITE MODERN)
========================= */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7f6;
    margin: 0;
    padding: 30px 20px;
    color: #333;
}

.app-container {
    max-width: 1000px;
    margin: auto;
}

.main-header {
    text-align: center;
    margin-bottom: 30px;
}

.main-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.main-header p {
    color: #666;
    margin-top: 5px;
    font-weight: 300;
}

/* =========================
   PROGRESS BAR
========================= */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 20px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step-indicator {
    text-align: center;
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step-indicator span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin: 0 auto 5px;
    font-weight: 600;
    color: #999;
    transition: all 0.3s ease;
}

.step-indicator.active span {
    background: #1e3c72;
    border-color: #1e3c72;
    color: #fff;
    box-shadow: 0 4px 10px rgba(30, 60, 114, 0.3);
}

.step-indicator.active {
    color: #1e3c72;
}

/* =========================
   CARD & STEP CONTAINER
========================= */
.card-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 40px;
    min-height: 500px;
}

.step-box {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation:fadeIn 0.5s ease-in-out;
}

.step-box.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 600;
}

.sub-instruction {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* =========================
   UPLOAD ZONE
========================= */
.upload-zone {
    border: 2px dashed #d0d5dd;
    background: #fafbfc;
    padding: 50px 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    transition: 0.3s;
}

.upload-zone:hover {
    border-color: #1e3c72;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* =========================
   CANVAS WRAPPER
========================= */
.canvas-wrapper {
    width: 100%;
    max-width: 700px;
    background: #f4f7f6;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

canvas {
    border-radius: 8px;
    background: #fff;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* =========================
   BUTTONS
========================= */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn:active { transform: translateY(0); }

.btn-primary { background: #1e3c72; }
.btn-light { background: #f0f2f5; color: #333; border: 1px solid #dce0e5; }
.btn-warning { background: #f39c12; }
.btn-success { background: #2ecc71; }
.btn-orange { background: #e67e22; }
.btn-danger { background: #e74c3c; }
.btn-dark { background: #2c3e50; }

/* =========================
   CONTROLS & ACTIONS
========================= */
.canvas-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.status-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-tag.pending { background: #ffeeba; color: #856404; }
.status-tag.success { background: #d4edda; color: #155724; }

/* =========================
   FINAL A4 LAYOUT
========================= */
.final-layout {
    display: flex;
    gap: 40px;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
}

.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.a4-wrapper {
    max-width: 400px;
    border: 1px solid #e0e0e0;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.settings-section {
    width: 320px;
    background: #fafbfc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.settings-section h3 {
    color: #1a1a1a;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.radio-card {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

.radio-card input { display: none; }
.radio-card:has(input:checked) { border-color: #1e3c72; background: #f0f4ff; color: #1e3c72; font-weight: 600; }

.divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 25px 0;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.slider-group span {
    float: right;
    color: #1e3c72;
    font-weight: 600;
}

.slider-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #1e3c72;
    border-radius: 50%;
    cursor: pointer;
}

/* =========================
   FOOTER
========================= */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #888;
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0 20px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .final-layout { flex-direction: column-reverse; align-items: center; }
    .settings-section { width: 100%; max-width: 400px; }
    .progress-bar { font-size: 0.7rem; }
    .main-header h1 { font-size: 1.8rem; }
}