/*
 * Agora theme: soft, friendly facelift on top of the original styles
 * (main.css, grid.css, jQuery UI smoothness, fullcalendar.css). Loaded last.
 * Palette from the "A Vértes Agorája" logo: purple, orange, yellow, bordeaux.
 */

/* ---------- Font (self-hosted, OFL-1.1) ---------- */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(fonts/plus-jakarta-sans/plus-jakarta-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(fonts/plus-jakarta-sans/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    --ag-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --ag-bg: #f6f4f8;
    --ag-surface: #ffffff;
    --ag-surface-soft: #faf8fb;
    --ag-border: #e9e4ee;
    --ag-border-strong: #d8d0e0;
    --ag-text: #241b2b;
    --ag-text-muted: #6f6578;

    /* logo purple */
    --ag-primary: #6a1b6e;
    --ag-primary-hover: #551458;
    --ag-primary-soft: #f3e8f4;
    --ag-primary-ring: rgba(106, 27, 110, .2);

    /* logo orange / yellow / bordeaux as soft tints */
    --ag-orange: #b45f0c;
    --ag-orange-soft: #fdf0e1;
    --ag-yellow-soft: #fdf6d8;
    --ag-red: #a3142a;
    --ag-red-soft: #fbe9ec;
    --ag-green: #237a55;
    --ag-green-soft: #e5f5ed;

    --ag-radius-sm: 8px;
    --ag-radius: 12px;
    --ag-radius-lg: 18px;
    --ag-pill: 999px;
    --ag-shadow: 0 1px 2px rgba(36, 27, 43, .04), 0 6px 20px rgba(36, 27, 43, .07);
    --ag-shadow-lg: 0 20px 50px rgba(36, 27, 43, .2);
}

/* ---------- Base ---------- */
body, html {
    background: var(--ag-bg);
}
body, td, th, p, div, span, a, li, label, input, select, textarea, button,
.ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
    font-family: var(--ag-font) !important;
}
body {
    color: var(--ag-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--ag-primary);
}
a:hover, a:focus {
    color: var(--ag-primary-hover);
}
h1, h2, h3, h4 {
    color: var(--ag-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}
::selection {
    background: var(--ag-primary-soft);
}

/* main.css sizes these with width: 100%, the new padding/border must fit inside */
#layers, #calendar, #top-panel {
    box-sizing: border-box;
}

/* ---------- Page container ---------- */
#main {
    background: transparent !important;
    width: auto !important;
    max-width: 1440px;
    margin: 0 auto !important;
    padding: 0 16px 24px;
    box-sizing: border-box;
}

