/* ============================================
   PPG UNASMAN - Main Stylesheet
   Premium Blue Gradient Theme
   ============================================ */

:root {
    --primary-start: #1e3a8a;
    --primary-mid: #2563eb;
    --primary-end: #3b82f6;
    --primary-light: #dbeafe;
    --primary-lighter: #eff6ff;
    --gradient-main: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    --gradient-card: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-icon {
    font-size: 4rem;
    opacity: 0.9;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.95;
}

.hero-institution {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.hero-actions .btn-light {
    font-weight: 600;
    border-radius: var(--radius-md);
    color: var(--primary-start);
}

.hero-actions .btn-outline-light {
    font-weight: 600;
    border-radius: var(--radius-md);
    border-width: 2px;
}

.info-card {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-card i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.info-card span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Info Section */
.info-section {
    background: #f8fafc;
}

.info-section .card {
    border-radius: var(--radius-lg);
}

/* Footer */
.footer-section {
    background: var(--gradient-dark);
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-header {
    background: var(--gradient-main);
    padding: 40px 0;
    color: #fff;
    margin-bottom: 30px;
}

.form-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.form-header p {
    opacity: 0.85;
}

/* Progress Bar */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    padding: 0 15px;
    flex-wrap: wrap;
    gap: 5px;
}

.step-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step-circle.active {
    background: var(--primary-mid);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.step-circle.completed {
    background: #10b981;
    color: #fff;
}

.step-label {
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.step-label.active {
    color: var(--primary-mid);
    font-weight: 600;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 5px;
}

.step-connector.completed {
    background: #10b981;
}

/* Form Card */
.form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.form-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-start);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
}

.form-card-title i {
    margin-right: 10px;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
    font-size: 0.88rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #94a3b8;
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #1e293b;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.invalid-feedback {
    font-size: 0.8rem;
}

.form-text {
    font-size: 0.78rem;
    color: #64748b;
}

/* File Upload */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: var(--primary-mid);
    background: var(--primary-lighter);
}

.upload-area.dragover {
    border-color: var(--primary-mid);
    background: var(--primary-light);
}

.upload-area i {
    font-size: 2rem;
    color: var(--primary-mid);
}

.upload-area p {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.file-preview {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0fdf4;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    border: 1px solid #bbf7d0;
}

.file-preview i {
    color: #10b981;
    font-size: 1.2rem;
    margin-right: 10px;
}

.file-preview .file-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

.file-preview .file-remove {
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Draft Indicator */
.draft-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s ease;
}

.draft-indicator.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-indicator i {
    font-size: 1rem;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-nav {
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-nav-next {
    background: var(--gradient-main);
    color: #fff;
    border: none;
}

.btn-nav-next:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-nav-prev {
    background: #fff;
    color: var(--primary-mid);
    border: 2px solid var(--primary-mid);
}

.btn-nav-prev:hover {
    background: var(--primary-lighter);
    color: var(--primary-mid);
}

.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: #fff;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.admin-sidebar {
    background: var(--gradient-dark);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.admin-sidebar .brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .brand h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0;
}

.admin-sidebar .brand small {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-topbar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Data Table */
.data-table {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.data-table .table {
    margin-bottom: 0;
}

.data-table .table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 15px;
    white-space: nowrap;
}

.data-table .table td {
    padding: 12px 15px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.data-table .table tbody tr:hover {
    background: #f8fafc;
}

/* Login Page */
.login-page {
    background: var(--gradient-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.login-card h3 {
    font-weight: 700;
    color: var(--primary-start);
}

/* Continue Page */
.continue-section {
    background: var(--gradient-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.continue-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

/* Alerts & Notifications */
.alert-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .progress-steps {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-connector {
        display: none;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-navigation .btn-nav {
        width: 100%;
    }
    
    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .info-card {
        padding: 10px;
    }
}

/* Utility */
.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-main {
    background: var(--gradient-main);
}

.cursor-pointer {
    cursor: pointer;
}

/* Modal */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

/* Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.show {
    display: flex;
}

/* ============================================
   NEW FORM LAYOUT (Model Referensi)
   Header + Sidebar + Form
   ============================================ */

/* Header Bar with Logos */
.form-header-bar {
    background: var(--gradient-dark);
    padding: 20px 0;
    color: #fff;
}

.header-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    padding: 5px;
}

.header-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.header-title em {
    font-style: italic;
    color: #93c5fd;
}

.header-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto;
}

/* Sidebar Panduan */
.sidebar-panduan {
    background: linear-gradient(180deg, #0f2b46 0%, #1a3a5c 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: 20px;
    color: #fff;
}

.sidebar-panduan-header {
    padding: 20px 20px 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-panduan-body {
    padding: 10px 20px 20px;
}

.panduan-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 0;
    border-bottom: none;
}

.panduan-item:last-child {
    margin-bottom: 0;
}

.panduan-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: #7dd3fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 12px;
    margin-top: 2px;
}

.panduan-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

.sidebar-contact {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* Form Main Card */
.form-main-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.form-main-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #f1f5f9;
}

.form-main-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
}

/* Progress Steps Inline */
.progress-steps-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 5px;
    flex-wrap: wrap;
}

.step-item-inline {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.step-connector-inline {
    width: 30px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 8px;
}

.step-connector-inline.completed {
    background: #10b981;
}

/* Form Section Title */
.form-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    padding: 0 30px;
    margin-top: 25px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    color: var(--primary-mid);
    font-size: 1.1rem;
}

/* Form Step inside main card */
.form-step {
    padding: 0 30px 20px;
}

.form-step .form-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Submit Button override */
.btn-submit {
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-mid) 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    color: #fff;
}

/* Responsive for new layout */
@media (max-width: 991px) {
    .header-logo {
        width: 50px;
        height: 50px;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .header-subtitle {
        font-size: 0.75rem;
    }
    
    .sidebar-panduan {
        position: static;
    }
    
    .form-step {
        padding: 0 15px 15px;
    }
    
    .form-main-header {
        padding: 20px 15px 10px;
    }
    
    .form-section-title {
        padding: 0 15px;
    }
    
    .progress-steps-inline {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .form-header-bar .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo {
        margin-bottom: 10px;
    }
    
    .step-connector-inline {
        width: 15px;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
}

/* Logo placeholder fallback */
img.header-logo[src="assets/img/logo_placeholder.svg"],
img.header-logo[src=""] {
    background: rgba(255,255,255,0.2);
    border: 2px dashed rgba(255,255,255,0.4);
}

/* ============================================
   WILAYAH DROPDOWN STYLES
   ============================================ */

.wilayah-wrapper {
    position: relative;
}

.wilayah-wrapper .toggle-manual {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: none;
}

.wilayah-wrapper .toggle-manual:hover {
    text-decoration: underline;
}

.wilayah-wrapper input[type="text"] {
    margin-bottom: 0;
}
