/* J59 Time Off Manager — Stylesheet
   Brand: Junction59 | Font: Arial | Theme: Light
   ------------------------------------------------ */

:root {
    --j59-lime:       #C6EC38;
    --j59-lime-b:     #49EEA6;
    --j59-cyan:       #01C5FF;
    --j59-cyan-b:     #007EFF;
    --j59-magenta:    #E70D70;
    --j59-purple:     #CC51FF;
    --j59-black:      #000000;
    --j59-white:      #FFFFFF;

    --j59-nav-bg:          #111111;
    --j59-nav-link-color:  #777777;
    --j59-surface:    #f7f7f5;
    --j59-card:       #ffffff;
    --j59-border:     #e5e5e0;
    --j59-text:       #111111;
    --j59-muted:      #666666;
    --j59-faint:      #f0f0ec;

    --j59-green-bg:   #eaf7ee;
    --j59-green-text: #1a6633;
    --j59-green-bdr:  #b0ddc0;
    --j59-red-bg:     #fff0f0;
    --j59-red-text:   #cc2200;
    --j59-red-bdr:    #f0c0c0;
    --j59-orange-bg:  #fff6e8;
    --j59-orange-text:#995500;
    --j59-orange-bdr: #f0d0a0;
    --j59-lime-bg:    #f4fce8;
    --j59-lime-text:  #3a6e00;
    --j59-lime-bdr:   #c5e8a0;
    --j59-cyan-bg:    #e8f8ff;
    --j59-cyan-text:  #005577;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; font-size: 15px; color: var(--j59-text); background: var(--j59-surface); }
a { color: var(--j59-cyan-b); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Gradient accent bar ---- */
.j59-grad-bar {
    height: 3px;
    background: linear-gradient(to right, var(--j59-lime), var(--j59-lime-b));
}

/* ---- Navigation ---- */
.j59-nav {
    background: var(--j59-nav-bg);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.j59-wordmark {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    text-decoration: none;
}
.j59-wordmark span { color: var(--j59-lime); }
.j59-nav-logo {
    height: 32px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* Nav page links — centred, fill available space */
.j59-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

/* Off state */
.j59-nav-link {
    color: var(--j59-nav-link-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
/* Hover state */
.j59-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
    text-decoration: none;
}
/* Active / on state */
.j59-nav-link.active {
    color: var(--j59-lime);
    background: rgba(198,236,56,.1);
}
.j59-nav-link.active:hover {
    background: rgba(198,236,56,.15);
}

/* Right side: CTA + user info */
.j59-nav-user-area {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
/* Keep old .j59-nav-actions alias working if referenced anywhere */
.j59-nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.j59-nav-user { color: #aaa; font-size: 13px; white-space: nowrap; }
.j59-nav-role {
    font-size: 11px;
    background: #222;
    color: #888;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.j59-nav-signout {
    color: #555;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.j59-nav-signout:hover { color: #aaa; text-decoration: none; }
.j59-nav-admin-link {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #333;
    padding: 3px 10px;
    border-radius: 5px;
    transition: color .15s, border-color .15s;
}
.j59-nav-admin-link:hover { color: #aaa; border-color: #555; text-decoration: none; }
/* Mobile admin link — subtle separator */
.j59-nav-link-admin {
    margin-top: 8px;
    border-top: 1px solid #222 !important;
    color: #555 !important;
    font-size: 13px !important;
}
.j59-nav-link-admin:hover { color: #aaa !important; background: none !important; }
.j59-btn-cta {
    background: var(--j59-lime);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: Arial, sans-serif;
    text-decoration: none;
    display: inline-block;
}
.j59-btn-cta:hover { background: var(--j59-lime-b); color: #000; text-decoration: none; }

/* ---- Page layout ---- */
.j59-page { background: var(--j59-surface); min-height: 100vh; padding-bottom: 60px; }
.j59-container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.j59-section-label {
    font-size: 11px;
    color: var(--j59-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
}

/* ---- Year pills ---- */
.j59-year-pills { display: flex; gap: 8px; margin-bottom: 24px; }
.j59-year-pill {
    background: var(--j59-card);
    border: 1px solid var(--j59-border);
    color: var(--j59-muted);
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.j59-year-pill.active, .j59-year-pill:hover {
    background: var(--j59-nav-bg);
    color: var(--j59-lime);
    border-color: var(--j59-nav-bg);
    font-weight: 700;
    text-decoration: none;
}

/* ---- Cards ---- */
.j59-card {
    background: var(--j59-card);
    border: 1px solid var(--j59-border);
    border-radius: 8px;
    padding: 16px;
}
.j59-card-title { font-size: 12px; color: var(--j59-muted); font-weight: 500; margin-bottom: 12px; }

/* ---- Who's out panel ---- */
.j59-whos-out {
    background: var(--j59-card);
    border: 1px solid var(--j59-border);
    border-left: 3px solid var(--j59-lime);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.j59-whos-out-col-title { font-size: 11px; color: var(--j59-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.j59-out-item { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.j59-out-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--j59-lime); margin-top: 4px; flex-shrink: 0; }
.j59-out-name { font-size: 13px; color: var(--j59-text); }
.j59-out-type { font-size: 11px; color: var(--j59-muted); }
.j59-out-empty { font-size: 13px; color: #bbb; font-style: italic; }

/* ---- Balance grid ---- */
.j59-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.j59-balance-card {
    background: var(--j59-card);
    border: 1px solid var(--j59-border);
    border-radius: 8px;
    padding: 14px;
}
.j59-balance-card-title { font-size: 12px; color: var(--j59-muted); font-weight: 500; margin-bottom: 12px; }
.j59-balance-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.j59-stat-label { font-size: 10px; color: #aaa; margin-bottom: 2px; }
.j59-stat-value { font-size: 22px; font-weight: 700; color: var(--j59-text); line-height: 1.1; }
.j59-stat-value.warn { color: var(--j59-red-text); }
.j59-stat-value.ok   { color: var(--j59-lime-text); }
.j59-stat-sub { font-size: 10px; color: #bbb; }
.j59-balance-bar { height: 4px; background: var(--j59-faint); border-radius: 2px; margin-top: 12px; overflow: hidden; display: flex; }
.j59-bar-taken   { background: #ccc; }
.j59-bar-planned { background: var(--j59-cyan); }
.j59-bar-pending { background: #f5a623; }

/* ---- Secondary balance strip ---- */
.j59-secondary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
}
.j59-secondary-balances { margin-bottom: 28px; }
.j59-balance-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.j59-balance-scroll::-webkit-scrollbar { height: 4px; }
.j59-balance-scroll::-webkit-scrollbar-track { background: var(--j59-faint); border-radius: 2px; }
.j59-balance-scroll::-webkit-scrollbar-thumb { background: var(--j59-border); border-radius: 2px; }
.j59-balance-card--compact {
    flex: 0 0 160px;
    min-width: 160px;
}
.j59-balance-stats--compact { grid-template-columns: 1fr 1fr; }
.j59-stat-value--sm { font-size: 18px; }
.j59-btn-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--j59-cyan);
    text-decoration: none;
}
.j59-btn-link:hover { text-decoration: underline; }
.j59-toggle-caret { font-size: 10px; }

/* ---- Primary card: empty / balance-not-set state ---- */
.j59-balance-card--empty {
    border: 1px dashed var(--j59-border);
    background: var(--j59-faint);
    opacity: 0.8;
}
.j59-balance-empty-msg {
    font-size: 13px;
    color: var(--j59-muted);
    font-style: italic;
    text-align: center;
    padding: 16px 8px 12px;
    line-height: 1.5;
}
.j59-balance-empty-msg span {
    display: block;
    margin-top: 6px;
    font-style: normal;
    color: var(--j59-cyan-b);
}

/* ---- Two-column panels ---- */
.j59-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
@media (max-width: 640px) { .j59-two-col { grid-template-columns: 1fr; } }

/* ---- Request items ---- */
.j59-request-item { padding: 8px 0; border-bottom: 1px solid var(--j59-faint); }
.j59-request-item:last-child { border-bottom: none; }
.j59-req-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.j59-req-type { font-size: 13px; color: var(--j59-text); }
.j59-req-dates { font-size: 11px; color: #aaa; margin-top: 2px; }

/* ---- Badges ---- */
.j59-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.j59-badge-pending  { background: var(--j59-orange-bg); color: var(--j59-orange-text); }
.j59-badge-approved { background: var(--j59-lime-bg);   color: var(--j59-lime-text); }
.j59-badge-denied   { background: var(--j59-red-bg);    color: var(--j59-red-text); }
.j59-badge-cancelled{ background: var(--j59-faint);     color: var(--j59-muted); }

/* ---- Approve / Deny buttons ---- */
.j59-btn-approve {
    background: var(--j59-green-bg); color: var(--j59-green-text);
    border: 1px solid var(--j59-green-bdr);
    padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; font-family: Arial, sans-serif; font-weight: 500;
}
.j59-btn-deny {
    background: var(--j59-red-bg); color: var(--j59-red-text);
    border: 1px solid var(--j59-red-bdr);
    padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; font-family: Arial, sans-serif;
}
.j59-btn-approve:hover { background: var(--j59-green-text); color: #fff; }
.j59-btn-deny:hover    { background: var(--j59-red-text);   color: #fff; }
.j59-btn-cancel {
    background: none; color: var(--j59-muted); border: 1px solid var(--j59-border);
    padding: 3px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; font-family: Arial, sans-serif;
}
.j59-btn-edit {
    background: none; color: #01C5FF; border: 1px solid #01C5FF;
    padding: 3px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; font-family: Arial, sans-serif;
}
.j59-btn-edit:hover { background: #01C5FF; color: #000; }

/* ---- Pending approval panel (manager) ---- */
.j59-pending-panel {
    background: var(--j59-card);
    border: 1px solid var(--j59-border);
    border-left: 3px solid var(--j59-lime);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.j59-pending-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--j59-faint); }
.j59-pending-row:last-child { border-bottom: none; }
.j59-pending-who { font-size: 13px; color: var(--j59-text); font-weight: 500; }
.j59-pending-detail { font-size: 11px; color: var(--j59-muted); margin-top: 2px; }
.j59-pending-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: 16px; }

/* ---- Manager stat summary ---- */
.j59-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
@media (max-width: 600px) { .j59-stat-row { grid-template-columns: repeat(2, 1fr); } }
.j59-stat-card { background: var(--j59-card); border: 1px solid var(--j59-border); border-radius: 8px; padding: 14px; text-align: center; }
.j59-stat-card .j59-n { font-size: 30px; font-weight: 700; color: var(--j59-text); }
.j59-stat-card .j59-l { font-size: 11px; color: #aaa; margin-top: 2px; }
.j59-stat-card.accent .j59-n { color: var(--j59-lime-text); }

/* ---- Team table ---- */
.j59-team-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.j59-team-table th { color: var(--j59-muted); font-weight: 500; text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--j59-border); font-size: 12px; }
.j59-team-table td { color: #555; padding: 8px 10px; border-bottom: 1px solid var(--j59-faint); }
.j59-team-table td.name { color: var(--j59-text); font-weight: 500; }
.j59-team-table td.warn { color: var(--j59-red-text); font-weight: 700; }
.j59-team-table tr:hover td { background: var(--j59-faint); }

/* ---- Forms ---- */
.j59-form-group { margin-bottom: 16px; }
.j59-form-label { font-size: 12px; color: var(--j59-muted); display: block; margin-bottom: 5px; }
.j59-form-control {
    width: 100%; background: var(--j59-faint);
    border: 1px solid var(--j59-border); border-radius: 6px;
    padding: 9px 12px; font-size: 14px; font-family: Arial, sans-serif; color: var(--j59-text);
}
.j59-form-control:focus { outline: none; border-color: var(--j59-lime); }
.j59-form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.j59-form-control { resize: vertical; min-height: 80px; }

.j59-btn-submit {
    background: var(--j59-nav-bg); color: var(--j59-lime);
    border: none; padding: 11px 24px; border-radius: 6px;
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: Arial, sans-serif;
}
.j59-btn-submit:hover { background: #222; }

/* ---- Day count / balance alerts ---- */
.j59-day-count {
    background: var(--j59-lime-bg); border: 1px solid var(--j59-lime-bdr);
    border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
}
.j59-day-count strong { color: var(--j59-lime-text); }
.j59-alert-warn {
    background: var(--j59-orange-bg); border: 1px solid var(--j59-orange-bdr);
    border-radius: 6px; padding: 10px 14px; font-size: 12px; color: var(--j59-orange-text);
}
.j59-alert-ok {
    background: var(--j59-lime-bg); border: 1px solid var(--j59-lime-bdr);
    border-radius: 6px; padding: 10px 14px; font-size: 12px; color: var(--j59-lime-text);
}

/* ---- Calendar wrapper ---- */
#j59-calendar { background: var(--j59-card); border: 1px solid var(--j59-border); border-radius: 8px; padding: 16px; }
.fc .fc-toolbar-title { font-size: 16px !important; font-weight: 700 !important; }
.fc .fc-button { background: var(--j59-nav-bg) !important; border-color: var(--j59-nav-bg) !important; font-size: 12px !important; }
.fc .fc-button:hover { background: #333 !important; }
.fc .fc-today-button { background: var(--j59-lime) !important; border-color: var(--j59-lime) !important; color: #000 !important; }
.fc .fc-daygrid-day.fc-day-today { background: #f4fce8 !important; }
.fc-event { font-size: 11px !important; border-radius: 3px !important; }

/* ---- Calendar colour legend ---- */
.j59-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
    padding: 8px 4px 0;
    border-top: 1px solid var(--j59-border);
}
.j59-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--j59-muted);
    white-space: nowrap;
}
.j59-cal-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ---- Login page ---- */
.j59-login-page { min-height: 100vh; background: var(--j59-surface); display: flex; align-items: center; justify-content: center; padding: 24px; }
.j59-login-box { background: var(--j59-card); border: 1px solid var(--j59-border); border-radius: 10px; padding: 36px; width: 100%; max-width: 380px; }
.j59-login-logo { font-size: 28px; font-weight: 700; color: var(--j59-text); text-align: center; letter-spacing: -0.5px; }
.j59-login-logo span { color: var(--j59-lime); }
.j59-login-logo-well {
    background: var(--j59-nav-bg);
    border-radius: 8px;
    padding: 12px 28px;
    display: inline-block;
    margin: 0 auto 4px;
}
.j59-login-logo-img { max-height: 40px; width: auto; display: block; margin: 0 auto; }
.j59-login-accent { width: 40px; height: 3px; background: linear-gradient(to right, var(--j59-lime), var(--j59-lime-b)); border-radius: 2px; margin: 10px auto 20px; }
.j59-login-sub { font-size: 13px; color: var(--j59-muted); text-align: center; margin-bottom: 28px; }
.j59-login-links { display: flex; justify-content: space-between; margin-top: 16px; }
.j59-login-link { font-size: 12px; color: #bbb; cursor: pointer; }
.j59-login-link:hover { color: var(--j59-muted); }
.j59-login-error  { background: var(--j59-red-bg); border: 1px solid var(--j59-red-bdr); color: var(--j59-red-text); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; display: none; }
.j59-login-notice { background: #fffbe6; border: 1px solid #ffe58f; color: #7d5a00; border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---- Request form layout ---- */
.j59-request-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 700px) { .j59-request-layout { grid-template-columns: 1fr; } }

/* ---- History table ---- */
.j59-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.j59-history-table th { font-size: 11px; color: var(--j59-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 10px; border-bottom: 1px solid var(--j59-border); text-align: left; font-weight: 500; }
.j59-history-table td { padding: 8px 10px; border-bottom: 1px solid var(--j59-faint); color: #555; }
.j59-history-table td.name { color: var(--j59-text); }
.j59-history-table tr:hover td { background: var(--j59-faint); }

/* ---- Celebrations section ---- */
.j59-celebrations { padding: 8px 0; }
.j59-celebration-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--j59-faint);
}
.j59-celebration-row:last-child { border-bottom: none; }
.j59-celebration-icon { font-size: 20px; flex-shrink: 0; }
.j59-celebration-body { flex: 1; min-width: 0; }
.j59-celebration-name { font-size: 13px; font-weight: 600; color: var(--j59-text); }
.j59-celebration-detail { font-size: 12px; color: var(--j59-muted); margin-top: 2px; }
.j59-celebration-badge-area { flex-shrink: 0; }
.j59-celebration-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.j59-celebration-badge.today { background: var(--j59-lime); color: #000; }
.j59-celebration-badge.week  { background: var(--j59-cyan-bg); color: var(--j59-cyan-text); }

/* ---- Mobile hamburger ---- */
.j59-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    flex-shrink: 0;
}
.j59-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #aaa;
    border-radius: 2px;
    transition: background .15s;
}
.j59-hamburger:hover span { background: #fff; }

/* Mobile overlay */
.j59-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 200;
}
.j59-mobile-overlay.open { display: block; }

/* Mobile nav panel */
.j59-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100dvh;
    background: var(--j59-nav-bg);
    z-index: 201;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
}
.j59-mobile-nav.open {
    transform: translateX(0);
}
.j59-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #222;
}
.j59-mobile-close {
    background: none;
    border: none;
    color: #777;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.j59-mobile-close:hover { color: #fff; }
.j59-mobile-nav-user {
    padding: 16px 20px 10px;
    border-bottom: 1px solid #222;
}
.j59-mobile-nav-name { font-size: 14px; color: #ddd; font-weight: 600; }
.j59-mobile-nav-role { font-size: 11px; color: #666; margin-top: 2px; }
.j59-mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    flex: 1;
}
.j59-mobile-nav-links .j59-nav-link {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 0;
    color: #999;
    border-bottom: 1px solid #1a1a1a;
}
.j59-mobile-nav-links .j59-nav-link:hover,
.j59-mobile-nav-links .j59-nav-link.active {
    background: rgba(198,236,56,.08);
    color: var(--j59-lime);
}
.j59-mobile-nav-footer {
    padding: 16px 20px;
    border-top: 1px solid #222;
}
.j59-mobile-signout {
    color: #555;
    font-size: 13px;
    text-decoration: none;
}
.j59-mobile-signout:hover { color: #aaa; }

/* Show hamburger on mobile, hide desktop nav items */
@media (max-width: 700px) {
    .j59-nav { gap: 0; padding: 0 16px; }
    .j59-nav-links, .j59-nav-user-area { display: none; }
    .j59-hamburger { display: flex; }
    .j59-mobile-nav { display: flex; }
}

/* ---- Loading spinner ---- */
.j59-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--j59-border); border-top-color: var(--j59-lime); border-radius: 50%; animation: j59-spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes j59-spin { to { transform: rotate(360deg); } }

/* ---- Flash message ---- */
.j59-flash { padding: 10px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; display: none; }
.j59-flash.success { background: var(--j59-lime-bg); color: var(--j59-lime-text); border: 1px solid var(--j59-lime-bdr); }
.j59-flash.error   { background: var(--j59-red-bg);  color: var(--j59-red-text);  border: 1px solid var(--j59-red-bdr); }


/* -------------------------------------------------------------------------
 * The J59 Hub top bar.
 *
 * Same shape as every other app on the hub: black bar, white Junction59 logo
 * home to the hub, the app's name beside it, then this app's own nav. The
 * accent is handed down as --j59-app-a, which is Time Off's lime, the same
 * colour its card wears on the hub landing page.
 *
 * Active items become an underline rather than a filled pill, so the row does
 * not reflow as you move between screens.
 *
 * Only applies on the hub. Standalone, the original bar is untouched.
 * ------------------------------------------------------------------------- */

html { scrollbar-gutter: stable; }

.j59-nav.is-hub {
    padding-left: max( 24px, calc( 50% - 640px + 24px ) );
    padding-right: max( 24px, calc( 50% - 640px + 24px ) );
    border-bottom: 3px solid transparent;
    border-image: linear-gradient( 90deg, var(--j59-app-a, #C6EC38), var(--j59-app-b, #49EEA6) ) 1;
    gap: 20px;
}

.j59-nav.is-hub .j59-nav-link {
    border-radius: 0;
    padding: 8px 10px;
    border-bottom: 2px solid transparent;
    background: transparent;
    white-space: nowrap;
}

.j59-nav.is-hub .j59-nav-link:hover { background: transparent; opacity: 1; }

.j59-nav.is-hub .j59-nav-link.active {
    background: transparent;
    color: #FFFFFF;
    border-bottom-color: var(--j59-app-a, #C6EC38);
}

/* -----------------------------------------------------------------------
   MONTH NAVIGATION above the shared calendar (2.6.0)
   The grid itself is the hub's, linked from calendar.css. This is only the
   bar above it, which belongs to this page.
----------------------------------------------------------------------- */

.j59-cal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.j59-cal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--j59-text, #101114);
}

.j59-cal-step {
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--j59-border, #E3E5E9);
    color: var(--j59-text, #3A3D45);
    background: var(--j59-card, #FFFFFF);
    white-space: nowrap;
}

.j59-cal-step:hover { border-color: #01C5FF; color: #007EFF; }

@media (max-width: 520px) {
    .j59-cal-title { font-size: 15px; }
    .j59-cal-step { padding: 6px 8px; font-size: 12px; }
}
