/* FY Photography — admin panel */

:root {
  --ink: #141414;
  --grey: #8a8a8a;
  --line: #e6e6e6;
  --bg: #f7f7f6;
  --accent: #141414;
  --danger: #b3261e;
  --ok: #1e7f43;
  --font: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
}

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

[hidden] { display: none !important; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 14px; }

/* ---------- login ---------- */

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101010;
}

.login-card {
  width: 340px;
  background: #fff;
  padding: 48px 40px 42px;
  text-align: center;
}

.login-logo { font-size: 22px; font-weight: 700; letter-spacing: .1em; }
.login-logo span { font-weight: 300; letter-spacing: .3em; font-size: 13px; margin-left: 6px; }

.login-sub {
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--grey);
}

.login-card input {
  width: 100%;
  margin-top: 34px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  outline: none;
  letter-spacing: .06em;
}

.login-card input:focus { border-color: var(--ink); }

.login-card button {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  background: var(--ink);
  color: #fff;
  border: 0;
  font-size: 12px;
  letter-spacing: .28em;
  text-indent: .28em;
  text-transform: uppercase;
  transition: opacity .25s;
}

.login-card button:hover { opacity: .85; }

.login-error { margin-top: 16px; color: var(--danger); font-size: 13px; }

/* ---------- layout ---------- */

.admin-view { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #101010;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 34px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-logo { padding: 0 28px 30px; font-weight: 700; font-size: 18px; letter-spacing: .08em; }
.side-logo span { font-weight: 300; font-size: 11px; letter-spacing: .34em; margin-left: 6px; color: #9a9a9a; }

.side-nav { display: flex; flex-direction: column; }

.side-link {
  background: none;
  border: 0;
  color: #b9b9b9;
  text-align: left;
  padding: 13px 28px;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: color .25s, border-color .25s, background .25s;
}

.side-link:hover { color: #fff; }
.side-link.active { color: #fff; border-left-color: #fff; background: rgba(255, 255, 255, .05); }

.side-bottom {
  margin-top: auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-bottom a, .side-bottom button {
  background: none;
  border: 0;
  color: #8b8b8b;
  font-size: 12px;
  letter-spacing: .14em;
  text-decoration: none;
  text-align: left;
  transition: color .25s;
}

.side-bottom a:hover, .side-bottom button:hover { color: #fff; }

.panel { flex: 1; padding: 44px 52px 90px; max-width: 1280px; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 10px;
}

.panel-head h1 { font-size: 26px; font-weight: 300; letter-spacing: .08em; }

.hint { color: var(--grey); font-size: 13px; margin: 4px 0 26px; }

/* ---------- photos ---------- */

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 16px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: all .2s;
}

.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.pcard { background: #fff; border: 1px solid var(--line); }

.pcard-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #ececec;
}

.pcard-img img { width: 100%; height: 100%; object-fit: cover; }

.pcard-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(20, 20, 20, .85);
  color: #fff;
  font-size: 10px;
  letter-spacing: .22em;
  text-indent: .22em;
  padding: 4px 8px;
}

.pcard-body { padding: 12px 14px 14px; }

.pcard-title {
  width: 100%;
  border: 1px solid transparent;
  padding: 5px 6px;
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s;
}

.pcard-title:hover { border-color: var(--line); }
.pcard-title:focus { border-color: var(--ink); }

.pcard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.pcard-cat {
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  padding: 5px 6px;
  outline: none;
  flex: 1;
}

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  width: 30px;
  height: 30px;
  font-size: 14px;
  line-height: 1;
  transition: all .2s;
  flex-shrink: 0;
}

.icon-btn:hover { border-color: var(--ink); }
.icon-btn.star.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }

.pcard.busy { opacity: .45; pointer-events: none; }

/* ---------- upload ---------- */

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 9px;
}

.field input, .field textarea {
  width: 100%;
  max-width: 560px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
  transition: border-color .2s;
}

.field input:focus, .field textarea:focus { border-color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--line); background: #fff; }
.seg-item input { display: none; }

.seg-item span {
  display: block;
  padding: 10px 22px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: all .2s;
}

.seg-item input:checked + span { background: var(--ink); color: #fff; }

.dropzone {
  border: 1.5px dashed #c9c9c9;
  background: #fff;
  padding: 64px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s, background .25s;
  max-width: 760px;
}

.dropzone:hover, .dropzone.over { border-color: var(--ink); background: #fcfcfb; }

.dz-big { font-size: 17px; font-weight: 300; letter-spacing: .12em; }
.dz-small { margin-top: 10px; font-size: 12.5px; color: var(--grey); letter-spacing: .04em; }

.picked {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 18px 0;
}

.picked-item { position: relative; aspect-ratio: 1; overflow: hidden; background: #eee; }
.picked-item img { width: 100%; height: 100%; object-fit: cover; }

.picked-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.primary {
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 13px 40px;
  font-size: 12px;
  letter-spacing: .26em;
  text-indent: .26em;
  text-transform: uppercase;
  transition: opacity .25s;
}

.primary:hover { opacity: .85; }
.primary:disabled { opacity: .35; cursor: default; }

.upload-status { margin-top: 18px; font-size: 13.5px; }
.upload-status .ok { color: var(--ok); }
.upload-status .err { color: var(--danger); }

.progress {
  height: 3px;
  background: #e2e2e2;
  max-width: 760px;
  margin-top: 16px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width .3s;
}

/* ---------- settings ---------- */

.settings-form {
  background: #fff;
  border: 1px solid var(--line);
  padding: 30px 32px 34px;
  max-width: 640px;
  margin-bottom: 30px;
}

.settings-form h2 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.save-note { margin-left: 16px; font-size: 13px; color: var(--ok); }
.save-note.err { color: var(--danger); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .admin-view { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
    gap: 6px;
  }

  .side-logo { padding: 0 10px 0 0; font-size: 15px; }
  .side-nav { flex-direction: row; }
  .side-link { padding: 8px 10px; border-left: 0; font-size: 11px; }
  .side-bottom { margin-top: 0; margin-left: auto; flex-direction: row; padding: 0; }

  .panel { padding: 26px 18px 70px; }
}
