/* Local Print - Modern Stylesheet (Mobile First & Highly Responsive) */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #0ea5e9;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    padding: 20px 12px;
}

.app-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header Component */
.app-header {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.server-badge {
    background: #dcfce7;
    color: #166534;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}

.server-badge .pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Upload Section */
.upload-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dropzone {
    border: 2px dashed #a5b4fc;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 26px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: #e0e7ff;
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    color: var(--primary);
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.dropzone-text {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.dropzone-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.file-input-hidden {
    display: none;
}

.upload-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover, .btn-primary:active {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-secondary:active {
    background: #e2e8f0;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}
.btn-danger:hover, .btn-danger:active {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Enhanced Page Notes Box */
.notes-upload-box {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.02);
    transition: all 0.25s ease;
}

.notes-upload-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.notes-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.notes-upload-label svg {
    color: var(--primary);
}

.input-text-large {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: var(--dark);
    background: #f8fafc;
    transition: all 0.2s ease;
}

.input-text-large:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Selected Files Container (Multiple Files) */
.selected-files-container {
    margin-top: 16px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.selected-files-header strong {
    font-size: 13.5px;
    color: var(--dark);
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.selected-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.selected-file-name {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.selected-file-size {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.btn-remove-single-file {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Upload Loading Progress Bar (Large, Prominent & Obvious) */
.progress-container-hero,
.progress-container {
    margin-top: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    border: 2px solid #818cf8;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.2);
    animation: fadeIn 0.3s ease;
}

.progress-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-hero-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-spinner-hero {
    width: 24px;
    height: 24px;
    border: 3.5px solid #c7d2fe;
    border-top: 3.5px solid #4f46e5;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    display: inline-block;
}

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

.status-hero-text,
#progressStatusText {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
}

.percent-hero-badge,
#progressPercent {
    font-size: 18px;
    font-weight: 800;
    color: #4f46e5;
    background: #ffffff;
    padding: 5px 16px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.progress-bar-bg-hero,
.progress-bar-bg {
    width: 100%;
    height: 24px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    padding: 3px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-fill-hero,
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #9333ea, #ec4899);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    animation: gradientShift 2s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Files Card */
.files-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-count-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.auto-cleanup-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* DESKTOP TABLE VIEW */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.files-table th {
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-align: left;
}

.files-table tbody tr {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.files-table tbody tr:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.files-table td {
    padding: 8px 10px;
    vertical-align: middle;
    font-size: 11.5px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.files-table td:first-child {
    border-left: 1px solid #f1f5f9;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.files-table td:last-child {
    border-right: 1px solid #f1f5f9;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.file-info-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-ext-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.ext-pdf { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ext-jpg, .ext-jpeg, .ext-png { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.ext-doc, .ext-docx { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ext-zip { background: linear-gradient(135deg, #f59e0b, #d97706); }

.file-name-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dark);
    word-break: break-all;
}

.file-name-link {
    text-decoration: none;
    color: var(--dark);
    transition: color 0.2s ease;
}

.file-name-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.page-notes-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    color: #312e81;
    padding: 2px 8px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
}

.days-left-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 15px;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

.modal-dialog-sm {
    max-width: 450px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.copies-form-group {
    margin-bottom: 12px;
}
.copies-form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
}
.input-number {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}
.toast {
    background: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
    border-left: 4px solid var(--primary);
    animation: toastIn 0.3s ease forwards;
    pointer-events: auto;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    flex: 1;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* ===================================================
   MOBILE PHONE OPTIMIZATIONS (CARD LAYOUT FOR HP)
   =================================================== */
@media (max-width: 680px) {
    body {
        padding: 12px 8px;
    }

    .app-header {
        padding: 14px 16px;
        flex-direction: row;
        align-items: center;
    }

    .brand-title {
        font-size: 19px;
    }

    .brand-subtitle {
        font-size: 11.5px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .server-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .upload-card, .files-card {
        padding: 16px;
        border-radius: 14px;
    }

    .dropzone {
        padding: 22px 12px;
    }

    .upload-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
        margin-top: 10px;
    }

    .upload-actions .btn {
        width: 100%;
        padding: 11px 16px;
        font-size: 14px;
    }

    /* Transform Table to Native Touch Mobile Cards */
    .files-table, 
    .files-table thead, 
    .files-table tbody, 
    .files-table th, 
    .files-table td, 
    .files-table tr {
        display: block;
    }

    .files-table thead {
        display: none; /* Hide standard headers on HP */
    }

    .files-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .files-table tbody tr {
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
        margin: 0;
    }

    .files-table td {
        padding: 4px 0;
        border: none !important;
    }

    .files-table td:first-child {
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9 !important;
        margin-bottom: 6px;
    }

    .files-table td:last-child {
        padding-top: 10px;
        border-top: 1px solid #f1f5f9 !important;
        margin-top: 6px;
    }

    /* Row details layout on HP */
    .files-table td[data-label="Jenis File"],
    .files-table td[data-label="Ukuran"],
    .files-table td[data-label="Tanggal Upload"],
    .files-table td[data-label="Masa Simpan"] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12.5px;
    }

    .files-table td[data-label="Jenis File"]::before { content: "Jenis File:"; font-weight: 600; color: var(--text-secondary); }
    .files-table td[data-label="Ukuran"]::before { content: "Ukuran:"; font-weight: 600; color: var(--text-secondary); }
    .files-table td[data-label="Tanggal Upload"]::before { content: "Tanggal:"; font-weight: 600; color: var(--text-secondary); }
    .files-table td[data-label="Masa Simpan"]::before { content: "Masa Simpan:"; font-weight: 600; color: var(--text-secondary); }

    .file-name-title {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;
    }

    .page-notes-badge-large {
        font-size: 12px;
        padding: 4px 10px;
        margin-top: 5px;
    }

    /* 2x2 Grid Action Buttons for HP */
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 9px 10px;
        font-size: 13px;
        min-height: 38px;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #btnDeleteAllFiles {
        width: 100%;
        justify-content: center;
        padding: 9px 12px;
    }
}

/* ===================================================
   ADMIN BUTTON & MAKALAH SECTION & PREVIEW MODAL FIX
   =================================================== */

/* Top Right Admin Button */
.btn-admin-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-admin-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
}

.btn-admin-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-admin-logout:hover {
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.35);
}

/* Large Text Upload Card (Matches File Upload Card Dimensions & Aesthetics) */
.text-upload-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-dropzone {
    border: 2px dashed #a5b4fc;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 26px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-dropzone:focus-within {
    border-color: var(--primary);
    background: #e0e7ff;
}

.text-icon-wrapper {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff !important;
}

.textarea-large-wrapper {
    margin-top: 14px;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

.makalah-textarea-hero {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 280px !important;
    padding: 18px 20px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: var(--radius-md) !important;
    font-size: 15px !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.7 !important;
    color: var(--dark) !important;
    background: #ffffff !important;
    resize: vertical !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
}

.makalah-textarea-hero:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18) !important;
}

.btn-hero-submit {
    padding: 12px 28px;
    font-size: 15.5px;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.btn-hero-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

/* Preview Modal Styling Fix (Flexible & Not Cropped/Zoomed) */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.preview-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.file-name-text {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    word-break: break-all;
}

.preview-meta-text {
    display: flex;
    gap: 15px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.preview-body {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 75vh;
    overflow: auto;
}

.preview-image-wrapper {
    width: 100%;
    max-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 10px;
    border: 1px solid var(--border-color);
}

.preview-img {
    max-width: 100%;
    max-height: 65vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.preview-pdf-wrapper {
    width: 100%;
    height: 70vh;
}

.preview-pdf-frame {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.preview-txt-wrapper {
    width: 100%;
    max-height: 65vh;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.preview-txt-content {
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark);
}

.preview-doc-box {
    text-align: center;
    padding: 30px 20px;
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
}

.ext-txt { background: linear-gradient(135deg, #10b981, #059669); }

