:root{
    --vt-wood-dark: #1a1208;
    --vt-wood-medium: #2d2116;
    --vt-wood-light: #3d2e1f;
    --vt-metal-dark: #2a1f15;
    --vt-metal-medium: #4a3a2a;
    --vt-metal-light: #7a6a55;
    --vt-wood-border: #5c4a32;
    --destructive: #8b2500;
    --paper: #ecddca;
    --default-transition-duration: .15s;
    --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}


body {
  margin: 0;
  background: #1a1a1a;
  color: #f3e7c1;
  /* font-family: Inter, Arial, sans-serif; */
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.01em;
  padding-right: 360px;
  overflow: hidden;
}

canvas {
  display: block;
  margin: auto;
  background: #2a2a2a;
}

#canvasWrapper {
  position: relative;
  display: inline-block;
}

#canvasControls {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(20, 16, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

#canvasControls .controlRow {
  display: flex;
  gap: 8px;
  justify-content: center;
}

#canvasControls .panRow {
  justify-content: center;
}

#canvasControls button {
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(52, 40, 28, 0.95);
  color: #f3e7c1;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

#canvasControls button:hover {
  transform: translateY(-1px);
  background: rgba(91, 66, 37, 0.96);
  border-color: rgba(212, 175, 92, 0.6);
}

#canvasControls button:active {
  transform: translateY(0);
}

#canvasControls button#zoomResetBtn {
  min-width: 42px;
}

#sidebar {
    position: fixed;
    right: 0;
    top: 69px;
    width: 360px;
    height: calc(100vh - 70px);
    background: linear-gradient(180deg, #2f2317 0%, #231909 100%);
    color: #f3e7c1;
    box-shadow: -6px 0 18px rgba(0,0,0,0.55);
    /* padding: 20px 18px; */
    box-sizing: border-box;
    display:flex;
    flex-direction: column;
    overflow: unset;
}

#sidebar h3 { margin: 0 0 16px 0; font-size: 18px; color: #f5d689; font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.04em; }
#sidebar h4 { margin: 14px 0 8px; font-size: 13px; color: #d2c29b; letter-spacing: 0.08em; text-transform: uppercase; }
#sidebar label { display: block; margin: 12px 0 6px; font-size: 13px; color: #c6b88b; }
#sidebar input[type=number], #sidebar input[type=text], #sidebar select {
  width: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
  background:#2a2320;
  color:#f5e7c7;
  border:1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
#sidebar input[type=range] { accent-color:#d6b46b; }
#sidebar .info { margin-top:12px; font-size:13px; color:#cfc6b2 }
/* #sidebar button { font-family: Georgia, 'Times New Roman', serif; }
#sidebar button:not(.tabBtn){
  border:none;
  border-radius: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #a47f3a 0%, #6b4a22 100%);
  color:#fff;
  cursor:pointer;
  transition: filter 0.18s ease;
}
#sidebar button:not(.tabBtn):hover{ filter: brightness(1.05); } */

#objectTray {
    position: fixed;
    left: 0;
    right: 360px;
    bottom: 0;
    height: 170px;
    background: rgba(41, 31, 20, 0.96);
    /* color: #fff; */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Tray top: message area */
#objectTrayTop { 
    height:36px; 
    display:flex; 
    align-items:center;
    padding:3px 12px; 
    box-sizing:border-box; 
    border-bottom:1px solid var(--vt-wood-border);
    background: rgba(55, 41, 27, 0.96);
} 
#objectHint { 
    /* color:#ccc;  */
    font-size:17px;
    margin:0; 
    /* font-weight: bold;  */
}

