/*
 * Modern look for staff logins: WP Admin (body.fdtc-modern), Staff home (.fdtc-home) and the
 * login screen (body.login). Colors follow the FDTC theme.
 */
body.fdtc-modern,
body.login {
	--fdtc-ink: #1B1D3A;
	--fdtc-ink-2: #2A2D52;
	--fdtc-red: #E81820;
	--fdtc-red-dark: #B8121A;
	--fdtc-blue: #283090;
	--fdtc-blue-dark: #1C2268;
	--fdtc-bg: #F5F6FB;
	--fdtc-panel: #EEF0F8;
	--fdtc-line: #D9DCEA;
	--fdtc-muted: #4A4E6B;
	--fdtc-card: #FFFFFF;
	--fdtc-radius: 14px;
	--fdtc-shadow: 0 1px 2px rgba(27, 29, 58, .06), 0 4px 16px rgba(27, 29, 58, .06);
	--fdtc-font: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- WP Admin shell ---------- */
body.fdtc-modern { background: var(--fdtc-bg); font-family: var(--fdtc-font); color: var(--fdtc-ink); }
body.fdtc-modern #wpwrap, body.fdtc-modern #wpcontent { background: var(--fdtc-bg); }
body.fdtc-modern #wpcontent { padding-left: 28px; }
body.fdtc-modern .wrap { margin-top: 18px; margin-right: 28px; }
body.fdtc-modern h1, body.fdtc-modern h2, body.fdtc-modern h3, body.fdtc-modern .wrap h1.wp-heading-inline { font-family: var(--fdtc-font); color: var(--fdtc-blue); letter-spacing: -.01em; }
body.fdtc-modern .wrap h1, body.fdtc-modern .wrap h1.wp-heading-inline { font-weight: 800; font-size: 26px; }
body.fdtc-modern .wrap h2 { font-weight: 700; }
body.fdtc-modern a { color: var(--fdtc-blue); }
body.fdtc-modern a:hover, body.fdtc-modern a:focus { color: var(--fdtc-red-dark); }

/* Toolbar */
body.fdtc-modern #wpadminbar { background: var(--fdtc-ink); }
body.fdtc-modern #wpadminbar .ab-item, body.fdtc-modern #wpadminbar a.ab-item, body.fdtc-modern #wpadminbar > #wp-toolbar span.ab-label { font-family: var(--fdtc-font); }
body.fdtc-modern #wpadminbar .ab-top-menu > li:hover > .ab-item,
body.fdtc-modern #wpadminbar .ab-top-menu > li.hover > .ab-item,
body.fdtc-modern #wpadminbar .ab-top-menu > li > .ab-item:focus { background: var(--fdtc-ink-2); color: #fff; }
body.fdtc-modern #wpadminbar .menupop .ab-sub-wrapper { background: var(--fdtc-ink-2); }
body.fdtc-modern #wpadminbar #wp-admin-bar-fdtc-staff-home .ab-icon:before { content: "\f154"; top: 2px; color: var(--fdtc-red); }

/* No toolbar for staff who aren't administrators (kept on phones: it holds the menu button). */
@media (min-width: 783px) {
	html.wp-toolbar:has(body.fdtc-nobar) { padding-top: 0; }
	body.fdtc-nobar #wpadminbar { display: none; }
	body.fdtc-nobar #adminmenuwrap { top: 0; }
}
body.fdtc-modern #adminmenu a[href*="action=logout"] div.wp-menu-image:before { color: #9EA3C8; }
body.fdtc-modern #adminmenu li.menu-top:has(a[href*="action=logout"]) { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0; padding-top: 6px; }

/* Side menu */
body.fdtc-modern #adminmenuback, body.fdtc-modern #adminmenuwrap, body.fdtc-modern #adminmenu { background: var(--fdtc-ink); }
body.fdtc-modern #adminmenu { padding-top: 10px; }
body.fdtc-modern #adminmenu a { color: #D7DAEE; font-family: var(--fdtc-font); }
body.fdtc-modern #adminmenu div.wp-menu-image:before { color: #9EA3C8; }
body.fdtc-modern #adminmenu > li.menu-top { margin: 2px 8px; border-radius: 10px; overflow: hidden; }
body.fdtc-modern #adminmenu > li.menu-top > a { border-radius: 10px; }
body.fdtc-modern #adminmenu li.menu-top:hover > a,
body.fdtc-modern #adminmenu li.opensub > a.menu-top,
body.fdtc-modern #adminmenu li > a.menu-top:focus { background: var(--fdtc-ink-2); color: #fff; }
body.fdtc-modern #adminmenu li.menu-top:hover div.wp-menu-image:before { color: #fff; }
body.fdtc-modern #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
body.fdtc-modern #adminmenu li.current a.menu-top,
body.fdtc-modern #adminmenu .wp-menu-arrow, body.fdtc-modern #adminmenu .wp-menu-arrow div { background: var(--fdtc-red); color: #fff; }
body.fdtc-modern #adminmenu li.wp-has-current-submenu div.wp-menu-image:before,
body.fdtc-modern #adminmenu li.current div.wp-menu-image:before { color: #fff; }
body.fdtc-modern #adminmenu li.wp-has-current-submenu .wp-menu-arrow { display: none; }
body.fdtc-modern #adminmenu .wp-submenu, body.fdtc-modern #adminmenu .wp-has-current-submenu .wp-submenu, body.fdtc-modern #adminmenu .wp-has-current-submenu.opensub .wp-submenu { background: var(--fdtc-ink-2); }
body.fdtc-modern #adminmenu .wp-submenu a { color: #C3C7E3; }
body.fdtc-modern #adminmenu .wp-submenu a:hover, body.fdtc-modern #adminmenu .wp-submenu a:focus, body.fdtc-modern #adminmenu .wp-submenu li.current a { color: #fff; }
body.fdtc-modern #adminmenu li.wp-menu-separator { height: 1px; margin: 10px 18px; background: rgba(255, 255, 255, .08); }
body.fdtc-modern #collapse-button { color: #9EA3C8; }
body.fdtc-modern #adminmenu .awaiting-mod, body.fdtc-modern #adminmenu .update-plugins { background: var(--fdtc-red); }
@media (min-width: 783px) {
	body.fdtc-modern.folded #adminmenu > li.menu-top { margin: 2px 4px; }
}

/* Cards, tables and forms on every staff screen */
body.fdtc-modern .wrap table.widefat,
body.fdtc-modern .wrap .postbox,
body.fdtc-modern .wrap .card { border: 1px solid var(--fdtc-line); border-radius: var(--fdtc-radius); box-shadow: var(--fdtc-shadow); background: var(--fdtc-card); overflow: hidden; }
body.fdtc-modern .wrap table.widefat thead th, body.fdtc-modern .wrap table.widefat thead td { background: var(--fdtc-panel); color: var(--fdtc-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--fdtc-line); }
body.fdtc-modern .wrap table.widefat td, body.fdtc-modern .wrap table.widefat th { padding: 12px 14px; }
body.fdtc-modern .wrap .striped > tbody > :nth-child(odd) { background: #FAFBFE; }
body.fdtc-modern .wrap table.widefat tbody tr:hover { background: #F1F3FB; }
body.fdtc-modern .form-table { background: var(--fdtc-card); border-radius: var(--fdtc-radius); box-shadow: var(--fdtc-shadow); border: 1px solid var(--fdtc-line); }
body.fdtc-modern .form-table th { padding-left: 20px; }
body.fdtc-modern input[type=text], body.fdtc-modern input[type=email], body.fdtc-modern input[type=tel], body.fdtc-modern input[type=number],
body.fdtc-modern input[type=search], body.fdtc-modern input[type=date], body.fdtc-modern input[type=time], body.fdtc-modern input[type=url],
body.fdtc-modern input[type=password], body.fdtc-modern select, body.fdtc-modern textarea { border-color: var(--fdtc-line); border-radius: 8px; }
body.fdtc-modern input:focus, body.fdtc-modern select:focus, body.fdtc-modern textarea:focus { border-color: var(--fdtc-blue); box-shadow: 0 0 0 2px rgba(40, 48, 144, .18); outline: 0; }
body.fdtc-modern .button, body.fdtc-modern .page-title-action { border-radius: 999px !important; font-family: var(--fdtc-font); }
body.fdtc-modern .wrap .page-title-action { border-color: var(--fdtc-blue); color: var(--fdtc-blue); background: #fff; padding: 4px 14px; }
body.fdtc-modern .wrap .page-title-action:hover { background: var(--fdtc-blue); color: #fff; }
body.fdtc-modern .button-primary { background: var(--fdtc-red); border-color: var(--fdtc-red); font-weight: 600; padding: 0 18px; }
body.fdtc-modern .button-primary:hover, body.fdtc-modern .button-primary:focus { background: var(--fdtc-red-dark); border-color: var(--fdtc-red-dark); }
body.fdtc-modern .button:not(.button-primary):not(.button-link) { border-color: var(--fdtc-line); color: var(--fdtc-blue); }
body.fdtc-modern .button:not(.button-primary):not(.button-link):hover { border-color: var(--fdtc-blue); background: #F1F3FB; }
body.fdtc-modern .notice, body.fdtc-modern div.updated, body.fdtc-modern div.error { border-radius: 10px; box-shadow: var(--fdtc-shadow); border-top: 0; border-right: 0; border-bottom: 0; }
body.fdtc-modern .subsubsub a .count, body.fdtc-modern .subsubsub a.current { color: var(--fdtc-blue); }
body.fdtc-modern #wpfooter { color: var(--fdtc-muted); }
body.fdtc-modern .fdtc-cal-grid { border-radius: var(--fdtc-radius); overflow: hidden; box-shadow: var(--fdtc-shadow); }

/* ---------- Staff home ---------- */
.fdtc-home { max-width: 1240px; }
.fdtc-home h2, .fdtc-home h3 { margin: 0; }
.fdtc-home .fdtc-h-card { background: var(--fdtc-card); border: 1px solid var(--fdtc-line); border-radius: var(--fdtc-radius); box-shadow: var(--fdtc-shadow); padding: 20px 22px; }
.fdtc-home .fdtc-h-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 14px; }
.fdtc-home .fdtc-h-card > header h2 { font-size: 18px; font-weight: 800; }
.fdtc-home .fdtc-h-card > header h2 span { font-weight: 500; color: var(--fdtc-muted); font-size: 14px; margin-left: .4rem; }
.fdtc-home .fdtc-h-card > header a { font-weight: 600; text-decoration: none; }

/* Hello */
.fdtc-h-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 26px 28px; border-radius: 20px; color: #fff;
	background: radial-gradient(120% 140% at 100% 0%, rgba(232, 24, 32, .45) 0%, rgba(232, 24, 32, 0) 55%), linear-gradient(135deg, var(--fdtc-blue) 0%, var(--fdtc-ink) 100%); box-shadow: 0 10px 30px rgba(27, 29, 58, .25); }
.fdtc-h-hero-who { display: flex; align-items: center; gap: 18px; }
.fdtc-h-hero .fdtc-staff-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .85); display: inline-grid; place-items: center; font-size: 24px; flex: none; }
.fdtc-h-hero .fdtc-staff-photo--none { background: rgba(255, 255, 255, .15); color: #fff; }
.fdtc-h-date { margin: 0 0 2px; opacity: .8; font-size: 14px; }
.fdtc-home .fdtc-h-hello { color: #fff; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; }
.fdtc-h-role { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.fdtc-h-stats { display: flex; gap: 12px; margin: 0; }
.fdtc-h-stats > div { min-width: 104px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(4px); }
.fdtc-h-stats dt { font-size: 12px; opacity: .85; }
.fdtc-h-stats dd { margin: 2px 0 0; font-size: 28px; font-weight: 800; line-height: 1; }

/* Needs attention */
.fdtc-h-attn { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: #FFF4E5; border: 1px solid #F5D3A6; color: #7A4300 !important; font-weight: 600; text-decoration: none; }
.fdtc-h-attn .dashicons-arrow-right-alt2 { margin-left: auto; }
.fdtc-h-attn:hover { background: #FFEBD1; }

/* Today + shortcuts */
.fdtc-h-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; margin: 20px 0; align-items: start; }
.fdtc-h-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fdtc-h-list li { margin: 0; }
.fdtc-h-item { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--fdtc-line); border-left: 5px solid var(--fdtc-cal, #646970); background: #fff; color: var(--fdtc-ink) !important; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
a.fdtc-h-item:hover, a.fdtc-h-item:focus { transform: translateY(-1px); box-shadow: var(--fdtc-shadow); background: color-mix(in srgb, var(--fdtc-cal, #646970) 5%, #fff); }
.fdtc-h-item.is-mine { background: color-mix(in srgb, var(--fdtc-cal, #646970) 7%, #fff); }
.fdtc-h-item.is-done { opacity: .55; }
.fdtc-h-item.is-now { box-shadow: 0 0 0 2px var(--fdtc-red); border-left-color: var(--fdtc-red); }
.fdtc-h-when { flex: none; width: 112px; font-weight: 700; font-size: 13px; color: var(--fdtc-muted); }
.fdtc-h-live { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--fdtc-red); color: #fff; font-size: 11px; }
.fdtc-h-what { flex: 1; min-width: 0; display: grid; }
.fdtc-h-what strong { font-size: 15px; color: var(--fdtc-cal, var(--fdtc-ink)); }
.fdtc-h-kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--fdtc-muted); }
.fdtc-h-meta { font-size: 13px; color: var(--fdtc-muted); overflow-wrap: anywhere; }
.fdtc-h-go { color: var(--fdtc-muted); }
.fdtc-h-empty { display: flex; align-items: center; gap: 10px; margin: 0; padding: 22px; border-radius: 12px; background: var(--fdtc-panel); color: var(--fdtc-muted); font-weight: 600; }
.fdtc-h-empty .dashicons { color: var(--fdtc-red); }

.fdtc-h-links h3 { margin: 16px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fdtc-muted); }
.fdtc-h-links h3:first-of-type { margin-top: 0; }
.fdtc-h-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.fdtc-h-tiles li { margin: 0; }
.fdtc-h-tiles a { display: flex; align-items: center; gap: 12px; height: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--fdtc-line); background: #fff; color: var(--fdtc-ink); text-decoration: none; transition: border-color .12s ease, background .12s ease; }
.fdtc-h-tiles a:hover, .fdtc-h-tiles a:focus { border-color: var(--fdtc-blue); background: #F7F8FD; color: var(--fdtc-ink); }
.fdtc-h-tiles .dashicons { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: var(--fdtc-panel); color: var(--fdtc-blue); }
.fdtc-h-tiles a:hover .dashicons { background: var(--fdtc-blue); color: #fff; }
.fdtc-h-tiles strong { display: block; font-size: 14px; }
.fdtc-h-tiles small { display: block; color: var(--fdtc-muted); font-size: 12px; line-height: 1.35; }

/* The week */
.fdtc-h-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.fdtc-h-day { margin: 0; min-height: 120px; padding: 8px; border-radius: 12px; background: #FAFBFE; border: 1px solid var(--fdtc-line); display: flex; flex-direction: column; gap: 5px; }
.fdtc-h-day.is-today { background: #fff; border-color: var(--fdtc-red); box-shadow: 0 0 0 1px var(--fdtc-red); }
.fdtc-h-day.is-past { opacity: .6; }
.fdtc-h-dayhead { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; color: var(--fdtc-muted); }
.fdtc-h-dayhead span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fdtc-h-dayhead strong { font-size: 18px; color: var(--fdtc-ink); }
.fdtc-h-day.is-today .fdtc-h-dayhead strong { color: var(--fdtc-red); }
.fdtc-h-ev { display: block; padding: 4px 7px; border-radius: 7px; border-left: 3px solid var(--fdtc-cal, #646970); background: color-mix(in srgb, var(--fdtc-cal, #646970) 10%, #fff); color: var(--fdtc-ink) !important; font-size: 12px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
a.fdtc-h-ev:hover { background: color-mix(in srgb, var(--fdtc-cal, #646970) 20%, #fff); }
.fdtc-h-ev.is-mine { box-shadow: inset 0 0 0 1px var(--fdtc-cal, #646970); }
.fdtc-h-ev.is-appt { border-left-style: dashed; }
.fdtc-h-t { font-weight: 700; }
.fdtc-h-none { color: #A7AAC0; font-size: 12px; }

@media (max-width: 1100px) {
	.fdtc-h-grid { grid-template-columns: 1fr; }
	.fdtc-h-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	body.fdtc-modern #wpcontent { padding-left: 10px; }
	body.fdtc-modern .wrap { margin-right: 10px; }
	.fdtc-h-hero { padding: 20px; }
	.fdtc-h-stats { width: 100%; }
	.fdtc-h-stats > div { flex: 1; min-width: 0; }
	.fdtc-h-days { grid-template-columns: 1fr; }
	.fdtc-h-day { min-height: 0; }
	.fdtc-h-day.is-empty { display: none; }
	.fdtc-h-when { width: 84px; }
}
@media print {
	.fdtc-h-links, .fdtc-h-attn { display: none; }
	.fdtc-h-hero { background: none; color: var(--fdtc-ink); box-shadow: none; }
	.fdtc-home .fdtc-h-hello { color: var(--fdtc-ink); }
}

/* ---------- Login screen ---------- */
body.login { min-height: 100vh; font-family: var(--fdtc-font);
	background: radial-gradient(80% 60% at 100% 0%, rgba(232, 24, 32, .35) 0%, rgba(232, 24, 32, 0) 60%), linear-gradient(160deg, var(--fdtc-blue) 0%, var(--fdtc-ink) 70%); }
body.login #login { width: 360px; padding-top: 7vh; }
body.login h1 a { width: 96px; height: 96px; background-image: var(--fdtc-login-logo, none); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: transparent; border-radius: 0; box-shadow: none; margin-bottom: 20px; }
/* The customer login's dark mode puts a cream chip behind its blue-lettered logo; the red paw doesn't need one. */
html body.login:not(.interim-login) h1 a { padding: 0; background-color: transparent; background-origin: padding-box; background-clip: border-box; border-radius: 0; }
body.login form { border: 0; border-radius: 18px; padding: 28px 26px 30px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
body.login label { color: var(--fdtc-ink); font-weight: 600; }
body.login form .input, body.login input[type=text], body.login input[type=password], body.login input[type=email] { border: 1px solid var(--fdtc-line); border-radius: 10px; padding: 6px 12px; font-size: 18px; }
body.login form .input:focus { border-color: var(--fdtc-blue); box-shadow: 0 0 0 2px rgba(40, 48, 144, .2); }
body.login .button-primary { width: 100%; margin-top: 14px !important; height: 44px; border-radius: 999px; background: var(--fdtc-red); border-color: var(--fdtc-red); font-size: 16px; font-weight: 700; }
body.login .button-primary:hover, body.login .button-primary:focus { background: var(--fdtc-red-dark); border-color: var(--fdtc-red-dark); }
body.login .forgetmenot { float: none; margin-bottom: 4px; }
body.login .submit { clear: both; }
body.login .wp-hide-pw { color: var(--fdtc-blue); }
body.login #nav, body.login #backtoblog { text-align: center; }
body.login #nav a, body.login #backtoblog a, body.login .privacy-policy-page-link a { color: rgba(255, 255, 255, .85) !important; }
body.login #nav a:hover, body.login #backtoblog a:hover { color: #fff !important; }
body.login .message, body.login .notice, body.login #login_error { border-radius: 12px; border-left-width: 4px; }
body.login .language-switcher { display: none; }

/* Roster buttons: a tidy row under the title. */
body.fdtc-modern .wrap .fdtc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
body.fdtc-modern .wrap .fdtc-actions .page-title-action { margin: 0; top: 0; padding: 4px 14px; font-size: 13px; line-height: 2; }
