/* --- Google Fonts & Variables --- */
:root {
    --primary: #1a73e8;
    --secondary: #667eea;
    --accent: #00c6ff;
    --bg: #f4f7fe;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background: var(--bg); 
    color: var(--text-main); 
    line-height: 1.6;
    overflow-x: hidden; /* Mencegah geser kanan-kiri yang tidak disengaja */
}

/* --- Layout Container (Otomatis Desktop/Mobile) --- */
.container { 
    width: 100%;
    margin: 0 auto; 
    padding: 20px; 
}

/* Pengaturan Lebar Otomatis */
@media (max-width: 767px) {
    .container { max-width: 100%; padding: 15px; } /* Mode HP ramping */
}
@media (min-width: 768px) {
    .container { max-width: 900px; } /* Mode Desktop/Tablet rapi di tengah */
}

/* --- Navbar Modern (Glassmorphism) --- */
.navbar {
    position: sticky; 
    top: 0; 
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(10px);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 15px 5%; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.logo { 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--primary); 
    text-decoration: none; 
}

.nav-links { display: flex; gap: 8px; }

.nav-item { 
    text-decoration: none; 
    color: #555; 
    font-size: 12px; 
    font-weight: 600; 
    padding: 8px 12px; 
    border-radius: 50px; 
    transition: 0.3s;
}

.nav-item.active { 
    background: var(--primary); 
    color: white; 
}

/* --- Hero & Card Style --- */
.card { 
    background: var(--white); 
    border-radius: 20px; 
    padding: 25px; 
    box-shadow: var(--shadow); 
    margin-bottom: 25px; 
    border: 1px solid rgba(0,0,0,0.02);
}

.btn-main { 
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; 
    border: none; 
    padding: 15px; 
    width: 100%; 
    border-radius: 12px; 
    font-weight: bold; 
    font-size: 16px; 
    cursor: pointer; 
    transition: 0.3s; 
    text-decoration: none; 
    display: block; 
    text-align: center;
}

.btn-main:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(26,115,232,0.3); 
}

/* --- Form Elements --- */
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 8px; color: #555; }
.input-group input, .input-group textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 10px; 
    font-size: 14px; 
    outline: none; 
    transition: 0.3s;
    background: #fdfdfd;
}
.input-group input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1); 
    background: #fff;
}

/* --- List & History (Otomatis Desktop 2 Kolom) --- */
.file-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default 1 kolom untuk mobile */
    gap: 15px;
}

@media (min-width: 768px) {
    .file-grid {
        grid-template-columns: repeat(2, 1fr); /* Otomatis 2 kolom di layar lebar/Desktop */
        gap: 20px;
    }
}

/* --- File Card (Anti-Berantakan & Auto Wrap) --- */
.file-card {
    background: white;
    padding: 15px;
    border-radius: 18px;
    display: flex;
    align-items: flex-start; /* Mengunci ikon tetap di atas saat teks turun ke bawah */
    gap: 15px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26,115,232,0.1);
    border-color: var(--primary);
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0f4ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0; /* Mencegah ikon mengecil saat teks panjang */
}

.file-details {
    flex: 1;
    min-width: 0; /* Kunci agar pembungkusan teks (wrap) berfungsi */
}

/* SOLUSI JUDUL PANJANG OTOMATIS KEBAWAH */
.file-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
    
    /* Perintah Bungkus Teks */
    word-wrap: break-word; 
    overflow-wrap: anywhere; 
    white-space: normal; 
    line-height: 1.4;
}

.file-details .meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap; /* Supaya info ukuran & tanggal juga bisa turun baris jika sempit */
    gap: 8px;
}

/* --- Search & Additional --- */
.search-box { margin-bottom: 25px; position: relative; }
.search-box input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    outline: none;
    font-size: 14px;
}
.search-box i {
    position: absolute; left: 18px; top: 50%;
    transform: translateY(-50%); color: #aaa;
}

.badge-locked {
    background: #fff0f0;
    color: #ff4757;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: bold;
}