:root {
  color-scheme: light;
  --ink: #18243a;
  --muted: #6f7888;
  --paper: #fbf3e3;
  --white: #fffdf7;
  --navy: #102341;
  --navy-soft: #1c3a61;
  --gold: #e7b94e;
  --gold-light: #fff0c4;
  --line: #e9dfc9;
  --success: #237b5a;
  --danger: #b64141;
  --shadow: 0 18px 55px rgba(65, 48, 20, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, .78), transparent 42%),
    linear-gradient(135deg, #fff9ec 0%, #fbf3e3 52%, #f5e8cf 100%);
  font-size: 14px;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(231, 185, 78, .72);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 46px 56px;
}

.topbar {
  min-height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--navy);
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 2.1px;
  font-weight: 850;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#account-email {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .86fr);
  align-items: center;
  gap: clamp(35px, 7vw, 105px);
  min-height: 690px;
  padding: 50px 0 70px;
}

.login-copy {
  width: 100%;
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 13px;
  color: #a77b35;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 2.1px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 760;
  letter-spacing: -1.8px;
  line-height: 1.15;
}

.login-copy h1 span {
  color: #9e793f;
}

.intro {
  max-width: 570px;
  margin: 17px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.login-features {
  display: grid;
  gap: 14px;
  margin: 29px 0 32px;
}

.login-features > div {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #3d4b61;
}

.feature-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  height: 34px;
  border: 1px solid #e4d5b9;
  border-radius: 10px;
  color: #9d773b;
  background: #fcf8f0;
  font-size: 10px;
  font-weight: 850;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 440px;
  margin-top: 22px;
}

.auth-mode-note {
  max-width: 440px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 11px;
  max-width: 440px;
  margin-top: 18px;
}

label {
  color: #35435a;
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dce2eb;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder,
textarea::placeholder {
  color: #9aa5b5;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b8c3d2;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #c39b56;
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 173, 97, .15);
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  transition: background .15s, border-color .15s, transform .15s;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--gold);
  color: var(--navy);
}

.button-primary:hover {
  background: #f2c85e;
}

.button-secondary {
  border-color: #e7d3a9;
  background: #fff8e9;
  color: #75531c;
}

.button-secondary:hover {
  background: var(--gold-light);
}

.button-quiet {
  border-color: var(--line);
  background: var(--white);
  color: #43516a;
}

.button-quiet:hover {
  background: #f0f3f8;
  border-color: #cbd4e1;
}

.button-wide {
  width: 100%;
  min-height: 47px;
}

.status-message {
  min-height: 0;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-line;
}

.status-message:empty {
  display: none;
}

.status-message[data-state="error"] {
  color: var(--danger);
}

.status-message[data-state="success"] {
  color: var(--success);
}

.login-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 455px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(231, 185, 78, .30), transparent 43%),
    radial-gradient(ellipse at 80% 85%, rgba(104, 151, 205, .30), transparent 45%),
    linear-gradient(145deg, #102341 0%, #1c3a61 55%, #0b1930 100%);
  box-shadow: 0 28px 75px rgba(20, 31, 51, .22);
}

.art-orbit {
  position: absolute;
  border: 1px solid rgba(231, 185, 78, .38);
  border-radius: 50%;
}

.orbit-one {
  width: 365px;
  height: 365px;
}

.orbit-two {
  width: 450px;
  height: 450px;
  border-color: rgba(255, 255, 255, .07);
}

.art-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(310px, 78%);
  padding: 35px 20px;
  border: 1px solid rgba(231, 185, 78, .55);
  border-radius: 22px;
  background: rgba(255, 253, 247, .10);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .22);
  color: var(--white);
  text-align: center;
  backdrop-filter: blur(8px);
}

.art-kicker {
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 2px;
}

.art-note {
  margin: 22px 0;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 100px;
  line-height: 1.1;
}

