:root {
  --bg: #f2ece1;
  --panel: rgba(255, 250, 242, 0.88);
  --panel-strong: #fff8ef;
  --panel-soft: rgba(255, 248, 239, 0.94);
  --ink: #1f2b2a;
  --muted: #566665;
  --line: rgba(55, 75, 74, 0.16);
  --brand: #a54c2a;
  --accent: #2e6f69;
  --accent-soft: rgba(46, 111, 105, 0.12);
  --shadow: 0 20px 50px rgba(51, 45, 34, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(165, 76, 42, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(46, 111, 105, 0.16), transparent 30%),
    linear-gradient(180deg, #f8f1e5 0%, #efe7db 45%, #ebe3d9 100%);
}

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

button {
  cursor: pointer;
}

.controls,
.settings-panel,
.site-footer,
.modal-dialog,
.liquid-glass-button,
.liquid-glass-combo-left,
.liquid-glass-combo-center,
.liquid-glass-combo-right,
.modal-content,
.modal-header,
.modal-footer,
.scrolled-container {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 24px auto 18px;
  width: calc(100% - 48px);
  max-width: 1440px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.controls > div {
  display: flex;
  align-items: center;
}

.scrolled-container {
  width: calc(100% - 48px);
  max-width: 1440px;
  margin: 0 auto 90px;
  padding: 16px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.scrolled-table {
  margin-top: 0;
  width: 100%;
}

.table,
.item-subtable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: transparent;
}

tr {
  background: rgba(255, 253, 248, 0.92);
}

.table-header,
.table-header tr,
th {
  background: rgba(46, 111, 105, 0.18);
}

th,
td {
  font-size: 1rem;
  border: 0;
  padding: 14px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(55, 75, 74, 0.12);
}

th {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.item-tr {
  transition: background 140ms ease, transform 140ms ease;
}

.item-tr:hover {
  background: rgba(165, 76, 42, 0.08);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 12px 24px rgba(51, 45, 34, 0.14);
}

.fin-header,
.fin-table,
.fin-tr,
.fin-th,
.fin-td {
  padding: 0;
  border-spacing: 0;
  margin: 0;
  border: none !important;
  background: transparent;
}

.liquid-glass-button,
.liquid-glass-combo-left,
.liquid-glass-combo-center,
.liquid-glass-combo-right,
.modal-button,
.table-button,
.hamburger,
.close-btn {
  color: var(--ink);
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(55, 75, 74, 0.16);
  box-shadow: 0 10px 22px rgba(51, 45, 34, 0.1);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.liquid-glass-button:hover,
.liquid-glass-combo-left:hover,
.liquid-glass-combo-center:hover,
.liquid-glass-combo-right:hover,
.modal-button:hover,
.table-button:hover,
.hamburger:hover,
.close-btn:hover,
.astext:hover {
  transform: translateY(-1px);
}

.liquid-glass-button,
.liquid-glass-combo-left,
.liquid-glass-combo-center,
.liquid-glass-combo-right,
.hamburger {
  font-size: 1rem;
  padding: 12px 16px;
  min-height: 48px;
}

.liquid-glass-button {
  position: relative;
  border-radius: 999px;
  overflow: hidden;
}

.liquid-glass-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.liquid-glass-combo-left {
  border-radius: 999px 0 0 999px;
}

.liquid-glass-combo-center {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  min-width: 120px;
  text-align: center;
}

.liquid-glass-combo-right {
  border-radius: 0 999px 999px 0;
}

#search,
.form-input,
.modal-label[type="text"],
.modal-label[type="password"],
textarea,
select {
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid rgba(55, 75, 74, 0.18);
  border-radius: 14px;
}

#search {
  flex: 1 1 260px;
  min-width: 220px;
}

input,
select,
textarea {
  padding: 12px 14px;
}

.hamburger,
.close-btn {
  border-radius: 999px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 20, 0.42);
  display: none;
  z-index: 30;
}

.overlay.active {
  display: block;
}

.settings-panel {
  position: fixed;
  top: 0;
  left: -320px;
  width: 280px;
  height: 100%;
  padding: 24px 20px;
  background: rgba(255, 249, 241, 0.96);
  border-right: 1px solid rgba(55, 75, 74, 0.12);
  box-shadow: 0 28px 60px rgba(30, 25, 20, 0.24);
  transition: left 0.25s ease;
  z-index: 40;
}

.settings-panel.active {
  left: 0;
}

.settings-panel h2 {
  margin: 8px 0 0;
  font-size: 1.6rem;
}

.close-btn {
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  padding: 0;
  float: right;
}

.astext {
  font-size: 1rem;
  color: var(--ink);
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.settings-list {
  margin-top: 44px;
  list-style: none;
  padding: 0;
}

.settings-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(55, 75, 74, 0.12);
}

.site-footer {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 20px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 14px;
  background: rgba(255, 249, 241, 0.94);
  border: 1px solid rgba(55, 75, 74, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(30, 25, 20, 0.18);
}

.statustext {
  width: 100% !important;
  height: auto;
  font-weight: 600;
  font-size: 0.98rem;
  text-align: center;
  background: transparent;
  color: var(--ink) !important;
  border: none;
  padding: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  background-color: rgba(30, 25, 20, 0.42);
  overflow: auto;
}

.modal-dialog {
  width: min(1120px, calc(100% - 20px));
  margin: 24px auto;
  background: rgba(255, 249, 241, 0.96);
  border-radius: 30px;
  border: 1px solid rgba(55, 75, 74, 0.12);
  box-shadow: 0 28px 60px rgba(30, 25, 20, 0.24);
  overflow: hidden;
}

.modal-content {
  background: transparent;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  color: var(--ink);
  background: rgba(255, 248, 239, 0.94);
  box-shadow: none;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(55, 75, 74, 0.12);
}

.modal-footer {
  justify-content: center;
  padding: 18px 22px;
  border-top: 1px solid rgba(55, 75, 74, 0.12);
  min-height: auto;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-body,
.modal-item {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}

.modal-body {
  padding: 22px;
}

.modal-item {
  padding: 18px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(55, 75, 74, 0.1);
}

.modal-rounded {
  border-radius: 22px;
}

.modal-shadow {
  box-shadow: 0 14px 32px rgba(51, 45, 34, 0.1);
}

.center-container {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 16px;
  flex-wrap: wrap;
}

.player-container {
  display: flex;
  justify-content: center;
  width: 90%;
  margin-left: 5%;
  margin-right: 5%;
  gap: 1rem;
}

.left-aligned-content {
  margin-left: 0;
  max-width: 320px;
  width: 100%;
  background-color: transparent;
}

.modal-container {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid rgba(55, 75, 74, 0.12);
  background: rgba(255, 248, 239, 0.94);
}

.modal-image-wrapper {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
}

.modal-content-wrapper {
  text-align: left;
  flex-grow: 1;
}

.modal-label,
.form-label,
.form-check-checkbox-label,
.checkbox-label,
.list-header-text {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.modal-label,
.form-label {
  width: auto;
  padding-left: 0;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  max-width: 100%;
  font-size: 0.98rem;
  text-align: left;
  padding: 12px 14px;
  box-shadow: none;
  gap: 0;
  margin-bottom: 12px;
}

.form-date {
  width: 100%;
  text-align: left;
  font-weight: 600;
  padding-left: 0;
  margin-bottom: 0.75rem;
}

.checkbox {
  width: 1.2em;
  height: 1.2em;
  box-shadow: none;
  accent-color: var(--accent);
}

.login-checkbox {
  margin-right: 8px;
}

.check-list {
  padding-left: 0;
}

ul li {
  margin-bottom: 14px;
  list-style-type: none;
}

.modal-button {
  font-size: 1rem;
  font-weight: 700;
  min-width: 132px;
  height: 48px;
  border-radius: 999px;
}

.table-button {
  font-size: 1rem;
  font-weight: 700;
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.transparent {
  background-color: transparent;
  border: none;
}

.image-td {
  vertical-align: middle;
}

.textarea {
  font-size: 1rem;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(55, 75, 74, 0.18);
}

.list-text {
  font-size: 0.98rem;
  font-weight: 500;
}

.top-left,
.top-right,
.player-footer,
.audio-player,
.audio-player-table,
.custom-audio-player,
.shadowed,
#player-footer.fade-out,
.progress-bar,
progress,
.progress-row-td,
.progress,
.time-display,
.player-button-div {
  /* Retained to avoid breaking any shared markup, but neutralized for Admin */
}

@media (max-width: 980px) {
  .controls,
  .scrolled-container {
    width: calc(100% - 28px);
  }

  .controls {
    padding: 16px;
  }

  .controls > div {
    width: 100%;
    justify-content: center;
  }

  #search {
    width: 100%;
  }

  .modal {
    padding: 14px;
  }

  .modal-dialog {
    width: 100%;
    margin: 8px auto;
  }

  .center-container,
  .modal-footer,
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    left: 14px;
    right: 14px;
  }
}

@media (max-width: 720px) {
  th,
  td {
    font-size: 0.92rem;
    padding: 10px 8px;
  }

  .liquid-glass-button,
  .liquid-glass-combo-left,
  .liquid-glass-combo-center,
  .liquid-glass-combo-right,
  .hamburger {
    width: 100%;
  }

  .modal-body,
  .modal-header,
  .modal-footer,
  .modal-container {
    padding: 16px;
  }

  .settings-panel {
    width: 86%;
    left: -100%;
  }
}