/* ---------- Header: logo, actions, month, settings, user ---------- */
#ag-header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    margin: 0 -16px 14px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ag-border);
    box-shadow: 0 2px 12px rgba(36, 27, 43, .05);
}
.ag-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
}
.ag-brand img {
    height: 48px;
    width: auto;
    display: block;
}
.ag-actions,
.ag-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ag-right {
    margin-left: auto;
}
.ag-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px !important;
    border: 1px solid transparent !important;
    border-radius: var(--ag-pill) !important;
    background: transparent !important;
    color: var(--ag-text) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease;
}
.ag-btn:hover,
.ag-dropdown.open > .ag-btn {
    background: var(--ag-primary-soft) !important;
    color: var(--ag-primary-hover) !important;
    border-color: transparent !important;
}
.ag-btn-primary {
    background: var(--ag-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(106, 27, 110, .25) !important;
}
.ag-btn-primary:hover {
    background: var(--ag-primary-hover) !important;
    color: #fff !important;
}
.ag-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ag-btn svg.ag-caret {
    width: 14px;
    height: 14px;
    opacity: .6;
    margin-left: -2px;
}
/* the native arrow sat against the pill's rounded right edge; this caret matches the header buttons' one */
#jump_month {
    height: 38px;
    border-radius: var(--ag-pill) !important;
    padding: 0 36px 0 14px !important;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: var(--ag-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b2b' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px 14px !important;
}
.ag-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: -8px;
    border-radius: 50%;
    background: var(--ag-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
/* the dropdowns fill the header height, so their menu starts at the header's bottom edge */
#ag-header {
    align-items: stretch;
}
.ag-brand, .ag-actions {
    align-self: center;
}
.ag-right {
    align-self: stretch;
    align-items: stretch;
}
.ag-right > select {
    align-self: center;
}
.ag-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}
.ag-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 9px); /* + the header's bottom padding and border */
    right: 0;
    z-index: 950;
    min-width: 250px;
    padding: 6px;
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-top: 0;
    border-radius: 0 0 var(--ag-radius) var(--ag-radius);
    box-shadow: var(--ag-shadow-lg);
}
.ag-dropdown.open .ag-dropdown-menu {
    display: block;
}
.ag-dropdown-menu p {
    margin: 0;
}
.ag-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--ag-radius-sm);
    color: var(--ag-text) !important;
    font-weight: 500;
    text-decoration: none;
}
.ag-dropdown-menu a:hover {
    background: var(--ag-primary-soft);
    color: var(--ag-primary-hover) !important;
}
.ag-dropdown-menu svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ag-dropdown-header {
    padding: 8px 12px 6px;
    color: var(--ag-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
@media (max-width: 1100px) {
    /* the actions keep only their icons first */
    .ag-actions .ag-btn:not(.ag-btn-primary) .ag-label {
        display: none;
    }
}
@media (max-width: 760px) {
    #main {
        padding: 0 6px 16px;
    }
    #ag-header {
        margin: 0 -6px 10px;
        padding: 6px;
        gap: 4px;
        min-height: 56px;
    }
    .ag-brand img {
        height: 38px;
    }
    .ag-label {
        display: none;
    }
    .ag-btn {
        height: 36px;
        padding: 0 10px !important;
    }
    #jump_month {
        height: 36px;
        padding: 0 26px 0 10px !important;
        background-position: right 9px center !important;
        max-width: 92px;
    }
    .ag-avatar {
        margin-left: 0;
    }
    .ag-dropdown-menu {
        position: fixed;
        top: 56px;
        left: 6px;
        right: 6px;
        min-width: 0;
    }
    #ag-header {
        height: 56px;
        box-sizing: border-box;
    }

    /* calendar toolbar: title on top, the button groups wrap below */
    table.fc-header,
    table.fc-header > tbody,
    table.fc-header > tbody > tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100% !important;
    }
    table.fc-header > tbody > tr > td {
        display: block;
        width: auto !important; /* FullCalendar sets a fixed width on these cells */
    }
    table.fc-header > tbody > tr > td.fc-header-center {
        order: -1;
        width: 100%;
        text-align: center;
    }
    .fc-header-title h2 {
        font-size: 18px !important;
        margin: 0 !important;
    }
    .fc-header .fc-state-default span {
        padding: 5px 9px !important;
        font-size: 12px;
    }
    /* month grid: columns may not grow with long day names or event texts */
    .fc-content table {
        table-layout: fixed;
        width: 100% !important;
    }
    .fc-content th, .fc-content td {
        overflow: hidden;
    }
    .fc-grid th, .fc th {
        font-size: 10px !important;
        letter-spacing: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .fc-event {
        font-size: 11px;
    }
    #calendar {
        padding: 8px 6px;
        border-radius: var(--ag-radius);
    }
    #layers {
        padding: 8px 10px !important;
        border-radius: var(--ag-radius);
    }
}
@media (max-width: 480px) {
    /* the calendar's own prev / next buttons replace the month jump on phones */
    #jump_month {
        display: none;
    }
    .ag-brand {
        margin-right: 2px;
    }
    .ag-actions, .ag-right {
        gap: 2px;
    }
}

/* ---------- Top bar (user, month) ---------- */
#top-panel {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius-lg);
    box-shadow: var(--ag-shadow);
    padding: 8px 16px;
    margin-bottom: 12px;
}
#top-panel p {
    margin: 6px 0;
    color: var(--ag-text-muted);
    font-weight: 500;
}
#top-panel img {
    opacity: .7;
}
#top-panel img:hover {
    opacity: 1;
}

/* ---------- Left side tabs (menü, keresés, új rendezvény...) ---------- */
a.trigger {
    background: var(--ag-surface) !important;
    color: var(--ag-text) !important;
    border: 1px solid var(--ag-border);
    border-left: 0;
    border-radius: 0 var(--ag-pill) var(--ag-pill) 0 !important;
    box-shadow: var(--ag-shadow);
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 7px 16px 7px 14px !important;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
a.trigger:hover {
    background: var(--ag-primary-soft) !important;
    color: var(--ag-primary-hover) !important;
}
a.active.trigger {
    background: var(--ag-primary) !important;
    color: #fff !important;
}
/* the green plus icon of the tabs */
a.trigger.left {
    background-image: none !important;
}
#new_visit {
    background: var(--ag-primary) !important;
    color: #fff !important;
    border-color: var(--ag-primary);
}
#new_visit:hover {
    background: var(--ag-primary-hover) !important;
}
.panel {
    background: var(--ag-surface) !important;
    border: 1px solid var(--ag-border) !important;
    border-radius: 0 var(--ag-radius-lg) var(--ag-radius-lg) 0 !important;
    box-shadow: var(--ag-shadow-lg);
    color: var(--ag-text) !important;
}
#panel1 p {
    margin: 2px 0;
}
#panel1 a {
    display: block;
    padding: 7px 12px;
    border-radius: var(--ag-radius-sm);
    color: var(--ag-text) !important;
    font-weight: 500;
    text-decoration: none;
}
#panel1 a:hover {
    background: var(--ag-primary-soft);
    color: var(--ag-primary-hover) !important;
}

