* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
    background: #f5f5f7;
    line-height: 1.5;
}

nav {
    background: #1a1a2e;
    color: #fff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 3.5rem;
    gap: 2rem;
}
nav .nav-brand a { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
nav .nav-links { display: flex; gap: 1.5rem; }
nav .nav-links a { color: #ccc; text-decoration: none; font-size: 0.9rem; }
nav .nav-links a:hover { color: #fff; }
nav .nav-user { margin-left: auto; display: flex; gap: 0.75rem; align-items: center; font-size: 0.85rem; }
nav .nav-user span { color: #ccc; }
nav .nav-user a { color: #ccc; text-decoration: none; }
nav .nav-user a:hover { color: #fff; }
.login-form { max-width: 360px; margin: 3rem auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.login-form h1 { margin-bottom: 1.5rem; }

main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

h1 { margin-bottom: 1rem; font-size: 1.5rem; }

.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-info { background: #d1ecf1; color: #0c5460; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
thead { background: #f0f0f3; }
th { text-align: left; padding: 0.75rem 1rem; font-size: 0.8rem; text-transform: uppercase; color: #666; font-weight: 600; }
td { padding: 0.6rem 1rem; border-top: 1px solid #eee; font-size: 0.9rem; }
tr:hover td { background: #fafafa; }

.icon { margin-right: 0.3rem; }
.url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-cell { max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; color: #666; }
.empty { text-align: center; color: #999; padding: 2rem; }
.actions { white-space: nowrap; }

.btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}
.btn:hover { background: #f0f0f0; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { color: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.btn-disabled { opacity: 0.4; pointer-events: none; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.9rem; }
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 0.4rem; color: #999; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-pcloud { background: #e0f0ff; color: #1a73e8; }
.badge-idrive { background: #e8f5e9; color: #2e7d32; }
.badge-user { background: #e8e8ec; color: #555; }
.badge-admin { background: #e0f0ff; color: #1a73e8; }
.badge-superuser { background: #fce4ec; color: #c62828; }

.source-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.source-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s;
}
.source-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.source-provider { font-size: 0.75rem; text-transform: uppercase; color: #666; margin-bottom: 0.25rem; }
.source-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.source-meta { font-size: 0.8rem; color: #888; }

.form { max-width: 600px; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}
.form-actions { display: flex; gap: 0.5rem; margin-top: 1.5rem; }

.search-help { margin-top: 1.5rem; }
.search-help h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.search-examples code { background: #f0f0f3; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.85rem; }
.search-examples td:first-child { white-space: nowrap; }
.search-help-note { margin-top: 1rem; font-size: 0.85rem; color: #888; }
.ex-term { background: #e0f0ff; color: #1a73e8; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85rem; font-family: monospace; }
.ex-exact { background: #e8f5e9; color: #2e7d32; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85rem; font-family: monospace; }
.ex-op { color: #c62828; font-weight: 700; font-size: 0.9rem; margin: 0 0.15rem; }
.search-form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.search-form input[type="text"] { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem; }
.search-form select { padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem; }
.search-corrections { width: 100%; font-size: 0.85rem; color: #555; margin-bottom: 1.5rem; }
.correction-term { font-weight: 600; }
.correction-fuzzy { color: #888; }
.correction-sep { margin: 0 0.3rem; color: #999; font-weight: 600; }
.correction-pipe { margin: 0 0.5rem; color: #2563eb; font-weight: 700; }
.pagination { display: flex; gap: 0.3rem; align-items: center; margin-top: 1.5rem; justify-content: center; }
.pagination-ellipsis { color: #999; padding: 0 0.3rem; }

a { color: #2563eb; }
