/*==========================================================================
  CMORoom Admin - common dashboard style
  Layout: fixed header + collapsible sidebar + fixed footer
==========================================================================*/
:root {
    --dash-bg:            #0b0b0d;
    --dash-surface:       #131317;
    --dash-surface-2:     #1a1a20;
    --dash-line:          #26262e;
    --dash-line-soft:     #1f1f26;
    --dash-text:          #ffffff;
    --dash-muted:         #8f8f9c;
    --dash-gold:          #938048;
    --dash-gold-soft:     rgba(147, 128, 72, .14);
    --dash-green:         #3fae72;
    --dash-blue:          #4b8ff0;
    --dash-red:           #e05563;
    --dash-amber:         #d9a441;

    --dash-header-h:      64px;
    --dash-footer-h:      44px;
    --dash-sidebar-w:     260px;
    --dash-sidebar-mini:  74px;
    --dash-radius:        0;
    --dash-shadow:        0 10px 30px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }

.dash-body {
    margin: 0;
    background: var(--dash-bg);
    color: var(--dash-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    padding-top: var(--dash-header-h);
    padding-bottom: var(--dash-footer-h);
    -webkit-font-smoothing: antialiased;
}
.dash-body a { text-decoration: none; color: inherit; transition: all .25s ease; }
.dash-body ul { list-style: none; margin: 0; padding: 0; }

/*========================= FIXED HEADER =========================*/
.dash-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--dash-header-h);
    background: #000;
    border-bottom: 1px solid var(--dash-line);
    z-index: 1040;
    overflow: visible;
}
.dash-header-inner {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.dash-header-left { display: flex; align-items: center; gap: 14px; }
.dash-logo {
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 18px;
    letter-spacing: .5px;
    color: #fff;
    white-space: nowrap;
}
.dash-logo span { color: var(--dash-gold); }
.dash-logo em {
    font-style: normal;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dash-muted);
    border-left: 1px solid var(--dash-line);
    margin-left: 10px;
    padding-left: 10px;
}
.dash-icon-btn {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all .25s ease;
}
.dash-icon-btn:hover, .dash-icon-btn:focus-visible { background: var(--dash-surface-2); border-color: var(--dash-line); color: var(--dash-gold); }
.dash-header-right { display: flex; align-items: center; }
.dash-notif-wrap { position: relative; }