/* ---------- Venue legend (layers) ---------- */
#layers {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius-lg);
    box-shadow: var(--ag-shadow);
    padding: 10px 14px !important;
}
#layers div p,
#legend-holder p {
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Calendar (FullCalendar 1.x) ---------- */
#calendar {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius-lg);
    box-shadow: var(--ag-shadow);
    padding: 14px;
}
.fc-header-title h2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: var(--ag-text);
}
.fc-header .fc-state-default,
.fc-header .fc-state-default a {
    border-color: var(--ag-border-strong) !important;
    background: var(--ag-surface) !important;
    color: var(--ag-text) !important;
}
.fc-header .fc-state-default span {
    background: transparent !important;
    border: 0 !important;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px !important;
    color: var(--ag-text) !important;
}
.fc-header .fc-state-hover span,
.fc-header .fc-state-hover a {
    background: var(--ag-primary-soft) !important;
    color: var(--ag-primary-hover) !important;
}
.fc-header .fc-state-active,
.fc-header .fc-state-active a,
.fc-header .fc-state-active span,
.fc-header .fc-state-down,
.fc-header .fc-state-down a,
.fc-header .fc-state-down span {
    background: var(--ag-primary) !important;
    border-color: var(--ag-primary) !important;
    color: #fff !important;
}
.fc-header .fc-state-disabled span {
    color: #b8b0c0 !important;
}
.fc-header .fc-corner-left,
.fc-header .fc-corner-left a,
.fc-header .fc-corner-left span {
    border-top-left-radius: var(--ag-pill) !important;
    border-bottom-left-radius: var(--ag-pill) !important;
}
.fc-header .fc-corner-right,
.fc-header .fc-corner-right a,
.fc-header .fc-corner-right span {
    border-top-right-radius: var(--ag-pill) !important;
    border-bottom-right-radius: var(--ag-pill) !important;
}
.fc-grid th,
.fc-agenda th,
.fc th {
    background: var(--ag-surface-soft) !important;
    color: var(--ag-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 6px 0;
}
.fc td, .fc th,
.fc-grid td, .fc-agenda td, .fc-agenda th {
    border-color: var(--ag-border) !important;
}
.fc-grid .fc-day-number {
    color: var(--ag-text-muted);
    font-weight: 600;
    font-size: 12px;
}
.fc-today,
.fc-grid td.fc-today,
.fc-agenda .fc-today {
    background: var(--ag-yellow-soft) !important;
}
.fc-event,
.fc-event a,
.fc-event-skin {
    border-radius: var(--ag-radius-sm) !important;
}
.fc-event {
    box-shadow: 0 1px 2px rgba(36, 27, 43, .12);
    font-size: 12px;
}

/* ---------- Section headers & cards inside the panels ---------- */
.csb_header {
    background: var(--ag-surface-soft) !important;
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius) !important;
    color: var(--ag-text) !important;
    font-weight: 700;
    padding: 10px 14px !important;
    margin-top: 10px;
}
.csb_header h2 {
    color: var(--ag-text) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}
/* collapsible headers: the background above hid main.css's open/close arrow images, so nothing showed they
   can be clicked. The panels' toggle scripts switch these state classes; open shows "collapse" (up). */
.csb_header.open, .csb_header.close, .csb_header.thinopen, .csb_header.thinclose {
    position: relative;
    padding-right: 42px !important;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.csb_header.open:hover, .csb_header.close:hover, .csb_header.thinopen:hover, .csb_header.thinclose:hover {
    background: var(--ag-primary-soft) !important;
    border-color: var(--ag-border-strong) !important;
}
.csb_header.open::after, .csb_header.close::after, .csb_header.thinopen::after, .csb_header.thinclose::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--ag-text-muted);
    border-bottom: 2px solid var(--ag-text-muted);
    transform: translateY(-70%) rotate(45deg);
}
.csb_header.open::after, .csb_header.thinopen::after {
    transform: translateY(-30%) rotate(-135deg);
}
#program_main, #usermod_main, #userright_main, #place_main, #newplace_main, #newprogram_main,
#subprogram_main, #repeat_main, #visit_main, #app_main {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border) !important;
    border-top: 0 !important;
    border-radius: 0 0 var(--ag-radius) var(--ag-radius);
    padding: 12px 14px;
}

