@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Inter:wght@300;400;500&display=swap');

* { box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f1ed; color: #2c2420; margin: 0; padding: 0; }
main { max-width: 1000px; margin: 0 auto; padding: 3rem 1.5rem; }
header { text-align: center; margin-bottom: 3rem; }
h1 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 2.75rem; margin: 0 0 1.5rem; letter-spacing: -.02em; color: #2c2420; }
h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 1rem; color: #2c2420; }
.subtitle { font-family: 'Inter', sans-serif; font-size: .95rem; font-weight: 300; color: #7a6f65; margin: 0; letter-spacing: .03em; line-height: 1.6; max-width: 700px; margin-left: auto; margin-right: auto; }
.record-id-footer { text-align: center; margin-top: 2rem; padding-bottom: 1rem; }
.muted { color: #9a8d81; font-size: .85rem; margin: 0; font-weight: 300; }
.hidden { display: none; }
section { background: white; border-radius: 2px; padding: 2rem; margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(44,36,32,.06); border: 1px solid rgba(44,36,32,.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.thumb { position: relative; aspect-ratio: 3/4; border-radius: 2px; overflow: hidden; background: #f5f1ed; box-shadow: 0 2px 8px rgba(44,36,32,.1); transition: transform .2s, box-shadow .2s; }
.thumb:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(44,36,32,.15); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del { position: absolute; top: 8px; right: 8px; background: rgba(44,36,32,.8); color: white; border: none; border-radius: 2px; width: 32px; height: 32px; font-size: 18px; cursor: pointer; display: grid; place-items: center; opacity: 1; transition: background .2s; }
.thumb .del:hover { background: #c0392b; }
.thumb.deleting { opacity: .4; pointer-events: none; }
.thumb.loading { background: #faf8f6; border: 1px dashed #d4c9be; }
.thumb-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 1rem; text-align: center; }
.thumb-loading p { font-size: .75rem; color: #9a8d81; margin: .75rem 0 0; line-height: 1.4; }
.loading-spinner { width: 24px; height: 24px; border: 3px solid #e8dfd5; border-top-color: #7a6f65; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload { border: 2px dashed #d4c9be; border-radius: 2px; aspect-ratio: 3/4; display: grid; place-items: center; cursor: pointer; color: #9a8d81; font-size: 2.5rem; transition: all .2s; background: #faf8f6; position: relative; }
.upload:hover { border-color: #2c2420; color: #2c2420; background: white; }
.upload.uploading { border-color: #7a6f65; color: #7a6f65; pointer-events: none; }
.upload-icon { transition: opacity .2s; }
.upload-progress { position: absolute; width: 80%; text-align: center; }
.upload-progress-bar { height: 4px; background: #2c2420; border-radius: 2px; width: 0%; transition: width .3s ease; margin-bottom: .75rem; }
.upload-progress-text { font-size: .875rem; color: #7a6f65; font-weight: 400; }
.upload input { display: none; }
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: #2c2420; color: white; padding: .75rem 1.5rem; border-radius: 2px; font-size: .875rem; box-shadow: 0 8px 24px rgba(44,36,32,.25); }
.toast.error { background: #c0392b; }
.empty { color: #9a8d81; font-size: .875rem; font-style: italic; }
#login-form { max-width: 440px; margin: 3rem auto; display: flex; flex-direction: column; gap: 1.5rem; background: white; padding: 3rem; border-radius: 2px; box-shadow: 0 2px 12px rgba(44,36,32,.08); border: 1px solid rgba(44,36,32,.08); }
.form-field { display: flex; flex-direction: column; gap: .5rem; }
.form-field label { font-size: .875rem; font-weight: 500; color: #2c2420; letter-spacing: .02em; }
#login-form input { padding: 1rem 1.25rem; border: 1px solid #d4c9be; border-radius: 2px; font-size: 1rem; font-family: 'Inter', sans-serif; transition: border-color .2s; background: #faf8f6; }
#login-form input:focus { outline: none; border-color: #2c2420; background: white; }
#login-form button { padding: 1rem 1.5rem; background: #2c2420; color: white; border: none; border-radius: 2px; font-size: 1rem; font-weight: 400; cursor: pointer; transition: all .2s; font-family: 'Inter', sans-serif; letter-spacing: .02em; margin-top: .5rem; }
#login-form button:hover:not(:disabled) { background: #1a1410; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(44,36,32,.2); }
#login-form button:disabled { opacity: .5; cursor: not-allowed; }
#login-form .error { color: #c0392b; font-size: .875rem; margin: 0; text-align: center; }
.cta-section { text-align: center; padding: 3rem 1.5rem; margin-top: 3rem; background: white; border-radius: 2px; border: 1px solid rgba(44,36,32,.08); margin-bottom: 2rem; }
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { color: #7a6f65; margin-bottom: 2rem; font-size: 1rem; font-weight: 300; }
.cta-button { display: inline-block; padding: 1rem 2.5rem; background: #2c2420; color: white; text-decoration: none; border-radius: 2px; font-weight: 400; letter-spacing: .02em; transition: all .2s; font-family: 'Inter', sans-serif; }
.cta-button:hover { background: #1a1410; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(44,36,32,.25); }

@media (max-width: 768px) {
  body { padding: 0; }
  main { padding: 2rem 1rem; }
  h1 { font-size: 2rem; margin-bottom: 1rem; }
  .subtitle { font-size: .875rem; padding: 0 .5rem; }
  #login-form { padding: 2rem 1.5rem; margin: 2rem auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
  section { padding: 1.5rem; }
  .cta-section { padding: 2rem 1rem; margin-top: 2rem; }
  .cta-button { padding: .875rem 2rem; font-size: .9rem; }
}