.art-divider {
  width: 70px;
  height: 1px;
  margin: 3px 0 19px;
  background: var(--gold);
}

.art-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 2px;
}

.art-card p span {
  color: var(--gold);
}

.art-card small {
  margin-top: 13px;
  color: #e8ddbf;
  font-size: 11px;
}

.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 43px 0 30px;
}

.workspace-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -1.2px;
}

.workspace-heading .intro {
  margin-top: 9px;
}

.main-tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line);
}

.main-tab {
  position: relative;
  padding: 15px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.main-tab.active {
  color: var(--ink);
}

.main-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 5px 5px 0 0;
  background: var(--gold);
  content: "";
}

.workspace-panel {
  padding-top: 25px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(130px, 175px);
  gap: 15px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 5px 20px rgba(23, 34, 56, .025);
}

.search-field,
.filter-field {
  display: grid;
  gap: 7px;
}

.search-field input,
.filter-field select {
  min-height: 43px;
}

.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 21px 0;
}

.view-toolbar > p {
  margin: 0;
  color: #536177;
  font-size: 12px;
  font-weight: 750;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eaedf3;
}

.view-button {
  min-width: 92px;
  padding: 9px 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #66748a;
  font-size: 12px;
  font-weight: 800;
}

.view-button.active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 3px 9px rgba(17, 28, 49, .14);
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: 21px;
}

.library-column,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
}

.library-column {
  padding: 21px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.3px;
}

.count-label {
  color: var(--muted);
  font-size: 11px;
}

.song-list,
.potpourri-list {
  display: grid;
  gap: 9px;
}

.song-list:not(:empty) {
  margin-top: 18px;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s, background .15s;
}

.song-item:hover {
  border-color: #d6bd92;
  background: #fdfbf7;
}

.song-item.active {
  border-color: #caa66b;
  background: #fbf6ec;
}

.song-item-icon {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f3f7;
  color: #9a793f;
  font-size: 18px;
}

.song-item-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.song-item-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-item-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 7px;
  background: #f3ead9;
  color: #85652e;
  font-size: 10px;
  font-weight: 800;
}

.detail-panel {
  min-height: 420px;
  padding: 25px;
}

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 365px;
  text-align: center;
}

.detail-symbol {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 17px;
  border-radius: 20px;
  background: #f7f0e3;
  color: #a17c40;
  font-family: Georgia, serif;
  font-size: 35px;
}

.detail-empty h3,
.empty-state h3 {
  margin: 0;
  font-size: 16px;
}

.detail-empty p,
.empty-state p {
  max-width: 360px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.detail-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-actions .button {
  min-height: 33px;
  padding: 6px 9px;
  font-size: 10px;
}

#detail-title {
  margin: 20px 0 2px;
  font-size: 27px;
  letter-spacing: -.7px;
  line-height: 1.3;
}

.detail-artist {
  margin: 0;
  color: var(--muted);
}

.detail-key {
  margin: 12px 0 0;
  color: #8c6b35;
  font-size: 11px;
  font-weight: 750;
}