/* ---------- Forms ---------- */
input[type=text], input[type=password], input[type=email], input:not([type]), select, textarea {
    border: 1px solid var(--ag-border-strong) !important;
    border-radius: var(--ag-radius-sm) !important;
    background: var(--ag-surface) !important;
    color: var(--ag-text);
    font-size: 14px !important;
    padding: 6px 10px !important;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* the padding must not make the old fixed-width form fields wider */
input[type=text], input[type=password], input[type=email], input:not([type]), select, textarea {
    box-sizing: border-box;
    max-width: 100%;
}
/* ...but the 30-50px wide number fields (e.g. "Tervezett létszám") still need room for a few digits */
input[type=text], input:not([type]) {
    min-width: 64px;
}
input[type=text], input[type=password], input[type=email], input:not([type]), select:not([multiple]) {
    height: 34px;
    vertical-align: middle;
}
/* date fields (jQuery UI datepicker) need room for "2026-10-22" */
input.hasDatepicker, #v_start, #v_pstart, #repeat_from, #repeat_to {
    min-width: 116px;
}
/* event form and program tab: the free-text fields had old inline widths (95-200px) or the browser
   default, too short for typical content such as names and e-mail addresses */
#rendezv_name, #v_groupname, #rendjell, #v_jd_berlo, #v_jd_agora, #v_jd_nem, #v_eloleg,
#v_city, #v_contact, #adoszam, #v_email, #v_tel, #v_szamlaszam, #v_tech_ugyeletes, #t_comment {
    width: 280px !important;
}
/* Előkészítés / Utómunka (main.css: 300 x 70 px): fill their half-width column, typical text is ~100 characters */
textarea.eloutomunka {
    width: 100%;
    height: 90px;
}
select {
    padding: 5px 8px !important;
}
textarea {
    padding: 8px 10px !important;
}
input[type=text]:focus, input[type=password]:focus, input:not([type]):focus, select:focus, textarea:focus {
    border-color: var(--ag-primary) !important;
    box-shadow: 0 0 0 3px var(--ag-primary-ring) !important;
    outline: 0;
}
input[type=checkbox], input[type=radio] {
    accent-color: var(--ag-primary);
}
label {
    font-weight: 500;
}

/* ---------- Buttons ---------- */
input[type="button"], input[type="submit"], button,
.addbutton, a.addbutton, .savebutton, .normalbutton, .backbutton, .deletebutton {
    background: var(--ag-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ag-border-strong) !important;
    border-radius: var(--ag-pill) !important;
    color: var(--ag-text) !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 7px 16px !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
input[type="button"]:hover, input[type="submit"]:hover, button:hover,
.addbutton:hover, a.addbutton:hover, .normalbutton:hover, .backbutton:hover {
    background: var(--ag-surface-soft) !important;
    border-color: var(--ag-primary) !important;
    color: var(--ag-primary-hover) !important;
}
/* primary actions; the input.* selectors are needed to outweigh input[type="button"] above */
input[type="submit"], .savebutton, input.savebutton, a.addbutton, .addbutton, input.addbutton {
    background: var(--ag-primary) !important;
    border-color: var(--ag-primary) !important;
    color: #fff !important;
}
input[type="submit"]:hover, .savebutton:hover, input.savebutton:hover, a.addbutton:hover, .addbutton:hover, input.addbutton:hover {
    background: var(--ag-primary-hover) !important;
    border-color: var(--ag-primary-hover) !important;
    color: #fff !important;
}
.deletebutton, input.deletebutton {
    background: var(--ag-red-soft) !important;
    border-color: transparent !important;
    color: var(--ag-red) !important;
}
.deletebutton:hover, input.deletebutton:hover {
    background: var(--ag-red) !important;
    color: #fff !important;
}
/* e.g. the program tab's Hozzáad/Módosít until the place is checked as free */
input[type="button"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}
/* the new event's save button stays in view while the long form scrolls */
.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0;
    padding: 10px 0;
    background: var(--ag-surface);
    border-top: 1px solid var(--ag-border);
}