/* Tray bottom: object list */
#objectTrayBottom { 
    flex:1; 
    display:flex; 
    align-items:flex-start; 
    padding:8px 12px;
    box-sizing:border-box; 
    overflow:unset;
    flex-direction: row;
    flex-wrap: nowrap; 
}
#objectList { display:flex; gap:18px; overflow-x:auto; overflow-y:hidden; height:100%; width:100%; align-items:flex-start; }
.objectTrayGroup { 
    display:flex; 
    flex-direction:column; 
    gap:8px; 
}
.objectTrayGroup.collapsed{
    flex-direction: row; 
    width: 25px;
}
.objectTrayGroupHeader { 
    font-size:11px; 
    text-transform:uppercase; 
    letter-spacing:0.16em; 
    color:#d0bc80; 
    padding-left:4px; 
    width: fit-content;
    padding: 5px;
    border-radius: 5px;
}
.objectTrayGroupHeader:hover { 
    background: var(--vt-metal-medium);
}
.objectTrayGroupHeader.collapsed{
    writing-mode: sideways-lr;
    background: var(--vt-wood-dark);
    border-radius: 10px;
    width: 15px;
}
.groupList { 
    display:flex; 
    flex-wrap: nowrap; 
    gap:8px; 
    flex-direction: row;
    padding: 4px 0 0 0;
}
.groupList.collapsed{
    display:none;
}
.objectItem 
{ 
    width: 56px; 
    height: 56px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid rgba(255, 255, 255, 0.03);
    background-color: color-mix(in oklab, var(--vt-metal-light) 20%, transparent);
    border-radius: 10px;
}
.objectItem:hover { 
    border-color: #c9a66b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #c9a66b33;
}
.objectItem.selected {
    border-color: #e4c078;
    background-color: color-mix(in oklab, var(--vt-metal-light) 40%, transparent);
    box-shadow: 0 6px 18px #e4c07855;
    transform: translateY(-2px);
}

.objectItem img { max-width:88px; max-height:88px; display:block }

body { padding-bottom: 140px; }


.sidebar-tabs{
    display:flex;
    /* gap:6px; */
    margin-bottom:16px;
    /* padding:8px; */
    background: rgba(255,255,255,0.04);
    /* border: 1px solid rgba(255,255,255,0.08); */
    /* border-radius: 14px; */
}

.tabBtn{
    flex:1;
    /* padding:10px 12px; */
    padding-block: 10px;
    padding-inline: 0px;
    background: transparent;
    border:none;
    color:#d8c79a;
    cursor:pointer;
    /* font-weight:700; */
    /* text-transform: uppercase; */
    letter-spacing:0.08em;
    transition: all 0.18s ease;
    /* border-radius: 10px; */
    align-items: center;
    display: flex;
    justify-content: space-evenly;
    box-shadow: inset 0 -2px 0 var(--vt-wood-border);
}

.tabBtn.active {
    background: rgba(255,255,255,0.1);
    color:#f8e6ac;
    box-shadow: inset 0 -2px 0 rgba(215, 170, 95, 0.7);
}

.tabBtn:hover:not(.active) {
    color:#fff;
    transform: translateY(-1px);
}

.tabContent{
    display: flex;
    flex-direction: column;
    padding: 10px;
    flex:1;
    min-height: 0;
    overflow: hidden;
}

.roundRow{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    cursor: default;
}

.roundRow:hover {
    background: rgba(255, 255, 255, 0.05);
}

.roundItem {
    flex: 1;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.roundItem.selected{
    background: rgba(255, 255, 255, 0.105);
}


.groupHeader{
    background: rgba(255, 255, 255, 0.105);
}
.groupMembers{
        background: rgba(255, 255, 255, 0.064);
        margin-bottom: 5px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
}

/* Make placed list fill remaining sidebar space and scroll when needed */
#placedList {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0; /* allow flex children to shrink and allow scrolling */
    padding-right: 8px;
}
#placedGroupsContainer{
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
}


#playersControls {
    display:flex;
    flex-direction:column;
    gap:10px;
    flex:1;
    min-height: 0;
}

#playerPlacedList{
    display:flex;
    flex-direction:column;
    gap:6px;
    overflow:auto;
    padding-right:8px;
    flex:1;
    min-height: 0;
}

/* Custom scrollbar style for the editor panels */
#objectList,
#placedList,
#placedGroupsContainer,
#playerPlacedList,
#sidebar .tabContent,
#objectTrayBottom {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 92, 0.8) rgba(22, 16, 11, 0.65);
}

#objectList::-webkit-scrollbar,
#placedList::-webkit-scrollbar,
#placedGroupsContainer::-webkit-scrollbar,
#playerPlacedList::-webkit-scrollbar,
#sidebar .tabContent::-webkit-scrollbar,
#objectTrayBottom::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#objectList::-webkit-scrollbar-track,
#placedList::-webkit-scrollbar-track,
#placedGroupsContainer::-webkit-scrollbar-track,
#playerPlacedList::-webkit-scrollbar-track,
#sidebar .tabContent::-webkit-scrollbar-track,
#objectTrayBottom::-webkit-scrollbar-track {
    background: rgba(22, 16, 11, 0.65);
    border-radius: 999px;
}