.detail-content {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-content h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.detail-content pre {
  margin: 0;
  color: #34435a;
  font: inherit;
  font-size: 13px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-source {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border: 1px solid #e8d8ba;
  border-radius: 16px;
  background: #fbf6ec;
  color: #a17c40;
  font-family: Georgia, serif;
  font-size: 30px;
}

.empty-state .button {
  margin-top: 20px;
}

.potpourri-heading {
  align-items: end;
  margin-bottom: 20px;
}

.potpourri-heading .intro {
  margin-top: 7px;
}

.potpourri-list:not(:empty) {
  margin-top: 15px;
}

.potpourri-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.potpourri-card h3 {
  margin: 0;
  font-size: 14px;
}

.potpourri-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.potpourri-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.potpourri-editor {
  margin-top: 20px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
}

.potpourri-editor h3 {
  margin-top: 0;
}

.form-dialog {
  width: min(690px, calc(100% - 28px));
  max-height: min(88vh, 850px);
  padding: 27px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(8, 16, 31, .25);
}

.form-dialog::backdrop {
  background: rgba(10, 18, 32, .61);
  backdrop-filter: blur(4px);
}

.form-dialog > form {
  display: grid;
  gap: 15px;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.6px;
}

.dialog-heading .eyebrow {
  margin-bottom: 5px;
}

.dialog-close {
  display: grid;
  flex: 0 0 37px;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (min-width: 1500px) {
  .app-shell {
    padding-right: 60px;
    padding-left: 60px;
  }
}

@media (max-width: 1050px) {
  .app-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .login-layout {
    gap: 35px;
  }

  .login-art {
    min-height: 390px;
  }

  .library-layout {
    grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr);
  }

  .detail-panel {
    padding: 20px;
  }

  .toolbar {
    grid-template-columns: minmax(200px, 1fr) minmax(150px, .7fr);
  }

  .filter-field:last-child {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 0 18px 36px;
  }

  .topbar {
    min-height: 76px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy small {
    font-size: 10px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
    padding: 42px 0;
  }

  .login-copy {
    max-width: none;
  }

  .login-copy h1 {
    font-size: clamp(34px, 8vw, 47px);
  }

  .login-art {
    min-height: 300px;
  }

  .orbit-one {
    width: 270px;
    height: 270px;
  }

  .orbit-two {
    width: 340px;
    height: 340px;
  }

  .art-card {
    width: min(290px, 80%);
    padding: 25px 18px;
  }

  .art-note {
    margin: 12px 0;
    font-size: 75px;
  }

  .workspace-heading {
    align-items: start;
    flex-direction: column;
    padding-top: 33px;
  }

  .workspace-heading > .button {
    width: 100%;
  }

  .toolbar {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .filter-field:last-child {
    grid-column: auto;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .library-column {
    padding: 16px;
  }

  .detail-panel {
    min-height: 300px;
    padding: 20px;
  }

  .detail-empty {
    min-height: 245px;
  }

  .potpourri-heading {
    align-items: start;
    flex-direction: column;
  }

  .potpourri-heading > .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .topbar {
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    font-size: 20px;
  }

  .account-actions {
    gap: 5px;
  }

  #account-email {
    max-width: 110px;
    font-size: 10px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-features {
    gap: 12px;
  }

  .login-features > div {
    align-items: start;
    font-size: 12px;
  }

  .view-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .view-switch {
    width: 100%;
  }

  .view-button {
    flex: 1;
  }

  .form-dialog {
    padding: 19px;
    border-radius: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-full {
    grid-column: auto;
  }

  .dialog-heading h2 {
    font-size: 19px;
  }

  .potpourri-card {
    align-items: start;
    flex-direction: column;
  }

  .potpourri-card-actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* LYRION KARAOKE SONGBOOK - Προσωπικές παρτιτούρες PDF */
.sheet-panel {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sheet-panel-heading h3,
.sheet-upload-form h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.sheet-panel-heading p,
.sheet-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.sheet-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sheet-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.sheet-card-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sheet-card-copy strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.sheet-card-copy small {
  color: var(--muted);
  font-size: 11px;
}

.sheet-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sheet-upload-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.sheet-upload-form label {
  font-size: 12px;
  font-weight: 700;
}

.sheet-upload-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface, #fff);
  font: inherit;
  font-size: 12px;
}

.sheet-upload-form .button {
  justify-self: start;
}

@media (max-width: 560px) {
  .sheet-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .sheet-card-actions {
    width: 100%;
  }

  .sheet-upload-form .button {
    width: 100%;
  }
}


/* LYRION KARAOKE SONGBOOK - Responsive επιλογές ανάγνωσης */
@media (max-width: 760px) {
  .view-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
  }

  .view-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 7px;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .view-switch {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .view-button {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
  }
}