/* notification bell */
.dash-bell { position: relative; }
.dash-bell-dot {
    position: absolute;
    top: 4px; right: 3px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f44336;
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
.dash-bell.is-read .dash-bell-dot { display: none; }
.dash-notif {
    padding: 0;
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    overflow: hidden;
    z-index: 1060;
}
.dash-notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dash-line-soft);
    font-weight: 700;
    color: #fff;
    flex: 0 0 auto;
}
.dash-notif-clear {
    background: none; border: 0; padding: 0;
    color: var(--dash-gold);
    font-size: 12px;
    cursor: pointer;
}
.dash-notif-list { overflow-y: auto; min-height: 0; }
.dash-notif-item {
    display: flex; gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--dash-line-soft);
}
.dash-notif-item.is-unread { background: rgba(147, 128, 72, .06); }
.dash-notif-item p { margin: 0 0 3px; font-size: 13px; color: #e7e7ee; line-height: 1.4; }
.dash-notif-item small { color: var(--dash-muted); font-size: 11px; }
.dash-notif-ico {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.dash-notif-ico.bg-gold  { background: var(--dash-gold-soft);        color: var(--dash-gold); }
.dash-notif-ico.bg-blue  { background: rgba(75, 143, 240, .14);      color: var(--dash-blue); }
.dash-notif-ico.bg-green { background: rgba(63, 174, 114, .14);      color: var(--dash-green); }
.dash-notif-ico.bg-grey  { background: var(--dash-surface-2);        color: var(--dash-muted); }
.dash-notif-foot {
    flex: 0 0 auto;
    display: block;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--color-white);
    background: var(--dash-surface-2);
}
.dash-notif-foot:hover { color: #fff; }

/*========================= COLLAPSIBLE SIDEBAR =========================*/
.dash-sidebar {
    position: fixed;
    top: var(--dash-header-h);
    bottom: var(--dash-footer-h);
    left: 0;
    width: var(--dash-sidebar-w);
    background: var(--dash-surface);
    border-right: 1px solid var(--dash-line);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width .25s ease, transform .25s ease;
    z-index: 1035;
}
.dash-sidebar::-webkit-scrollbar { width: 6px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: var(--dash-line); border-radius: 6px; }
.dash-nav { padding: 14px 12px; }
.dash-nav > ul > li { margin-bottom: 4px; }

.dash-nav-link {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 0;
/*    border-radius: 10px;*/
    background: transparent;
    color: #c9c9d4;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.dash-nav-link > .bi:first-child { font-size: 17px; flex: 0 0 20px; text-align: center; }
.dash-nav-link:hover { background: var(--dash-surface-2); color: #fff; }
.dash-nav-link.active { background: var(--dash-gold-soft); color: var(--dash-gold); font-weight: 700; }
.dash-nav-link.active::before {
    content: ""; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0;
    background: var(--dash-gold);
}
.dash-nav-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.dash-nav-badge {
    background: var(--dash-green);
    color: var(--color-white);
    font-size: 11px; font-weight: 700;
    border-radius: 999px;
    padding: 1px 8px;
}
.dash-nav-caret { font-size: 12px; transition: transform .25s ease; color: var(--dash-muted); }
.dash-nav-group.open > .dash-nav-toggle .dash-nav-caret { transform: rotate(180deg); }

.dash-subnav { display: none; padding: 4px 0 4px 44px; }
.dash-subnav-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #9a9aa8;
    font-size: 13px;
}
.dash-subnav-link:hover { color: #fff; background: var(--dash-surface-2); }
.dash-subnav-link.active { color: var(--dash-gold); font-weight: 700; }

.dash-sidebar-foot { padding: 12px; border-top: 1px solid var(--dash-line-soft); }

/*========================= MAIN =========================*/
.dash-main {
    margin-left: var(--dash-sidebar-w);
    min-height: calc(100vh - var(--dash-header-h) - var(--dash-footer-h));
    transition: margin-left .25s ease;
}
.dash-container { padding: 26px 26px 40px; max-width:100%; }
.dash-page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 14px;
    margin-bottom: 22px;
}
.dash-page-title {
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 26px;
    margin: 0;
    color: #fff;
}
.dash-page-sub { margin: 6px 0 0; color: var(--dash-muted); font-size: 13px; }

/*========================= COLLAPSED STATE (desktop) =========================*/
@media (min-width: 992px) {
    .sidebar-collapsed .dash-sidebar { width: var(--dash-sidebar-mini); }
    .sidebar-collapsed .dash-main { margin-left: var(--dash-sidebar-mini); }
    .sidebar-collapsed .dash-nav-text,
    .sidebar-collapsed .dash-nav-badge,
    .sidebar-collapsed .dash-nav-caret { display: none; }
    .sidebar-collapsed .dash-nav-link { justify-content: center; padding: 12px 0; }
    .sidebar-collapsed .dash-subnav { display: none !important; }
    /* icon-only tooltip */
    .sidebar-collapsed .dash-nav-link::after {
        content: attr(data-title);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        padding: 6px 10px;
        background: #000;
        border: 1px solid var(--dash-line);
        border-radius: 8px;
        font-size: 12px;
        color: #fff;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease;
        z-index: 5;
    }
    .sidebar-collapsed .dash-nav-link:hover::after { opacity: 1; visibility: visible; }
}

/*========================= FIXED FOOTER =========================*/
.dash-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: var(--dash-footer-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-top: 1px solid var(--dash-line);
    color: var(--dash-muted);
    font-size: 12px;
    z-index: 1045;
}

/*========================= CARDS =========================*/
.dash-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
/*    border-radius: var(--dash-radius);*/
    margin-bottom: 22px;
}
.dash-card-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dash-line-soft);
}
.dash-card-title { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.dash-card-sub { margin: 3px 0 0; font-size: 12px; color: var(--dash-muted); }
.dash-card-body { padding: 20px; }
.dash-card-foot { padding: 14px 20px; border-top: 1px solid var(--dash-line-soft); }

/*========================= BUTTONS =========================*/
.dash-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius:0px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
}
.dash-btn-gold  { background: var(--dash-gold); color:#fff; }
.dash-btn-gold:hover { background: #a8944f; color: #fff; }
.dash-btn-ghost { background: transparent; border-color: var(--dash-line); color: #d5d5de; }
.dash-btn-ghost:hover { border-color: var(--dash-gold); color: var(--dash-gold); }
.dash-btn-danger { background: rgba(224, 85, 99, .12); border-color: rgba(224, 85, 99, .4); color: var(--dash-red); }
.dash-btn-danger:hover { background: var(--dash-red); color: #fff; }
.dash-btn-sm { padding: 7px 12px; font-size: 12px; }

.dash-act {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--dash-line);
    background: var(--dash-surface-2);
    color: #c9c9d4;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
}
.dash-act:hover { border-color: var(--dash-gold); color: var(--dash-gold); }
.dash-act.is-danger:hover { border-color: var(--dash-red); color: var(--dash-red); }

/*========================= FORMS =========================*/
.dash-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: #b6b6c2;
}
.dash-input, .dash-select, .dash-textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--dash-bg);
    border: 1px solid var(--dash-line);
    border-radius:0px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dash-textarea { min-height: 130px; resize:none; line-height: 1.6; }
.dash-input::placeholder, .dash-textarea::placeholder { color: #5d5d69; }
.dash-input:focus, .dash-select:focus, .dash-textarea:focus {
    outline: none;
    border-color: var(--dash-gold);
    box-shadow: 0 0 0 3px var(--dash-gold-soft);
}
.dash-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M0.75 0.75L5.75 5.75L10.75 0.75' stroke='%238f8f9c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.dash-help { margin: 6px 0 0; font-size: 12px; color: var(--dash-muted); }
.dash-field { margin-bottom: 18px; }
.dash-counter { float: right; font-size: 11px; color: var(--dash-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.dash-counter.is-over { color: var(--dash-red); }

/* switch */
.dash-switch { position: relative; display: inline-block; width: 42px; height: 23px; }
.dash-switch input { opacity: 0; width: 0; height: 0; }
.dash-switch span {
    position: absolute; inset: 0;
    background: var(--dash-surface-2);
    border: 1px solid var(--dash-line);
    border-radius: 999px;
    cursor: pointer;
    transition: .25s;
}
.dash-switch span::before {
    content: ""; position: absolute;
    height: 15px; width: 15px; left: 3px; top: 3px;
    background: var(--dash-muted);
    border-radius: 50%;
    transition: .25s;
}
.dash-switch input:checked + span { background: var(--dash-gold-soft); border-color: var(--dash-gold); }
.dash-switch input:checked + span::before { transform: translateX(19px); background: var(--dash-gold); }

/* upload box */
.dash-upload {
    display: flex; align-items: center; gap: 16px;
    padding: 16px;
    background: var(--dash-bg);
    border: 1px dashed var(--dash-line);
    border-radius: var(--dash-radius);
}
.dash-upload-prev {
    width: 96px; height: 72px;
    flex: 0 0 96px;
    display: flex; align-items: center; justify-content: center;
    background: #000;
    border: 1px solid var(--dash-line);
    border-radius: 9px;
    overflow: hidden;
}
.dash-upload-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

/*========================= TABLE =========================*/
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.dash-table th {
    padding: 13px 16px;
    background: var(--dash-surface-2);
    border-bottom: 1px solid var(--dash-line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #9a9aa8;
    text-align: left;
    white-space: nowrap;
}
.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dash-line-soft);
    color: #d7d7e0;
    vertical-align: middle;
}
.dash-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-td-title { color: #fff; font-weight: 700; }
.dash-td-actions { text-align: right; white-space: nowrap; }
.dash-td-actions .dash-act + .dash-act { margin-left: 6px; }

/*========================= PILLS / BADGES =========================*/
.dash-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
}
.dash-pill-green { background: rgba(63, 174, 114, .14); color: var(--dash-green); }
.dash-pill-amber { background: rgba(217, 164, 65, .14); color: var(--dash-amber); }
.dash-pill-red   { background: rgba(224, 85, 99, .14);  color: var(--dash-red); }
.dash-pill-grey  { background: var(--dash-surface-2);   color: var(--dash-muted); }
.dash-pill-gold  { background: var(--dash-gold-soft);   color: var(--dash-gold); }

/*========================= TOOLBAR / SEARCH =========================*/
.dash-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dash-search { position: relative; }
.dash-search .bi {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--dash-muted); font-size: 15px;
}
.dash-search .dash-input { padding-left: 38px; width: 260px; }

/*=================== picker search ===================*/
.dash-pick-search { margin-bottom: 14px; }
.dash-pick-search .dash-input { width: 100%; padding-left: 38px; }
.dash-pick-none {
    margin: 16px 0 0;
    padding: 18px 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--dash-muted);
}

/*========================= CONTENT ROW LIST =========================*/
.dash-rowtools {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 16px;
}
.dash-rowtools .dash-search .dash-input { width: 100%; }
.dash-rowtools .dash-search { flex: 1 1 260px; }

.dash-rowlist { display: flex; flex-direction: column; gap: 10px; }
.dash-rowitem {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: var(--dash-bg);
    border: 1px solid var(--dash-line);
    transition: border-color .2s ease;
}
.dash-rowitem:hover { border-color: var(--dash-gold); }
.dash-rowitem[hidden] { display: none; }
.dash-rowitem-no {
    flex: 0 0 28px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: var(--dash-surface-2);
    border: 1px solid var(--dash-line);
    font-size: 12px; font-weight: 700;
    color: var(--dash-gold);
}
.dash-rowitem-body { flex: 1 1 auto; min-width: 0; }
.dash-rowitem-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dash-gold); }
.dash-rowitem-title { margin: 2px 0 4px; font-size: 14px; font-weight: 700; color: #fff; }
.dash-rowitem-sum {
    margin: 0; font-size: 12.5px; color: #c9c9d4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.dash-rowitem-actions { flex: 0 0 auto; display: flex; gap: 6px; }
.dash-rowitem-actions .dash-act { width: 30px; height: 30px; font-size: 12px; }

@media (max-width: 767.98px) {
    .dash-rowitem { flex-wrap: wrap; }
    .dash-rowitem-body { flex: 1 1 100%; order: 3; }
    .dash-rowitem-actions { margin-left: auto; }
}

/*========================= KEYWORD TAGS =========================*/
.dash-tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.dash-tag-list[hidden] { display: none; }
.dash-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 11px;
    background: var(--dash-gold-soft);
    border: 1px solid rgba(147, 128, 72, .45);
    color: var(--dash-gold);
    font-size: 12.5px;
    cursor: pointer;
    transition: all .2s ease;
}
.dash-tag:hover { background: rgba(224, 85, 99, .14); border-color: rgba(224, 85, 99, .45); color: var(--dash-red); }
.dash-tag .bi { font-size: 10px; }
.dash-tag-entry { width: 100%; }

/*========================= EMPTY / MODAL / TOAST =========================*/
.dash-empty { padding: 46px 20px; text-align: center; color: var(--dash-muted); }
.dash-empty .bi { font-size: 34px; display: block; margin-bottom: 12px; color: var(--dash-line); }

.dash-modal .modal-content {
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
    border-radius: var(--dash-radius);
    color: var(--dash-text);
}
.dash-modal .modal-header, .dash-modal .modal-footer { border-color: var(--dash-line-soft); }
.dash-modal .modal-title { font-size: 16px; font-weight: 700; }
.dash-modal .btn-close { filter: invert(1) grayscale(1); opacity: .6; }

.dash-toast {
    position: fixed;
    right: 22px;
    bottom: calc(var(--dash-footer-h) + 18px);
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-gold);
    border-radius: 10px;
    box-shadow: var(--dash-shadow);
    color: #fff;
    font-size: 13px;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    z-index: 1080;
}
.dash-toast.show { transform: translateY(0); opacity: 1; visibility: visible; }
.dash-toast .bi { color: var(--dash-gold); font-size: 16px; }