/* ---------- Messages ---------- */
.msg {
    border: 0 !important;
    border-radius: var(--ag-radius) !important;
    padding: 10px 14px 10px 14px !important;
    font-weight: 500;
    background-image: none !important;
}
.msg.success, .success {
    background-color: var(--ag-green-soft) !important;
    color: var(--ag-green) !important;
}
.msg.error, .error {
    background-color: var(--ag-red-soft) !important;
    color: var(--ag-red) !important;
}
.msg.warning, .warning {
    background-color: var(--ag-orange-soft) !important;
    color: var(--ag-orange) !important;
}

/* ---------- jQuery UI (tabs, dialogs, datepicker) ---------- */
.ui-widget-content {
    border-color: var(--ag-border) !important;
    color: var(--ag-text) !important;
}
.ui-widget-header {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ag-border) !important;
    color: var(--ag-text) !important;
}
.ui-tabs {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}
.ui-tabs .ui-tabs-nav {
    padding: 0 4px !important;
    border-radius: 0 !important;
}
.ui-tabs .ui-tabs-nav li {
    background: transparent !important;
    border: 0 !important;
    margin: 0 2px -1px 0 !important;
}
.ui-tabs .ui-tabs-nav li a {
    color: var(--ag-text-muted) !important;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 14px !important;
    border-bottom: 2px solid transparent;
}
.ui-tabs .ui-tabs-nav li a:hover {
    color: var(--ag-primary) !important;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,
.ui-tabs .ui-tabs-nav li.ui-state-active a {
    color: var(--ag-primary) !important;
    border-bottom-color: var(--ag-primary);
}
.ui-tabs .ui-tabs-panel {
    background: var(--ag-surface) !important;
    border: 0 !important;
    padding: 16px 8px !important;
}
.ui-corner-all, .ui-corner-top, .ui-corner-bottom {
    border-radius: var(--ag-radius-sm) !important;
}
.ui-datepicker {
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius) !important;
    box-shadow: var(--ag-shadow-lg);
    padding: 8px !important;
}
.ui-datepicker .ui-state-default {
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--ag-radius-sm) !important;
    text-align: center !important;
}
.ui-datepicker .ui-state-hover {
    background: var(--ag-primary-soft) !important;
}
.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-highlight {
    background: var(--ag-primary) !important;
    color: #fff !important;
}

/* ---------- Data grid (partners, users...) ---------- */
.dGrid {
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius) !important;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
    background: var(--ag-surface);
}
.dGrid caption {
    background: transparent !important;
    color: var(--ag-text) !important;
    font-weight: 700;
    font-size: 15px;
    padding: 8px 4px !important;
    text-align: left;
}
.dGrid caption a,
.dGrid caption div,
.dGrid caption span {
    color: var(--ag-primary) !important;
    font-weight: 600;
}
.dGrid thead td, .dGrid thead th {
    background: var(--ag-surface-soft) !important;
    background-image: none !important;
    color: var(--ag-text-muted) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-color: var(--ag-border) !important;
    padding: 9px 10px !important;
}
/* the column headers sort on click (js/datagrid.js): show that they are clickable */
.dGrid thead td[class^="column_"] {
    cursor: pointer;
    user-select: none;
}
.dGrid thead td[class^="column_"]:hover {
    color: var(--ag-primary) !important;
    background: var(--ag-primary-soft) !important;
}
/* "sortable" hint; the sorted column shows its direction icon (.order_asc / .order_desc) instead */
.dGrid thead td[class^="column_"]::after {
    content: " \2195";
    opacity: .45;
}
.dGrid thead td[class^="column_"]:has(> .order_asc)::after,
.dGrid thead td[class^="column_"]:has(> .order_desc)::after,
.dGrid thead td[class^="column_"]:empty::after {
    content: "";
}
/* the untitled icon column: sorting by it means nothing */
.dGrid thead td[class^="column_"]:empty {
    cursor: default;
}
.dGrid td, .dGrid tbody td {
    border-color: var(--ag-border) !important;
    padding: 9px 10px !important;
}
.dGrid tbody tr:hover td {
    background: #fbf7fc !important;
}
.dGrid tfoot td {
    background: var(--ag-surface-soft) !important;
    background-image: none !important;
    color: var(--ag-text-muted);
}
/* pager (js/datagrid.js switches .active / .inactive): the 14 x 17 px arrow images were hard to hit;
   buttons as tall as the page-size select next to them, with the theme's chevrons */
