*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:#f5f6f8;color:#202124}
a{color:#1769aa;text-decoration:none}
header{height:64px;background:#fff;border-bottom:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}
header strong{font-size:20px;margin-right:12px}
main{max-width:1200px;margin:28px auto;padding:0 20px}
.card{background:#fff;border:1px solid #e1e3e6;border-radius:12px;padding:22px;margin-bottom:28px}
.centered{min-height:100vh;display:grid;place-items:center}
.login-card{width:min(420px,calc(100% - 32px))}
label{display:block;margin:14px 0 6px}
input[type=text],input[type=password],input:not([type]){width:100%;padding:11px;border:1px solid #cfd4da;border-radius:8px}
button{border:0;border-radius:8px;padding:10px 14px;background:#202124;color:#fff;cursor:pointer}
button.danger{background:#9d2929}
form button{margin-top:14px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}
.image-card{background:#fff;border:1px solid #e1e3e6;border-radius:12px;overflow:hidden;padding-bottom:12px}
.image-card img{display:block;width:100%;height:220px;object-fit:contain;background:#fafafa}
.meta,.actions{padding:10px 12px 0}
.filename{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.urlbox{width:calc(100% - 24px);margin:10px 12px 0;padding:8px;border:1px solid #d5d8dc;border-radius:6px}
.actions{display:flex;gap:8px;align-items:center}
.actions form{margin:0}
.actions form button{margin:0}
.muted{color:#6b7280;font-size:13px}
.error,.success{padding:12px;border-radius:8px;margin-bottom:16px}
.error{background:#ffe8e8}
.success{background:#e7f7ec}
