* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Arial, sans-serif;
    background: #f4f5f7;
    color: #1a1a1a;
}
.muted { color: #6b7280; font-size: 0.9em; }

.topbar {
    background: #1f2937;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar .muted { color: #cbd5e1; margin-right: 12px; }

.container {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 16px;
}
.container.narrow { max-width: 640px; }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-head h3 { margin: 0 0 4px; }
.card-actions { display: flex; gap: 8px; }

label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 0.92em; }
label .muted { font-weight: 400; }

input[type=text], input[type=password], input[type=file], textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
}
textarea { font-family: Consolas, monospace; font-size: 0.82em; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox input { width: auto; }

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}
.btn.small { padding: 5px 10px; font-size: 0.85em; }
.btn.primary { background: #2563eb; color: #fff; }
.btn.danger { background: #fee2e2; color: #b91c1c; }
button.btn { margin-top: 16px; }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 0.9em; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }

.auth-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-box {
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 380px;
}
.auth-box h1 { margin-top: 0; font-size: 1.4em; }

.section-heading { margin: 28px 0 12px; font-size: 1.05em; color: #374151; }

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.folder-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    color: #111827;
}
.folder-card:hover { border-color: #2563eb; }
.folder-icon { font-size: 2em; margin-bottom: 6px; }
.folder-name { font-weight: 600; margin-bottom: 2px; word-break: break-word; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