/*========================= BUSY OVERLAY (load / save) =========================*/
.dash-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: all;
    cursor: wait;
    animation: dash-busy-fade-in .18s ease;
}
.dash-busy-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 36px;
    border-radius: 12px;
    background: rgba(22, 22, 26, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.dash-busy-label {
    margin: 0;
    color: #f0f0f0;
    font-size: 14px;
    letter-spacing: 0.02em;
}
@keyframes dash-busy-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/*========================= OVERLAY / RESPONSIVE =========================*/
.dash-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .6);
    opacity: 0; visibility: hidden;
    transition: all .25s ease;
    z-index: 1030;
}
@media (max-width: 991.98px) {
    .dash-sidebar { transform: translateX(-100%); box-shadow: var(--dash-shadow); }
    .sidebar-open .dash-sidebar { transform: translateX(0); }
    .sidebar-open .dash-overlay { opacity: 1; visibility: visible; }
    .dash-main { margin-left: 0; }
    .dash-container { padding: 20px 16px 32px; }
    .dash-page-title { font-size: 21px; }
    .dash-logo em { display: none; }
    .dash-search .dash-input { width: 100%; }
    .dash-search { flex: 1 1 100%; }
}


/*=================== category picker (select + add new) ===================*/
.dash-cat-picker { display: flex; align-items: stretch; gap: 8px; }
.dash-cat-picker .dash-select { flex: 1 1 auto; min-width: 0; }
.dash-cat-picker .dash-btn { flex: 0 0 auto; }
.dash-cat-new { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.dash-cat-new .dash-input { flex: 1 1 auto; min-width: 0; }
.dash-cat-new .dash-btn { flex: 0 0 auto; }

/*=================== free-text date field + calendar button ===================*/
.dash-datefield { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.dash-datefield > .dash-input { flex: 1 1 auto !important; width: auto; min-width: 0; }
.dash-date-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    padding: 0;
    background: var(--dash-surface-2);
    border: 1px solid var(--dash-line);
    border-radius: 8px;
    color: var(--dash-gold);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}
.dash-date-btn:hover { background: var(--dash-gold-soft); border-color: var(--dash-gold); }
.dash-btn.is-disabled { opacity: .45; pointer-events: none; }
.dash-date-native {
    position: absolute; right: 0; bottom: 0;
    width: 1px; height: 1px;
    padding: 0; border: 0;
    opacity: 0; pointer-events: none;
}
/* render the browser's own calendar popup dark so it matches the admin */
.dash-body input[type="date"],
.dash-body input[type="datetime-local"],
.dash-body input[type="month"],
.dash-body input[type="time"],
.dash-date-native { color-scheme: dark; }

/* compact inside data tables and repeat rows */
.dash-table .dash-datefield,
.cf-row-fields .dash-datefield,
.hp-mini-fields .dash-datefield,
.ev-city-fields .dash-datefield { gap: 5px; }
.dash-table .dash-date-btn,
.cf-row-fields .dash-date-btn,
.hp-mini-fields .dash-date-btn,
.ev-city-fields .dash-date-btn { width: 26px; height: 26px; font-size: 12px; }

/* keep the wrapper sized like the input it replaced */
.ed-fact .dash-datefield { flex: 1 1 auto; }
.ev-month-rows .dash-datefield { flex: 0 0 152px; }
@media (max-width: 767.98px) { .ev-month-rows .dash-datefield { flex: 1 1 45%; } }

/*==========================================================================
  SQUARE CORNERS - the admin uses no rounded edges anywhere. One rule scoped
  to .dash-body squares every card, button, pill, avatar and input, and beats
  the public stylesheet that is linked into the admin header. The public site
  itself is untouched.
==========================================================================*/
.dash-body,
.dash-body *,
.dash-body *::before,
.dash-body *::after { border-radius: 0 !important; }

/* the one exception: the bell's unread count stays a round badge */
.dash-body .dash-bell-dot { border-radius: 999px !important; }

/*==========================================================================
  GUARD - the public stylesheet also sets `* { font-size: 1rem }`, which makes
  icons inherit their button's size. These rules put the admin's icon sizing
  back, scoped to .dash-body.
==========================================================================*/
/* icons inherit the size of whatever they sit in again */
.dash-body .bi { font-size: inherit; }
.dash-body .dash-nav-link > .bi:first-child { font-size: 17px; }
.dash-body .dash-icon-btn .bi { font-size: 20px; }

/*==========================================================================
  SHARED CALENDAR POPUP
  The Insight-article publication-date calendar, lifted out so every
  data-datepicker field in the admin opens the same picker. Pinned to the
  body with position:fixed so cards, tables and modals can't clip it.
==========================================================================*/
.dash-dp {
    position: fixed;
    top: 0; left: 0;
    z-index: 2000;
    width: 280px;
    background: #171719;
    border: 1px solid #36363c;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    display: none;
}
.dash-dp.show { display: block; }

/*---- header ----*/
.dash-dp-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 10px;
    border-bottom: 1px solid #303035;
}
.dash-dp-month {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 13px; font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
}
.dash-dp-month:hover { background: #28282d; }
.dash-dp-month .bi { font-size: 10px; margin-left: 3px; }

/*---- nav arrows ----*/
.dash-dp-nav {
    width: 30px; height: 30px;
    border: 0;
    background: transparent;
    color: #dcdce0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.dash-dp-nav:hover { background: #29292e; }
.dash-dp-nav:disabled,
.dash-dp-nav.disabled { opacity: .25; cursor: not-allowed; pointer-events: none; }

/*---- weekday strip ----*/
.dash-dp-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    padding: 9px 10px 4px;
}
.dash-dp-weekdays span { text-align: center; color: #ffffff; font-size: 11px; }

/*---- day grid ----*/
.dash-dp-days {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 5px 10px 12px;
}
.dash-dp-day {
    width: 32px; height: 32px;
    margin: auto; padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.dash-dp-day:hover { background: #303035; }
.dash-dp-day.other-month { color: #55555b; }
.dash-dp-day.today { background: transparent; color: #ffffff; border: 1px solid #55555c; }
.dash-dp-day.active,
.dash-dp-day.active:hover { background: var(--dash-gold); color: #ffffff; border-color: var(--dash-gold); }
.dash-dp-day.disabled {
    color: #55555b; background: transparent; opacity: 1;
    cursor: not-allowed; pointer-events: none;
}

/*---- year / month view ----*/
.dash-dp-select { display: none; }
.dash-dp-select-head {
    height: 49px;
    display: flex; align-items: center;
    border-bottom: 1px solid #303035;
    padding: 0 10px;
}
.dash-dp-select-head span {
    flex: 1;
    text-align: center;
    color: #ffffff;
    font-size: 13px; font-weight: 600;
}
.dash-dp-select-body {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 14px;
    max-height: 232px;
    overflow-y: auto;
}
.dash-dp-item {
    min-height: 36px;
    border: 1px solid transparent;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
}
.dash-dp-item:hover { background: #303035; }
.dash-dp-item.current { border-color: #55555c; }
.dash-dp-item.active { background: #ffffff; color: #000000; border-color: #ffffff; }
.dash-dp-item.disabled { color: #55555b; opacity: .45; cursor: not-allowed; pointer-events: none; }

/*---- footer ----*/
.dash-dp-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    border-top: 1px solid #303035;
}
.dash-dp-foot button {
    border: 0;
    background: transparent;
    color: var(--dash-gold);
    font-size: 12px;
    cursor: pointer;
}
.dash-dp-foot button:hover { color: #ffffff; }

/* a read-only date field is a button in disguise */
.dash-datefield > .dash-input[readonly] { cursor: pointer; }

/*==========================================================================
  SPOTLIGHT-STYLE EDITABLE CARDS
  The Home page event cards and the Events page upcoming / past cards read
  like the CMO Spotlight "Latest episodes" card: a gold kicker, a bold
  title, a muted sub-line. The fields are still live inputs - they simply
  drop their boxes until you hover or focus them.
==========================================================================*/
.hp-event-body,
.ev-event-body {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column;
    gap: 0;
    padding: 13px 9px 12px;
}

/* text first, control second */
.hp-event-body .dash-input,
.ev-event-body .dash-input,
.ev-event-body .dash-select {
    width: 100%;
    height: auto;
    padding: 3px 5px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    color: #fff;
    line-height: 1.35;
    transition: border-color .2s ease, background-color .2s ease;
}
.hp-event-body .dash-input:hover,
.ev-event-body .dash-input:hover,
.ev-event-body .dash-select:hover { border-color: var(--dash-line); }
.hp-event-body .dash-input:focus,
.ev-event-body .dash-input:focus,
.ev-event-body .dash-select:focus {
    border-color: var(--dash-gold);
    background-color: var(--dash-surface-2);
    outline: none;
    box-shadow: none;
}

/* the date line sits on top and reads as the kicker */
.hp-event-body > .dash-datefield,
.ev-event-body > .dash-datefield { order: -1; gap: 4px; margin-bottom: 3px; }

.hp-event-body .hp-go-meta,
.ev-event-body .ev-up-meta,
.ev-event-body .ev-past-date {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dash-gold);
}

/* the calendar button stays out of the way until the card is in use */
.hp-event-body .dash-date-btn,
.ev-event-body .dash-date-btn {
    width: 22px; height: 22px;
    font-size: 11px;
    background: transparent;
    border-color: transparent;
    color: var(--dash-muted);
    opacity: .3;
    transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}
.hp-event:hover .dash-date-btn,
.ev-event:hover .dash-date-btn,
.hp-event-body:focus-within .dash-date-btn,
.ev-event-body:focus-within .dash-date-btn { opacity: 1; }
.hp-event-body .dash-date-btn:hover,
.ev-event-body .dash-date-btn:hover { color: var(--dash-gold); border-color: var(--dash-line); background: transparent; }

/* title */
.hp-event-body .hp-go-title,
.ev-event-body .ev-up-title,
.ev-event-body .ev-past-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

/* sub-line */
.ev-event-body .ev-past-venue,
.ev-event-body .ev-up-venue {
    font-size: 12.5px;
    color: var(--dash-muted);
}

/* the file name and month sit quietly at the foot of the body */
.hp-event-body .hp-go-img,
.ev-event-body .ev-past-img { margin-top: 10px; }
.ev-event-row { display: flex; gap: 6px; margin-top: 10px; }
.ev-event-row .ev-up-month { flex: 0 0 108px; }
.ev-event-row .ev-up-img { flex: 1 1 auto; min-width: 0; }

.hp-event-body .hp-path,
.ev-event-body .ev-path {
    font-family: monospace;
    font-size: 11px;
    color: #6d6d78;
}
/* the month keeps its chevron so it still reads as a dropdown */
.ev-event-body .ev-up-month {
    font-size: 11.5px;
    color: var(--dash-muted);
    padding-right: 20px;
    background-position: right 2px center;
    background-size: 9px 6px;
}
