/* FRONTEND */
#fsdh-app { max-width: 1200px; margin: 30px auto; font-family: 'Segoe UI', Arial, sans-serif; color: #333; }
.fsdh-toolbar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.fsdh-toolbar input, .fsdh-toolbar select, .toggle-btn {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 14px;
}
.toggle-btn { background:#0a2a4a; color:#fff; cursor:pointer; }
.fsdh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.fsdh-grid.list-view { grid-template-columns: 1fr; }
.fsdh-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.list-card { flex-direction: row; align-items: center; gap: 20px; }
.fsdh-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(10, 42, 74, 0.1); }
.fsdh-card h3 { font-size: 15px; margin: 15px 0; line-height: 1.5; height: 46px; overflow: hidden; color: #0a2a4a; font-weight: 600; }
.meta { font-size: 12px; color: #666; margin-bottom: 12px; display: flex; justify-content: space-between; }
.download-btn {
    background: #0a2a4a; color: #fff !important; text-align: center; padding: 12px;
    border-radius: 6px; text-decoration: none !important; font-weight: 600;
    font-size: 13px; text-transform: uppercase; letter-spacing: 2px;
}
.file-badge { align-self: flex-start; font-size: 9px; font-weight: bold; padding: 4px 10px; border-radius: 4px; }
.badge-pdf { background: #ffebee; color: #c62828; }
.badge-xlsx { background: #e8f5e9; color: #2e7d32; }
.badge-docx { background: #e3f2fd; color: #1565c0; }
.badge-csv { background: #fff3e0; color: #ef6c00; }
.fsdh-pagination { text-align: center; margin-top: 40px; }
.fsdh-pagination button { padding: 10px 20px; cursor: pointer; background: #fff; border: 1.5px solid #0a2a4a; color: #0a2a4a; border-radius: 5px; font-weight: bold; margin: 0 5px; }

/* FAB */
#fsdh-hint-fab {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: #0a2a4a; color: #fff; border: none; border-radius: 50%;
    font-size: 28px; box-shadow: 0 4px 15px rgba(10,42,74,0.3);
    animation: pulse 2s infinite; cursor: pointer; z-index: 9999;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* Hint Modal */
.fsdh-hint-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 100001;
}
.fsdh-hint-modal.active { display: flex; }
.fsdh-hint-modal-content {
    background: #fff; padding: 30px; max-width: 520px; border-radius: 12px; position: relative;
}

/* ADMIN */
.stats-bar {
    background:#fff; border:1px solid #c3c4c7; padding:15px 20px; margin:15px 0; border-left:4px solid #0a2a4a; display:flex; flex-wrap:wrap; gap:12px; align-items:center;
}
.badge { padding:6px 12px; border-radius:20px; font-size:13px; font-weight:600; }
.badge.pdf { background:#ffebee; color:#c62828; }
.badge.xlsx { background:#e8f5e9; color:#2e7d32; }
.badge.docx { background:#e3f2fd; color:#1565c0; }
.badge.local { background:#e8f5e9; color:#2e7d32; }
.badge.indexed { background:#fff3e0; color:#ef6c00; }

.source-badge { padding:4px 10px; border-radius:4px; font-size:11px; font-weight:bold; }
.source-badge.local { background:#e8f5e9; color:#2e7d32; }
.source-badge.indexed { background:#fff3e0; color:#ef6c00; }

#fsdh-modal { position:fixed !important; top:0!important; left:0!important; right:0!important; bottom:0!important; background:rgba(0,0,0,0.65)!important; display:none!important; align-items:center!important; justify-content:center!important; z-index:100000!important; }
#fsdh-modal.active { display:flex!important; }
.fsdh-modal-content { background:#ffffff!important; padding:30px!important; width:90%!important; max-width:680px!important; border-radius:8px!important; box-shadow:0 15px 40px rgba(0,0,0,0.4)!important; position:relative!important; max-height:92vh!important; overflow-y:auto!important; }

th[style*="width:28%"] { font-weight:700; }

/* MOBILE FRIENDLY */
@media (max-width: 768px) {
    .fsdh-toolbar { grid-template-columns: 1fr; }
    .fsdh-grid { grid-template-columns: 1fr; gap:15px; }
    .fsdh-card { padding:15px; }
    .list-card { flex-direction:column; }
    .stats-bar { flex-direction:column; align-items:flex-start; }
    #fsdh-hint-fab { bottom:20px; right:20px; width:50px; height:50px; font-size:22px; }
}