/* Eventyora Admin UI layer (lot A, 7 Nov 2026). Loaded after eventyora-theme.css on every Admin page and on sign-in.
   Admin only: app.css and eventyora-theme.css stay untouched. Colour rules use body:not(#eya) so they win over the shared theme;
   size rules use low specificity so page-specific layouts (plans and data-management phone cards) keep their own values. */
:root{--eya-cta:linear-gradient(135deg,#E85D00,#B8460A);--eya-accent-ink:#B8460A}
:root[data-theme="dark"]{--eya-accent-ink:var(--ey-orange)}

/* 1 · surfaces that were hard-coded white */
:root[data-theme] body:not(#eya) :is(.ey-admin-action,.pricing-editor){background:var(--ey-card)!important;color:var(--ey-text)!important;border-color:var(--ey-border)!important}
:root[data-theme] body:not(#eya) :is(.toggle-card,.semantic-chip,.empty-state){background:var(--ey-bg-subtle)!important;color:var(--ey-text)!important;border-color:var(--ey-border)!important}
:root[data-theme] body:not(#eya) .ey-admin-action:hover{border-color:var(--ey-orange)!important;background:var(--ey-card-hover)!important}
:root[data-theme] body:not(#eya) :is(.ey-admin-action small,.toggle-copy,.semantic-chip small){color:var(--ey-text-muted)!important}

/* 2 · 5 · 6 · 25 · one button system for .button and bare <button>, both themes */
.main :is(button,.button):not([class*="ey-dm-"]):not(.menu-toggle):not(.ey-theme-switch),.auth-card :is(button,.button){min-height:44px!important;padding:10px 16px!important;border-radius:12px!important;font:600 14px/1.2 Inter,system-ui,sans-serif!important;gap:6px}
:root[data-theme] body:not(#eya) :is(.main,.auth-card) :is(button,.button):not(.light):not(.secondary):not(.ghost):not(.danger):not(.small-button):not(.menu-toggle):not(.ey-theme-switch):not([class*="ey-dm-"]):not(td *){background:var(--eya-cta)!important;border:1px solid transparent!important;color:#fff!important}
:root[data-theme] body:not(#eya) :is(.main,.auth-card) :is(button,.button):is(.light,.secondary,.small-button):not([class*="ey-dm-"]),
:root[data-theme] body:not(#eya) .main td :is(button,.button):not(.ghost):not(.danger):not([class*="ey-dm-"]){background:var(--ey-card)!important;color:var(--ey-text)!important;border:1px solid var(--ey-border-md)!important}
:root[data-theme] body:not(#eya) .main :is(button,.button).ghost{background:transparent!important;color:var(--ey-text)!important;border:1px solid transparent!important}
:root[data-theme] body:not(#eya) .main :is(button,.button).danger:not([class*="ey-dm-"]){background:var(--ey-danger-bg)!important;color:var(--ey-danger)!important;border:1px solid var(--ey-danger)!important}
:root[data-theme] body:not(#eya) :is(.main,.auth-card) :is(button,.button):not([class*="ey-dm-"]):not([disabled]):hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(255,106,0,.16)!important}
:root[data-theme] body:not(#eya) :is(.main,.auth-card) :is(button,.button)[disabled]{opacity:.5;cursor:not-allowed;transform:none}
body:not(#eya) .main :is(.small-button,td button,td .button):not([class*="ey-dm-"]){min-height:36px!important;padding:6px 12px!important;font-size:13px!important}
@media(max-width:820px){body:not(#eya) .main :is(.small-button,td button,td .button):not([class*="ey-dm-"]){min-height:44px!important}}
@media(prefers-reduced-motion:reduce){:root[data-theme] body:not(#eya) :is(.main,.auth-card) :is(button,.button):hover{transform:none}}

/* 3 · colour pickers show their colour */
:root[data-theme] body:not(#eya) .main input[type=color]{width:44px!important;min-width:44px;height:44px!important;padding:3px!important;border-radius:12px!important;border:1px solid var(--ey-border-md)!important;background:var(--ey-card)!important;cursor:pointer;flex:none}
.main input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.main input[type=color]::-webkit-color-swatch{border:0;border-radius:9px}
.main input[type=color]::-moz-color-swatch{border:0;border-radius:9px}
body .main .color-row{grid-template-columns:110px 44px minmax(160px,1fr) auto!important}
@media(max-width:820px){body .main .color-row{grid-template-columns:minmax(0,1fr) 44px!important}}

/* 4 · sidebar text and icons readable in light */
:root[data-theme] body:not(#eya) .sidebar :is(summary,.side-foot a,.side-foot span:not(.ey-theme-switch span)){color:var(--ey-text)!important}
:root[data-theme] body:not(#eya) .sidebar .nav-icon{color:var(--ey-text-muted)!important}
:root[data-theme] body:not(#eya) .sidebar a:is(.active,:hover) .nav-icon{color:var(--eya-accent-ink)!important}

/* 7 · eyebrow readable in dark (light keeps #8C4B22) */
:root[data-theme="dark"] body:not(#eya) .eyebrow{color:var(--ey-orange)!important}

/* 11 · 18 · one segmented tab style (directory and AI) */
:root[data-theme] body:not(#eya) :is(.directory-tabs,.ai-admin-tabs){display:flex;flex-wrap:wrap;gap:4px;padding:4px;border:1px solid var(--ey-border);border-radius:12px;background:var(--ey-bg-subtle);width:max-content;max-width:100%}
:root[data-theme] body:not(#eya) :is(.directory-tabs,.ai-admin-tabs) a{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--ey-text)!important;font-weight:600;text-decoration:none;box-shadow:none}
:root[data-theme] body:not(#eya) :is(.directory-tabs,.ai-admin-tabs) a:hover{background:var(--ey-card-hover)!important}
:root[data-theme] body:not(#eya) :is(.directory-tabs,.ai-admin-tabs) a:is(.active,[aria-current]){background:var(--ey-card)!important;box-shadow:inset 0 -2px 0 var(--ey-orange)}

/* 12 · checkboxes sit left of their text */
.main label:has(>input[type=checkbox]):not(.toggle-card):not(.checkline):not(.ey-dm-check):not(td label){display:flex!important;align-items:center;gap:8px}
.main label:has(>input[type=checkbox]):not(.toggle-card):not(.checkline):not(.ey-dm-check):not(td label)>input[type=checkbox]{order:-1;width:18px;height:18px;flex:none;margin:0}

/* 13 · 17 · tables and status pills */
:root[data-theme] body:not(#eya) .main table a:not(.button){color:var(--ey-text)!important;font-weight:600;text-decoration:none}
:root[data-theme] body:not(#eya) .main table a:not(.button):hover{color:var(--eya-accent-ink)!important;text-decoration:underline}
.main :is(th,td){font-size:13px!important;padding:10px 12px!important}
.main th{font-size:11px!important;letter-spacing:.06em}
.main :is(td,th).num{text-align:right;font-variant-numeric:tabular-nums}
.main td :is(code,.nowrap),.main td.nowrap{white-space:nowrap;overflow-wrap:normal}
.main td.empty-row{padding:28px 12px!important;text-align:center;color:var(--ey-text-muted)}
body .pill{border-radius:999px!important;padding:3px 9px!important;font-size:12px!important;font-weight:600!important;white-space:nowrap}
:root[data-theme] body:not(#eya) .pill:not(.ok):not(.warn):not(.danger):not(.info){background:var(--ey-bg-subtle)!important;color:var(--ey-text-muted)!important;border:1px solid var(--ey-border)}
:root[data-theme] body:not(#eya) .pill.ok{background:var(--ey-success-bg)!important;color:var(--ey-success)!important}
:root[data-theme] body:not(#eya) .pill.warn{background:var(--ey-warning-bg)!important;color:var(--ey-warning)!important}
:root[data-theme] body:not(#eya) .pill.danger{background:var(--ey-danger-bg)!important;color:var(--ey-danger)!important}
:root[data-theme] body:not(#eya) .pill.info{background:var(--ey-info-bg)!important;color:var(--ey-info)!important}

/* 14 · 15 · KPI row two per line on phone; one right edge for every block */
body .main{max-width:1320px!important}
body .main :is(.grid4,.grid2,.panel,.ey-admin-action-grid){max-width:none!important}
body .main .ey-admin-action-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
@media(max-width:820px){body .main .grid4{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* 20 · readable text sizes */
:is(.main,.auth-card) label{font-size:13px;font-weight:600}
body .main .card small{font-size:12px}
body .main :is(.ey-admin-action small,.toggle-copy,.semantic-chip small){font-size:12px}
/* lot B · 10 · sidebar: Dashboard first, labelled groups, one link style, active page marked */
.sidebar nav .nav-label{display:block;margin:14px 10px 4px;font-size:11px;line-height:1.3;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ey-text-muted)}
.sidebar nav .nav-sub>summary{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;font-size:12.5px;font-weight:650;cursor:pointer;list-style:none}
.sidebar nav .nav-sub>summary::-webkit-details-marker{display:none}
.sidebar nav .nav-sub>summary::after{content:"";margin-left:auto;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.6}
.sidebar nav .nav-sub[open]>summary::after{transform:rotate(45deg)}
.sidebar nav .nav-sub>a{padding-left:36px}
@media(max-width:820px){.sidebar nav .nav-sub>summary{min-height:44px;padding:11px 8px}.sidebar nav .nav-sub>a{padding-left:34px}}
:root[data-theme] body:not(#eya) .sidebar nav .nav-sub>summary:hover{background:var(--ey-card-hover)}
@media(min-width:821px){body .sidebar nav{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding-bottom:16px;-webkit-mask-image:linear-gradient(#000 calc(100% - 16px),transparent);mask-image:linear-gradient(#000 calc(100% - 16px),transparent)}}

/* lot C1 · 8 · 12 · related pages under a header; secondary filters folded */
.main .ea-related{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.main .filters-more{grid-column:1/-1}
.main .filters-more>summary{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;font-weight:600}
.main .filters-more>summary::-webkit-details-marker{display:none}
.main .filters-more>summary::after{content:"";width:6px;height:6px;margin:0 0 3px 10px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.main .filters-more[open]>summary::after{margin:3px 0 0 10px;transform:rotate(-135deg)}
.main .filters-more>.form-grid{margin-top:4px}
.main .filter-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:700px){.main .table-wrap .ey-dm-table{min-width:0}}

/* lot D · 1 · tables on phones: words never break mid-name, dates stay on one line, the table scrolls inside .table-wrap with a fade on the side that has more */
.main .table-wrap :is(td,th){overflow-wrap:break-word;word-break:normal}
.main .table-wrap{scrollbar-width:thin;scrollbar-color:var(--ey-border-md) transparent}
.main .table-wrap::-webkit-scrollbar{height:6px}
.main .table-wrap::-webkit-scrollbar-thumb{background:var(--ey-border-md);border-radius:6px}
.main :is(.table-wrap,table).is-more{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 32px),rgba(0,0,0,.4));mask-image:linear-gradient(to right,#000 calc(100% - 32px),rgba(0,0,0,.4))}
.main :is(.table-wrap,table).is-more.is-less{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.4),#000 32px,#000 calc(100% - 32px),rgba(0,0,0,.4));mask-image:linear-gradient(to right,rgba(0,0,0,.4),#000 32px,#000 calc(100% - 32px),rgba(0,0,0,.4))}
.main :is(.table-wrap,table).is-less:not(.is-more){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.4),#000 32px);mask-image:linear-gradient(to right,rgba(0,0,0,.4),#000 32px)}
@media(max-width:820px){
 body .main .table-wrap table{display:table;min-width:100%;max-width:none;overflow:visible}
 .main .table-wrap td:not(.nowrap):not(.num):not(.empty-row):not(:has(>input[type=checkbox])):not(:has(>.pill:only-child)){min-width:160px}
 .main .table-wrap td:is(.nowrap,.num){min-width:0}
 .main .table-wrap :is(th,td){padding-left:10px!important;padding-right:10px!important}
 .main td.empty-row{text-align:left;padding:20px 12px!important}
}
/* lot D · 1 · C2 follow-ups: muted placeholders in dark, Record refund as ghost danger with room before the forms below */
:root[data-theme="dark"] body:not(#eya) :is(.main,.auth-card) :is(input,textarea)::placeholder{color:var(--ey-text-muted)!important;opacity:.55}
:root[data-theme] body:not(#eya) .main :is(button,.button).ghost.danger{background:transparent!important;color:var(--ey-danger)!important;border:1px solid var(--ey-border-md)!important}
:root[data-theme] body:not(#eya) .main :is(button,.button).ghost.danger:not([disabled]):hover{background:var(--ey-danger-bg)!important;border-color:var(--ey-danger)!important;box-shadow:none!important}
.main .sc-table{margin-bottom:28px}
.main .sc-actions{align-items:flex-end}

/* lot D · 3 · sidebar: a short fade and a chevron only while more items sit below (desktop list and open phone menu) */
@media(min-width:821px){body .sidebar nav:not(.is-more){-webkit-mask-image:none;mask-image:none}}
body .sidebar nav.is-more{-webkit-mask-image:linear-gradient(#000 calc(100% - 22px),rgba(0,0,0,.25));mask-image:linear-gradient(#000 calc(100% - 22px),rgba(0,0,0,.25))}
.sidebar .nav-more{display:none}
@media(min-width:821px){.sidebar nav.is-more~.nav-more{display:block;position:relative;height:0}}
@media(max-width:820px){.sidebar.nav-open nav.is-more~.nav-more{display:block;position:relative;height:0}}
.sidebar nav.is-more~.nav-more::after{content:"";position:absolute;right:24px;bottom:12px;width:9px;height:9px;border-right:2px solid var(--ey-text);border-bottom:2px solid var(--ey-text);opacity:.7;transform:rotate(45deg)}
