:root {
  --edix-wine: #ac0033;
  --edix-wine-dark: #7b0025;
  --edix-ink: #18181b;
  --edix-muted: #6b7280;
  --edix-line: #e8e4e5;
  --edix-soft: #faf7f8;
  --edix-white: #fff;
}

.edix-ap-portal,
.edix-ap-portal * { box-sizing: border-box; }

.edix-ap-portal {
  color: var(--edix-ink);
  font-family: inherit;
  margin: 24px auto;
  max-width: 1240px;
}

.edix-ap-hero {
  align-items: center;
  background: linear-gradient(135deg, #7f0026, var(--edix-wine));
  border-radius: 22px;
  color: #fff;
  display: grid;
  gap: 22px;
  grid-template-columns: 76px 1fr auto;
  overflow: hidden;
  padding: 34px 38px;
  position: relative;
}

.edix-ap-hero::after {
  border: 44px solid rgba(255,255,255,.06);
  border-radius: 50%;
  content: '';
  height: 280px;
  position: absolute;
  right: -90px;
  top: -120px;
  width: 280px;
}

.edix-ap-mark {
  align-items: center;
  display: flex;
  height: 68px;
  justify-content: center;
  width: 68px;
}
.edix-ap-mark img { filter: brightness(0) invert(1); height: 68px; object-fit: contain; width: 68px; }

.edix-ap-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 2px 0 8px; }
.edix-ap-hero p { color: rgba(255,255,255,.88); margin: 0; max-width: 720px; }
.edix-ap-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.edix-ap-user { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: 13px; padding: 8px 14px; position: relative; z-index: 1; }

.edix-ap-upload-panel,
.edix-ap-gallery-panel {
  background: var(--edix-white);
  border: 1px solid var(--edix-line);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(50, 0, 18, .06);
  margin-top: 24px;
  padding: 26px;
}

.edix-ap-section-heading { align-items: center; display: flex; gap: 14px; justify-content: space-between; margin-bottom: 18px; }
.edix-ap-section-heading h2 { color: var(--edix-ink); font-size: 23px; margin: 0; }
.edix-ap-section-heading span { background: var(--edix-soft); border-radius: 999px; color: var(--edix-wine); font-size: 12px; font-weight: 700; padding: 7px 11px; }

.edix-ap-dropzone {
  align-items: center;
  background: var(--edix-soft);
  border: 2px dashed #dcb2bf;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-height: 245px;
  padding: 26px;
  text-align: center;
  transition: .2s ease;
}