.dGrid tfoot div.lastleft, .dGrid tfoot div.left, .dGrid tfoot div.right, .dGrid tfoot div.lastright {
    box-sizing: border-box;
    width: 34px !important;
    height: 34px !important;
    top: 0 !important;
    margin: 0 2px;
    vertical-align: middle;
    border: 1px solid var(--ag-border-strong);
    border-radius: var(--ag-radius-sm);
    background-color: var(--ag-surface) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    transition: background-color .15s ease, border-color .15s ease;
}
.dGrid tfoot div.lastleft {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m11 17-5-5 5-5M18 17l-5-5 5-5'/%3E%3C/svg%3E") !important;
}
.dGrid tfoot div.left {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") !important;
}
.dGrid tfoot div.right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") !important;
}
.dGrid tfoot div.lastright {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m13 17 5-5-5-5M6 17l5-5-5-5'/%3E%3C/svg%3E") !important;
}
.dGrid tfoot div.active:hover {
    border-color: var(--ag-primary);
    background-color: var(--ag-primary-soft) !important;
}
.dGrid tfoot div.inactive {
    opacity: .35;
    cursor: default;
}
.dGrid tfoot .pageinfo {
    vertical-align: middle;
}
.row1, .even {
    background: var(--ag-surface-soft) !important;
}
.odd {
    background: var(--ag-surface) !important;
}

/* ---------- Dynatree (venue trees) ---------- */
ul.ui-dynatree-container {
    background: var(--ag-surface) !important;
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius);
    padding: 8px !important;
    font-size: 13px !important;
}
/* program tab, place editor and user settings: the long place / user tree scrolls on its own, so what is
   on the right (the start time, the messages and the Hozzáad button; the Módosítás and Inaktiválás
   buttons; the chosen user's places) stays in view */
.scroll-tree {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}
/* place editor: the parent picker scrolls on its own too, so the Mentés button below it stays close */
#parentsel {
    max-height: 300px;
    overflow-y: auto;
}
/* program tab tree: the places the user is responsible for (only those can be chosen) */
.scroll-tree span.place-own a {
    font-weight: 700;
}
.scroll-tree span.place-not-own a {
    color: var(--ag-text-muted) !important;
    opacity: .6;
    cursor: default;
}
/* inactivated places (place editor) and users (user admin list): kept, but greyed and labelled */
span.place-inactive a,
span.user-inactive a {
    color: var(--ag-text-muted) !important;
    font-style: italic;
}
span.place-inactive a::after,
span.user-inactive a::after {
    content: " (inaktív)";
}
.place-legend {
    color: var(--ag-text-muted);
    font-size: 12px;
    margin: 0 0 6px;
}
.ui-dynatree-active a,
span.ui-dynatree-active a {
    background: var(--ag-primary) !important;
    color: #fff !important;
    border-radius: 6px;
}
.ui-dynatree-focused a {
    background: var(--ag-primary-soft) !important;
    border-radius: 6px;
}

/* ---------- Login window ---------- */
div#login-window {
    position: static !important;
    width: auto !important;
    max-width: 380px;
    margin: 12vh auto 0 !important;
    background: var(--ag-surface) !important;
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius-lg) !important;
    box-shadow: var(--ag-shadow-lg) !important;
    overflow: hidden;
}
div.window-header {
    background: var(--ag-surface) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--ag-border) !important;
    color: var(--ag-text) !important;
    padding: 14px 18px !important;
}
div.window-header span {
    color: var(--ag-text) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}
div.window-main {
    padding: 18px !important;
}

/* ---------- Loading box ---------- */
div#loading_win {
    background: var(--ag-surface) !important;
    border: 1px solid var(--ag-border) !important;
    border-radius: var(--ag-radius) !important;
    box-shadow: var(--ag-shadow-lg) !important;
}
div#loading_win p {
    color: var(--ag-text) !important;
    font-weight: 600;
}

/* ---------- prettyPhoto (panel popups) ---------- */
div.pp_overlay {
    background: #241b2b !important;
}
.pp_pic_holder .pp_content,
.pp_pic_holder .pp_content_container,
div.pp_default .pp_content {
    background: var(--ag-surface) !important;
}
div.pp_default .pp_top, div.pp_default .pp_bottom {
    display: none;
}
.pp_pic_holder {
    border-radius: var(--ag-radius-lg);
    overflow: hidden;
    box-shadow: var(--ag-shadow-lg);
}
.pp_pic_holder iframe {
    border-radius: var(--ag-radius);
}