#objectList::-webkit-scrollbar-thumb,
#placedList::-webkit-scrollbar-thumb,
#placedGroupsContainer::-webkit-scrollbar-thumb,
#playerPlacedList::-webkit-scrollbar-thumb,
#sidebar .tabContent::-webkit-scrollbar-thumb,
#objectTrayBottom::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 92, 0.75);
    border-radius: 999px;
    border: 2px solid rgba(22, 16, 11, 0.5);
}

#objectList::-webkit-scrollbar-thumb:hover,
#placedList::-webkit-scrollbar-thumb:hover,
#placedGroupsContainer::-webkit-scrollbar-thumb:hover,
#playerPlacedList::-webkit-scrollbar-thumb:hover,
#sidebar .tabContent::-webkit-scrollbar-thumb:hover,
#objectTrayBottom::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 92, 0.95);
}

/* Header styles (new UI) */
.site-header{
    height: 64px;
    background: linear-gradient(180deg, #3b2b1f 0%, #2e2319 100%);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    font-family: Georgia, 'Times New Roman', serif;
    color: #e6c98a;
    width: 100vw;
    position: relative;
}

.site-header-inner{
    width: 100%;
    box-sizing: border-box;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 12px 24px;
    z-index: 1;
}
.site-title{
    font-size:22px;
    font-weight:500;
    letter-spacing:0.6px;
}
.site-actions{ display:flex; gap:8px; align-items:center }
.btn-save{
    background: linear-gradient(180deg,#e4c078,#c79e4a);
    color:#3b2614;
    border:1px solid rgba(0,0,0,0.35);
    padding:8px 14px;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
}
.btn-save:hover{ filter:brightness(0.95) }


/* ==================== Generick styles ====================== */
.background-wood{
    background-image: linear-gradient(180deg, var(--vt-wood-dark) 0%, var(--vt-wood-medium) 15%, var(--vt-wood-light) 50%, var(--vt-wood-medium) 85%, var(--vt-wood-dark) 100%);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.6);
}
.background-wood::after{
    content: "";    
  position: absolute;
  inset: 10px;
  border-radius: 34px;
  background: repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 8px,
      rgba(0, 0, 0, 0.15) 8px,
      rgba(0, 0, 0, 0.15) 9px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 20px,
      rgba(0, 0, 0, 0.05) 20px,
      rgba(0, 0, 0, 0.05) 21px
    );
  pointer-events: none;
  opacity: 0.6;
}
.border-wood{
    /* border: 5px solid; */
    /* border-image: radial-gradient(circle at 35% 35%, #4b4231 0%, #2e251c 25%, #5a4a3a 50%, #3a2a1a 80%, #2a1a0a 100%) 1; */
    border: 3px solid var(--vt-wood-border);
}
.btn{
    z-index: 1;
    color: #fff;
    cursor: pointer;
    padding: 10px 14px;
    border-radius:6px;
}
.btn-min{
    z-index: 1;
    color: #fff;
    cursor: pointer;
    padding: 3px 14px;
    border-radius:6px;
}
.btn:active{
    --tw-scale-x: 95%;
    --tw-scale-y: 95%;
    scale: var(--tw-scale-x) var(--tw-scale-y)
}
.btn-white{
    background: linear-gradient(180deg,#e4c078,#c79e4a);
    color:#3b2614;
    border:1px solid rgba(0,0,0,0.35);
    padding:8px 14px;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
}
.btn-white:hover{ 
    background: linear-gradient(#e0b560 0%, #d4a855 50%, #c99f50 100%);
}
.btn-dark{
    text-shadow: 0 1px 2px #00000080;
    background: linear-gradient(#8b4513 0%, #6b3410 50%, #5a2d0e 100%);
    border: 2px solid #3d2008;
    box-shadow: inset 0 1px #c9a66b4d, inset 0 -1px #0003, 0 2px 4px #0000004d;
    color: #fff;
}
.btn-dark:hover{
    background: linear-gradient(#9c5015 0%, #7c4012 50%, #6b3510 100%);
}
.btn-dark:active{
    background: linear-gradient(#5a2d0e 0%, #6b3410 50%, #8b4513 100%);
    box-shadow: inset 0 2px 4px #0006, 0 1px 2px #0003;
}
button{
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
}
.transition-all {
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
}
.btn-red{
    background: linear-gradient(180deg, var(--destructive) 0%, 
color-mix(in oklab, black 40%, var(--destructive)) 100%);
    font-size: 12px;
	padding: 4px 8px;
    color: #fff;
    border: none;
	cursor: pointer;
}
.zoomBtn{
    display: flex;
    justify-content: center;
    align-items: center;
}
.background-paper{
    background: var(--paper);
    border: 1px double #c9a66b33;
}
.background-paper::before{
    content: "";
    pointer-events: none;
    border: 1px double #c9a66b33;
    position: absolute;
    inset: 2px;
}


/* ── Screen layer ─────────────────────────────────────────────────────── */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  /* background: rgba(0, 0, 0, 0.85); */
  
}
.screen-login{
    flex-direction: column;
}
/* ── Login screen ─────────────────────────────────────────────────────── */
.wood-panel-login{
    background: linear-gradient(90deg, #2d2418f2 0%, #3d3225e6 2%, #2d2418f2 4%, #3d3225d9 6%, #2d2418f2 8%, #3d3225e6 100%);
    border: 3px solid #5c4a32;
    box-shadow: inset 0 0 20px #0000004d, 0 4px 8px #0006, inset 0 1px #c9a66b1a;
    display:flex;
    width: fit-content;
    padding: 0.25rem;
}

.login-card {
    /* width: 100%; */
    width: 380px;
    /* padding: 32px 28px; */
    padding: 2rem;
    /* border-radius: 10px; */
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 1;
    border: 4px double var(--vt-wood-border);
    position: relative;
}
.nail{
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 100%;
    --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, #0000000d);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    background-image: radial-gradient(circle at 30% 30%, #707070, #181818);
}
.nailTL{
    top: 2.5%;
    left: 2.5%;
}
.nailTR{
    top: 2.5%;
    right: 2.5%;
}
.nailBL{
    bottom: 2.5%;
    left: 2.5%;
}
.nailBR{
    bottom: 2.5%;
    right: 2.5%;
}

.login-title {
  margin: 0 0 4px 0;
  font-size: 25px;
  color: var(--vt-metal-medium);
  text-align: center;
}

.line-separator{
    background-color: #8b4513;
    height: 1px;
    flex:1;
}

.login-subtitle {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: var(--vt-metal-medium);
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-label {
  font-size: 15px;
  color: var(--vt-wood-border);
}

.login-input {
  padding: 9px 10px;
  background: #f5e6d3;
  color: var(--vt-wood-light);
  border: 2px solid var(--vt-wood-light);
  border-radius: 2px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  z-index: 1;
}
.login-input:focus{
    box-shadow: 0px 0px 4px #c9a66b;
    border-color: #c9a66b;
}

.login-error {
  color: #e87070;
  font-size: 13px;
  padding: 6px 8px;
  background: rgba(180, 40, 40, 0.15);
  border-radius: 4px;
}

.login-btn {
    margin-top: 6px;
    padding: 10px;
    font-size: 20px;
    font-family: Georgia, 'Times New Roman', serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-text-login{
    margin-top: 15px;
    font-size: 15px;
    color: #ad8545;
}

/* ── Event select screen ──────────────────────────────────────────────── */

.screen-event-select {
  align-items: flex-start;
  justify-content: flex-start;
  background: #14100a;
  overflow-y: auto;
}

.es-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.es-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  box-sizing: border-box;
}

.es-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.es-brand-main {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f3e7c1;
}
.es-brand-divider {
  color: #5c4a32;
  font-size: 18px;
}
.es-brand-sub {
  font-size: 13px;
  color: #ad8545;
  letter-spacing: 0.12em;
}

.es-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.es-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}
.es-user-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c79e4a, #8b6520);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #1a1208;
}
.es-user-name {
  font-size: 14px;
  color: #f3e7c1;
}
.es-logout-btn {
  font-size: 13px;
  padding: 6px 14px;
}

/* Main */
.es-main {
  flex: 1;
  padding: 40px 48px;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.es-page-title {
  margin-bottom: 32px;
}
.es-title {
  margin: 0 0 6px 0;
  font-size: 32px;
  color: #f3e7c1;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.es-subtitle {
  margin: 0;
  font-size: 14px;
  color: #7a6a55;
}

/* Toolbar */
.es-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.es-search-wrap {
  flex: 1;
  position: relative;
  max-width: 520px;
}
.es-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a6a55;
  pointer-events: none;
}
.es-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 10px 38px;
  background: rgba(42, 31, 21, 0.8);
  border: 1px solid #5c4a32;
  border-radius: 6px;
  color: #f3e7c1;
  font-size: 14px;
  font-family: Georgia, 'Times New Roman', serif;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.es-search-input::placeholder { color: #5c4a32; }
.es-search-input:focus {
  border-color: #c9a66b;
  box-shadow: 0 0 0 2px rgba(201, 166, 107, 0.15);
}
.es-new-btn {
  font-size: 13px;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 10px 20px;
}

/* Grid */
.es-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .es-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .es-grid { grid-template-columns: 1fr; } }

/* Cards */
.es-card {
  background: linear-gradient(160deg, #2d2418 0%, #201912 100%);
  border: 1px solid #5c4a32;
  border-radius: 8px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.es-card:hover {
  border-color: #c9a66b;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,166,107,0.15);
  transform: translateY(-2px);
}
.es-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.es-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #f3e7c1;
  line-height: 1.3;
  flex: 1;
}
.es-card-star {
  background: none;
  border: none;
  cursor: pointer;
  color: #3d2e1f;
  font-size: 20px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.es-card-star:hover { color: #c9a66b; transform: scale(1.2); }
.es-card-star.active { color: #d4a855; }

.es-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.es-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #7a6a55;
}
.es-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(92,74,50,0.4);
}
.es-card-ago {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #5c4a32;
}
.es-card-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: Georgia, 'Times New Roman', serif;
  color: #c9a66b;
  padding: 0;
  transition: color 0.15s, transform 0.15s;
}
.es-card-edit-btn:hover {
  color: #e4c078;
  transform: translateX(2px);
}

/* Card top: name + status badge */
.es-card-top-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

/* Status badge */
.es-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 20px;
  width: fit-content;
}
.es-status--active   { background: rgba(80,160,80,0.25);  color: #7ed07e; border: 1px solid rgba(80,160,80,0.4); }
.es-status--done     { background: rgba(120,120,120,0.2); color: #a0a0a0; border: 1px solid rgba(120,120,120,0.35); }
.es-status--template { background: rgba(200,130,40,0.2);  color: #d4a855; border: 1px solid rgba(200,130,40,0.4); }

/* Admin badge next to username */
.es-admin-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(212,168,85,0.25);
  color: #d4a855;
  border: 1px solid rgba(212,168,85,0.4);
  margin-left: 4px;
  vertical-align: middle;
}

/* Card description */
.es-card-desc {
  font-size: 12px;
  color: #9a8060;
  margin: 0;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Card footer: ago text + action buttons */
.es-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.es-card-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #5c4a32;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.es-card-icon-btn:hover { color: #c9a66b; background: rgba(92,74,50,0.2); }
.es-delete-btn:hover    { color: #e87070 !important; background: rgba(232,112,112,0.12) !important; }

/* Delete confirmation */
.es-confirm-text {
  margin: 0;
  font-size: 13px;
  color: #c9b48a;
  line-height: 1.5;
}
.es-confirm-input {
  margin-top: 4px;
}

/* Red button for destructive actions */
.btn-red {
  background: rgba(200,60,60,0.85);
  color: #fff;
  border-color: #c03030;
}
.btn-red:hover { background: rgba(220,70,70,0.95); border-color: #d04040; }

/* Select dropdown styled like login-input */
.es-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.es-state-msg {
  grid-column: 1 / -1;
  font-size: 14px;
  color: #7a6a55;
  padding: 60px 0;
  text-align: center;
}
.es-state-error { color: #e87070; }

/* Modal */
.es-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.es-modal-overlay[hidden] { display: none; }
.es-modal-box {
  width: 420px;
  padding: 28px 32px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.es-modal-title {
  margin: 0;
  font-size: 20px;
  color: #f3e7c1;
}
.es-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.es-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.site-event-label {
  font-size: 13px;
  color: #f0dba8;
  padding: 6px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#changeEventBtn{
    background: transparent;
    border: 0px;
    padding: 5px;
    width: 50px;
    color: #f0dba8;
}