.edix-ap-dropzone:hover,
.edix-ap-dropzone:focus,
.edix-ap-dropzone.is-dragging { background: #fff1f5; border-color: var(--edix-wine); outline: none; transform: translateY(-1px); }
.edix-ap-dropzone small { color: var(--edix-muted); }
.edix-ap-upload-icon { align-items: center; background: var(--edix-wine); border-radius: 50%; color: #fff; display: flex; font-size: 30px; height: 56px; justify-content: center; line-height: 1; width: 56px; }

.edix-ap-button {
  background: var(--edix-wine);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  padding: 11px 18px;
}
.edix-ap-button:hover { background: var(--edix-wine-dark); color: #fff; }
.edix-ap-button:disabled { cursor: wait; opacity: .6; }
.edix-ap-button-light { background: #f0ecee; color: var(--edix-ink); }
.edix-ap-button-light:hover { background: #e5dfe1; color: var(--edix-ink); }

.edix-ap-queue { border-top: 1px solid var(--edix-line); margin-top: 20px; }
.edix-ap-queue-item { align-items: center; border-bottom: 1px solid var(--edix-line); display: grid; gap: 14px; grid-template-columns: minmax(180px, 1fr) minmax(100px, 220px) 140px 32px; padding: 13px 4px; }
.edix-ap-queue-item small { color: var(--edix-muted); display: block; font-size: 12px; }
.edix-ap-queue-item > button { background: none; border: 0; color: var(--edix-muted); cursor: pointer; font-size: 24px; }
.edix-ap-progress { background: #eee9eb; border-radius: 999px; height: 7px; overflow: hidden; }
.edix-ap-progress span { background: var(--edix-wine); display: block; height: 100%; transition: width .2s; }
.edix-ap-queue-status { color: var(--edix-muted); font-size: 12px; }
.edix-ap-queue-actions { display: flex; gap: 10px; }
.edix-ap-feedback { font-size: 14px; margin-top: 14px; }
.edix-ap-feedback.success { color: #167343; }
.edix-ap-feedback.error { color: #b42318; }

.edix-ap-refresh { background: var(--edix-soft); border: 1px solid var(--edix-line); border-radius: 50%; color: var(--edix-wine); cursor: pointer; font-size: 22px; height: 38px; width: 38px; }
.edix-ap-gallery-tools { align-items: center; display: flex; gap: 10px; }
.edix-ap-gallery-tools .edix-ap-button { margin: 0; padding: 10px 15px; }
.edix-ap-breadcrumb { align-items: center; color: var(--edix-muted); display: flex; font-size: 13px; gap: 8px; margin-top: 6px; }
.edix-ap-breadcrumb button { background: none; border: 0; color: var(--edix-wine); cursor: pointer; font: inherit; padding: 0; }
.edix-ap-breadcrumb button:disabled { color: var(--edix-muted); cursor: default; }
.edix-ap-breadcrumb strong { color: var(--edix-ink); font-weight: 700; }
.edix-ap-folder-form { align-items: end; background: var(--edix-soft); border: 1px solid var(--edix-line); border-radius: 12px; display: flex; gap: 10px; margin: 0 0 20px; padding: 15px; }
.edix-ap-folder-form[hidden] { display: none; }
.edix-ap-folder-form label { flex: 1; font-size: 12px; font-weight: 700; }
.edix-ap-folder-form label span { display: block; margin-bottom: 6px; }
.edix-ap-folder-form input { background: #fff; border: 1px solid #d8d1d3; border-radius: 8px; font: inherit; padding: 10px 11px; width: 100%; }
.edix-ap-folder-form .edix-ap-button { margin: 0; }
.edix-ap-gallery { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.edix-ap-folder-card { background: var(--edix-soft); border: 1px solid var(--edix-line); border-radius: 13px; min-width: 0; overflow: hidden; }
.edix-ap-folder-card button { align-items: center; background: none; border: 0; color: var(--edix-ink); cursor: pointer; display: flex; flex-direction: column; font: inherit; gap: 7px; min-height: 210px; padding: 28px 18px; text-align: center; width: 100%; }
.edix-ap-folder-card button:hover { background: #fff1f5; }
.edix-ap-folder-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edix-ap-folder-card small { color: var(--edix-wine); font-size: 12px; font-weight: 700; }
.edix-ap-folder-icon { background: #e5b9c6; border-radius: 7px 7px 9px 9px; display: block; height: 62px; margin: 12px 0 8px; position: relative; width: 82px; }
.edix-ap-folder-icon::before { background: #e5b9c6; border-radius: 6px 6px 0 0; content: ''; height: 15px; left: 0; position: absolute; top: -9px; width: 35px; }
.edix-ap-photo { border: 1px solid var(--edix-line); border-radius: 13px; min-width: 0; overflow: hidden; }
.edix-ap-photo-image { aspect-ratio: 4 / 3; background: #f3f0f1; display: block; overflow: hidden; }
.edix-ap-photo-image img { height: 100%; object-fit: cover; transition: transform .25s; width: 100%; }
.edix-ap-photo-image:hover img { transform: scale(1.025); }
.edix-ap-photo-info { padding: 13px; }
.edix-ap-photo-name { align-items: center; display: flex; gap: 5px; min-width: 0; }
.edix-ap-photo-name strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edix-ap-name-edit { align-items: center; background: none; border: 0; color: var(--edix-wine); cursor: pointer; display: inline-flex; flex: 0 0 auto; height: 26px; justify-content: center; padding: 4px; width: 26px; }
.edix-ap-name-edit:hover { background: var(--edix-soft); border-radius: 6px; }
.edix-ap-name-edit svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 15px; }
.edix-ap-photo-name[hidden] { display: none; }
.edix-ap-photo-info > small { color: var(--edix-muted); display: block; font-size: 11px; margin-top: 3px; }
.edix-ap-photo-actions { align-items: center; display: flex; justify-content: space-between; margin-top: 12px; }
.edix-ap-action-icon { align-items: center; background: var(--edix-soft); border: 1px solid var(--edix-line); border-radius: 8px; color: var(--edix-wine); cursor: pointer; display: inline-flex; height: 34px; justify-content: center; padding: 0; text-decoration: none; width: 34px; }
.edix-ap-action-icon:hover { background: var(--edix-wine); border-color: var(--edix-wine); color: #fff; }
.edix-ap-action-icon svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 17px; }
.edix-ap-move-icon { margin-left: auto; }
.edix-ap-rename-form { align-items: center; display: grid; gap: 5px; grid-template-columns: minmax(0, 1fr) 30px 30px; }
.edix-ap-rename-form[hidden] { display: none; }
.edix-ap-rename-form input { border: 1px solid var(--edix-wine); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 700; min-width: 0; padding: 6px 7px; width: 100%; }
.edix-ap-inline-icon { align-items: center; background: var(--edix-soft); border: 1px solid var(--edix-line); border-radius: 6px; color: var(--edix-wine); cursor: pointer; display: inline-flex; height: 30px; justify-content: center; padding: 0; width: 30px; }
.edix-ap-inline-icon:hover { background: #fff1f5; border-color: var(--edix-wine); }
.edix-ap-inline-icon svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 15px; }
.edix-ap-confirm-icon { background: var(--edix-wine); border-color: var(--edix-wine); color: #fff; }
.edix-ap-confirm-icon:hover { background: var(--edix-wine-dark); color: #fff; }
.edix-ap-move-form { align-items: center; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) 30px 30px; margin-top: 10px; }
.edix-ap-move-form[hidden] { display: none; }
.edix-ap-form-label { color: var(--edix-muted); font-size: 10px; grid-column: 1 / -1; }
.edix-ap-move-form select { background: #fff; border: 1px solid var(--edix-line); border-radius: 6px; font: inherit; min-width: 0; padding: 6px; width: 100%; }
.edix-ap-loading,
.edix-ap-empty { background: var(--edix-soft); border-radius: 12px; color: var(--edix-muted); grid-column: 1 / -1; padding: 44px; text-align: center; }
.edix-ap-empty.error { color: #b42318; }
.edix-ap-message,
.edix-ap-login { background: #fff; border: 1px solid var(--edix-line); border-left: 4px solid var(--edix-wine); border-radius: 10px; margin: 24px auto; max-width: 620px; padding: 20px; }

.edix-ap-login-page {
  align-items: center;
  background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.16), transparent 28%), linear-gradient(145deg, #790024, var(--edix-wine));
  border-radius: 0;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(240px, .8fr) minmax(320px, 480px);
  inset: 0;
  margin: 0;
  max-width: none;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 58px;
  position: fixed;
  width: 100vw;
  z-index: 999999;
}
.edix-ap-login-page::after { border: 55px solid rgba(255,255,255,.05); border-radius: 50%; bottom: -180px; content: ''; height: 420px; left: -130px; position: absolute; width: 420px; }
.edix-ap-login-brand { color: #fff; position: relative; text-align: center; z-index: 1; }
.edix-ap-login-brand img { filter: brightness(0) invert(1); height: auto; max-width: 190px; width: 65%; }
.edix-ap-login-brand p { color: rgba(255,255,255,.86); font-size: 12px; font-weight: 700; letter-spacing: .18em; margin-top: 20px; }
.edix-ap-login-card { background: #fff; border-radius: 18px; box-shadow: 0 24px 65px rgba(39,0,13,.3); padding: 38px; position: relative; z-index: 1; }
.edix-ap-login-card h1 { color: var(--edix-ink); font-size: 31px; line-height: 1.1; margin: 0 0 9px; }
.edix-ap-login-card > p { color: var(--edix-muted); margin: 0 0 24px; }
.edix-ap-login-card form { display: grid; gap: 17px; margin-top: 22px; }
.edix-ap-login-card label { color: var(--edix-ink); font-size: 13px; font-weight: 700; }
.edix-ap-login-card input[type="text"],
.edix-ap-login-card input[type="password"] { background: #fff; border: 1px solid #d8d1d3; border-radius: 8px; display: block; font: inherit; margin-top: 6px; padding: 12px 13px; width: 100%; }
.edix-ap-login-card input:focus { border-color: var(--edix-wine); box-shadow: 0 0 0 3px rgba(172,0,51,.1); outline: none; }
.edix-ap-remember { align-items: center; display: flex; font-weight: 400 !important; gap: 6px; }
.edix-ap-login-button { background: var(--edix-wine); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 18px; width: 100%; }
.edix-ap-login-button:hover { background: var(--edix-wine-dark); }
.edix-ap-login-link { color: var(--edix-wine); display: inline-block; font-size: 13px; font-weight: 700; margin-top: 18px; text-decoration: none; }
.edix-ap-login-notice { border-radius: 8px; font-size: 13px; margin-bottom: 17px; padding: 11px 13px; }
.edix-ap-login-notice.error { background: #fff0f0; color: #a11b1b; }
.edix-ap-login-notice.success { background: #edf9f1; color: #17683b; }

@media (max-width: 900px) {
  .edix-ap-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edix-ap-hero { grid-template-columns: 62px 1fr; }
  .edix-ap-user { grid-column: 2; justify-self: start; }
  .edix-ap-login-page { grid-template-columns: 1fr; padding: 42px; }
  .edix-ap-login-brand img { max-width: 120px; }
}

@media (max-width: 560px) {
  .edix-ap-portal { margin: 16px auto; width: 100%; }
  .edix-ap-hero { display: flex; flex-direction: column; gap: 16px; padding: 28px 22px; text-align: center; }
  .edix-ap-hero > div:nth-child(2) { align-items: center; display: flex; flex-direction: column; width: 100%; }
  .edix-ap-hero p { margin-left: auto; margin-right: auto; }
  .edix-ap-mark { margin: 0 auto; }
  .edix-ap-user { align-self: center; display: inline-flex; grid-column: auto; justify-content: center; justify-self: center; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .edix-ap-upload-panel, .edix-ap-gallery-panel { padding: 18px; }
  .edix-ap-gallery { grid-template-columns: 1fr; }
  .edix-ap-queue-item { grid-template-columns: 1fr 28px; }
  .edix-ap-progress, .edix-ap-queue-status { grid-column: 1 / -1; }
  .edix-ap-queue-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .edix-ap-queue-actions .edix-ap-button { margin-top: 0; width: 100%; }
  .edix-ap-section-heading { align-items: flex-start; flex-direction: column; }
  .edix-ap-gallery-heading { gap: 14px; }
  .edix-ap-gallery-heading > div:first-child { min-width: 0; width: 100%; }
  .edix-ap-gallery-tools { justify-content: flex-end; width: 100%; }
  .edix-ap-breadcrumb { flex-wrap: wrap; line-height: 1.4; width: 100%; }
  .edix-ap-photo-actions { align-items: center; min-height: 36px; width: 100%; }
  .edix-ap-action-icon { flex: 0 0 36px; height: 36px; width: 36px; }
  .edix-ap-folder-form { align-items: stretch; flex-direction: column; }
  .edix-ap-move-form { grid-template-columns: 1fr auto auto; }
  .edix-ap-login-page { border-radius: 0; display: block; min-height: 100vh; padding: 24px 16px; }
  .edix-ap-login-brand { margin-bottom: 24px; }
  .edix-ap-login-brand img { max-width: 90px; }
  .edix-ap-login-brand p { margin-top: 8px; }
  .edix-ap-login-card { padding: 27px 21px; }
}
