:root {
  --border: #dfe3e8;
  --bg: #f6f8fa;
  --primary: #1a5cff;
  --text: #1f2937;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-box {
  background: #fff;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 320px;
}

.login-box h1 { font-size: 1.3rem; margin: 0 0 .25rem; }
.login-box .subtitle { color: var(--muted); margin: 0 0 1.25rem; font-size: .9rem; }
.login-box label { display: block; font-size: .85rem; margin: .75rem 0 .25rem; }
.login-box input {
  width: 100%; padding: .55rem .6rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: .95rem;
}
.login-box button {
  margin-top: 1.25rem; width: 100%; padding: .6rem; border: none;
  border-radius: 6px; background: var(--primary); color: #fff; font-size: .95rem;
  cursor: pointer;
}
.login-box button:hover { opacity: .9; }

.alert { padding: .6rem .75rem; border-radius: 6px; font-size: .85rem; margin-bottom: .5rem; }
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c3; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: .9rem 1.5rem; border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 1.1rem; margin: 0; }
.topbar-user { font-size: .85rem; color: var(--muted); }
.topbar-user a { color: var(--primary); text-decoration: none; }

.container { padding: 1.25rem 1.5rem; max-width: 1600px; margin: 0 auto; }

.filters {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: #fff; padding: .85rem; border-radius: 8px; border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.filters input[type=text], .filters select {
  padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem;
}
.filters .checkbox { font-size: .82rem; display: flex; align-items: center; gap: .3rem; color: var(--muted); }
.filters button, .filters .btn-secondary, .filters .btn-export {
  padding: .45rem .8rem; border-radius: 6px; font-size: .85rem; cursor: pointer;
  border: 1px solid var(--border); background: #fff; text-decoration: none; color: var(--text);
}
.filters button { background: var(--primary); color: #fff; border-color: var(--primary); }
.filters .btn-export { background: #10893e; color: #fff; border-color: #10893e; margin-left: auto; }

.result-count { color: var(--muted); font-size: .85rem; margin: 0 0 .5rem; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }

.data-table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.data-table th, .data-table td {
  padding: .5rem .6rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.data-table th { background: #f0f2f5; position: sticky; top: 0; font-weight: 600; }
.data-table th a { color: var(--text); text-decoration: none; }
.data-table td.col-text { white-space: normal; max-width: 260px; }
.data-table td.col-num { text-align: right; white-space: nowrap; }
.data-table tr:hover td { background: #fafbfc; }
.data-table .empty { text-align: center; color: var(--muted); padding: 2rem; }

.col-photo { width: 56px; text-align: center; position: relative; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.photo-count {
  position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,.65); color: #fff;
  font-size: .65rem; padding: 0 3px; border-radius: 3px;
}
.no-photo { color: var(--muted); }

.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; font-size: .85rem; }
.pagination a { color: var(--primary); text-decoration: none; }

.sample { font-size: .75rem; color: var(--muted); }
code { background: #f0f2f5; padding: 0 4px; border-radius: 4px; }
