:root {
	--brand: #003b7e;
	--brand-soft: #003b7e;
	--brand-deep: #0a2342;
	--brand-mid: #19376d;
	--accent: #d31219;
	--danger: #d31219;
	--surface: #ffffff;
	--surface-muted: #f4f7fb;
	--border: #d7e0ec;
	--text: #0f1b2d;
	--text-muted: #5a6b82;
	--shadow: 0 14px 40px #003b7e17;
	--radius: 18px;
	--font: "Outfit", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* App header */
.app-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 71px;
	padding: 0 18px;
	background: linear-gradient(90deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
	border-bottom: 2px solid #fff;
	box-shadow: 0 2px 12px #0003;
	color: #fff;
}

.app-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.app-brand-logo,
.auth-brand-logo {
	display: block;
	object-fit: contain;
	background: #fff;
	border: 1px solid #d7e0ec;
	box-shadow: 0 4px 14px #003b7e14;
	flex-shrink: 0;
}

.app-brand-logo {
	width: 40px;
	height: 40px;
	padding: 4px;
	border-radius: 10px;
}

.auth-brand-logo {
	width: 56px;
	height: 56px;
	padding: 5px;
	border-radius: 12px;
	margin-bottom: 8px;
}

.app-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	min-width: 0;
}

.app-brand-name,
.auth-brand-name {
	font-weight: 750;
	letter-spacing: -0.03em;
	color: #fff;
}

.app-brand-name {
	font-size: 1.05rem;
}

.auth-brand-name {
	margin: 8px 0 0;
	font-size: clamp(1.7rem, 4vh, 2.2rem);
	line-height: 1.05;
	color: #003b7e;
}

.app-brand-sub,
.auth-brand-sub {
	font-weight: 500;
	color: #b8c5d9;
}

.app-brand-sub {
	font-size: 0.75rem;
}

.auth-brand-sub {
	margin: 4px 0 0;
	font-size: 0.95rem;
	color: #5a6b82;
}

/* Session actions (izloguj / izmena lozinke) */
.session-actions {
	position: static;
	z-index: 1;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.session-action-btn {
	font-family: var(--font);
	font-weight: 600;
	font-size: 0.82em;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 8px 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
}

.session-action-btn--secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.45);
	box-shadow: none;
}

.session-action-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
	transform: none;
}

.session-action-btn--logout {
	background: linear-gradient(135deg, #d31219, #a50e14);
	color: #fff;
	border-color: transparent;
	box-shadow: none;
}

.session-action-btn--logout:hover {
	background: #ffe9e6;
	box-shadow: none;
	transform: none;
}

.modal-lead {
	margin: -4px 0 16px;
	font-size: 0.88em;
	color: var(--text-muted);
	text-align: center;
	line-height: 1.4;
}

/* Password change modal */
#password-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
}

#password-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#password-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 36px 32px 28px 32px;
	min-width: 320px;
	max-width: 420px;
	width: 90vw;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#password-modal-content h3 {
	margin-bottom: 18px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
}

#password-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

#password-form label {
	font-size: 0.85em;
	font-weight: 600;
	color: #333;
	margin-top: 4px;
}

#password-form input[type="password"] {
	font-size: 1em;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #d0d7de;
	width: 100%;
	box-sizing: border-box;
}

#password-form input[type="password"]:focus {
	outline: none;
	border-color: #003b7e;
	box-shadow: 0 0 0 2px rgba(0, 59, 126, 0.15);
}

.password-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.password-modal-actions button {
	flex: 1;
	font-size: 1em;
	font-weight: 600;
	padding: 12px 18px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
}

#password-save-btn {
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
}

#password-save-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.password-modal-cancel {
	background: #f0f4f8;
	color: #334155;
}

#password-message {
	min-height: 1.2em;
	font-size: 0.85em;
	color: #c0392b;
	text-align: center;
	margin-top: 4px;
}

/* Dates confirmation modal */
#dates-confirm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
}

#dates-confirm-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#dates-confirm-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 32px 28px 24px 28px;
	min-width: 320px;
	max-width: 440px;
	width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#dates-confirm-content h3 {
	margin: 0 0 10px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
}

.dates-confirm-subtitle {
	margin: 0 0 12px;
	font-size: 0.9em;
	color: #555;
	text-align: center;
	line-height: 1.4;
}

.dates-confirm-list {
	margin: 0 0 18px;
	padding: 12px 14px;
	max-height: 280px;
	overflow-y: auto;
	list-style: none;
	background: #f7faff;
	border: 1px solid #e6eef8;
	border-radius: 10px;
	font-size: 0.95em;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.6;
}

.dates-confirm-list li {
	padding: 2px 0;
	border-bottom: 1px solid rgba(0, 59, 126, 0.08);
}

.dates-confirm-list li:last-child {
	border-bottom: none;
}

.dates-confirm-actions {
	display: flex;
	gap: 10px;
}

.dates-confirm-actions button {
	flex: 1;
	font-size: 1em;
	font-weight: 700;
	padding: 12px 18px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	letter-spacing: 0.03em;
}

.dates-confirm-cancel {
	background: #f0f4f8;
	color: #334155;
}

.dates-confirm-submit {
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
}

.dates-confirm-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

/* Propose dates modal */
#propose-confirm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
}

#propose-confirm-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#propose-confirm-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(234, 88, 12, 0.16);
	padding: 32px 28px 24px;
	min-width: 320px;
	max-width: 460px;
	width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
}

#propose-confirm-content h3 {
	margin: 0 0 8px;
	color: #c2410c;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
}

.propose-confirm-lead {
	margin: 0 0 12px;
	font-size: 0.88em;
	color: #64748b;
	text-align: center;
	line-height: 1.4;
}

.propose-confirm-voters {
	margin: 0 0 14px;
	font-size: 0.86em;
	color: #334155;
	line-height: 1.45;
	background: #fff7ed;
	border: 1px solid #ffedd5;
	border-radius: 10px;
	padding: 10px 12px;
}

.propose-confirm-submit {
	background: linear-gradient(90deg, #ea580c 60%, #c2410c 100%) !important;
}

.propose-confirm-message {
	min-height: 1.2em;
	margin-top: 8px;
	font-size: 0.85em;
	color: #c0392b;
	text-align: center;
}

#notice-modal {
	position: fixed;
	inset: 0;
	z-index: 1500;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#notice-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 35, 66, 0.35);
}

#notice-content {
	position: relative;
	z-index: 1;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d7e0ec;
	border-radius: 18px;
	box-shadow: 0 14px 40px #003b7e17;
	padding: 28px 28px 22px;
	width: min(420px, 100%);
}

#notice-content::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 4px;
	background: linear-gradient(90deg, #d31219 0, #d31219 34%, #003b7e 34%, #003b7e);
}

#notice-content h3 {
	margin: 8px 0;
	color: #003b7e;
	font-size: 1.35rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	text-align: center;
}

#notice-message {
	margin: 0;
	color: #334155;
	font-size: 0.95rem;
	line-height: 1.45;
	text-align: center;
}

/* Rešenje forma modal */
#resenje-forma-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
	padding: 16px;
	box-sizing: border-box;
}

#resenje-forma-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#resenje-forma-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 28px 24px 22px 24px;
	width: min(640px, 100%);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#resenje-forma-content h3 {
	margin: 0 0 8px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
	flex-shrink: 0;
}

.resenje-forma-hint {
	margin: 0 0 14px;
	font-size: 0.82em;
	color: #555;
	line-height: 1.45;
	text-align: center;
	flex-shrink: 0;
}

.resenje-forma-hint code {
	font-size: 0.95em;
	background: #f0f4f8;
	padding: 1px 4px;
	border-radius: 4px;
}

.resenje-forma-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
	min-height: 0;
	padding-right: 4px;
}

.resenje-forma-section {
	border: 1px solid #e6eef8;
	border-radius: 12px;
	padding: 12px 14px 14px;
	margin: 0;
}

.resenje-forma-section legend {
	font-size: 0.85em;
	font-weight: 700;
	color: #003b7e;
	padding: 0 6px;
}

.resenje-forma-section label {
	display: block;
	font-size: 0.8em;
	font-weight: 600;
	color: #334155;
	margin: 10px 0 4px;
}

.resenje-forma-section label:first-of-type {
	margin-top: 0;
}

.resenje-forma-section input[type="text"],
.resenje-forma-section textarea {
	width: 100%;
	box-sizing: border-box;
	font-size: 0.92em;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #d0d7de;
	font-family: inherit;
}

.resenje-forma-section textarea {
	resize: vertical;
	min-height: 52px;
}

.resenje-forma-section input:focus,
.resenje-forma-section textarea:focus {
	outline: none;
	border-color: #003b7e;
	box-shadow: 0 0 0 2px rgba(0, 59, 126, 0.15);
}

.resenje-forma-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	margin-top: 4px;
}

.resenje-forma-actions button {
	flex: 1;
	font-size: 0.92em;
	font-weight: 700;
	padding: 11px 12px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
}

#resenje-forma-save-btn {
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
}

#resenje-forma-save-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.resenje-forma-cancel,
.resenje-forma-reset {
	background: #f0f4f8;
	color: #334155;
}

.resenje-forma-reset {
	flex: 1.2;
}

#resenje-forma-message {
	min-height: 1.2em;
	font-size: 0.85em;
	color: #c0392b;
	text-align: center;
	flex-shrink: 0;
}

/* Poništi datume modal */
#ponisti-dates-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
	padding: 16px;
	box-sizing: border-box;
}

#ponisti-dates-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#ponisti-dates-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 32px 28px 24px 28px;
	min-width: 320px;
	max-width: 440px;
	width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
}

#ponisti-dates-content h3 {
	margin: 0 0 10px;
	color: #c0392b;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
}

.ponisti-dates-subtitle {
	margin: 0 0 14px;
	font-size: 0.9em;
	color: #555;
	text-align: center;
	line-height: 1.4;
}

.ponisti-dates-users {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
	max-height: 280px;
	overflow-y: auto;
}

.ponisti-dates-user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #e6eef8;
	background: #f7faff;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.ponisti-dates-user:hover {
	background: #eef4ff;
	border-color: #91caff;
}

.ponisti-dates-user input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.ponisti-dates-checkbox-ui {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 2px solid #c5d4e8;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s, background 0.15s;
}

.ponisti-dates-user input:checked + .ponisti-dates-checkbox-ui {
	background: linear-gradient(135deg, #003b7e, #1e4a8a);
	border-color: #003b7e;
}

.ponisti-dates-user input:checked + .ponisti-dates-checkbox-ui::after {
	content: '';
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translate(-1px, -1px);
}

.ponisti-dates-user-avatar {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.ponisti-dates-user-name {
	flex: 1;
	font-size: 0.9em;
	font-weight: 600;
	color: #334155;
}

.ponisti-dates-user-count {
	font-size: 0.75em;
	font-weight: 600;
	color: #64748b;
}

.calendar-table td {
    /* Tanak beli okvir čini da svaka boja "iskoči" i ne stapa se sa susednom */
    outline: 1px solid #ffffff; 
    transition: background 0.2s; /* Lepši prelaz kada se boje promene */
}

/* Stil za datume koje je neko već rezervisao */
.calendar-table td.shared-date {
    cursor: not-allowed;
    opacity: 0.8; /* Opciono: malo bleđa boja da izgleda "onemogućeno" */
}

/* Direkcija: CI/Terminal datumi — samo pregled, bez blokiranja */
.calendar-table td.related-visibility-date:not(.shared-date):not(.locked) {
    cursor: pointer;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(71, 85, 105, 0.1),
        rgba(71, 85, 105, 0.1) 3px,
        rgba(71, 85, 105, 0.2) 3px,
        rgba(71, 85, 105, 0.2) 6px
    );
    background-color: #e8eef5;
    color: #334155;
    box-shadow: inset 0 0 0 2px rgba(100, 116, 139, 0.55);
}

.calendar-table td.related-visibility-date.selected:not(.shared-date):not(.locked) {
    box-shadow: inset 0 0 0 2px rgba(100, 116, 139, 0.75);
}

/* Hover: uokviri sve datume istih korisnika (boja = svetlija mešavina preseka) */
.calendar-table td.shared-hover-related {
    position: relative;
    z-index: 2;
    opacity: 1;
    box-shadow: inset 0 0 0 3px var(--shared-hover-frame, #ffffff);
    transition: box-shadow 0.12s ease, opacity 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
    .calendar-table td.shared-hover-related {
        transition: none;
    }
}

#calendar-tooltip {
    position: fixed;
    z-index: 2000;
    display: none;
    max-width: 280px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(20, 28, 40, 0.94);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: pre-line;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
#calendar-tooltip.visible {
    display: block;
}

/* Stil za tvoje stare, već sačuvane datume */
.calendar-table td.locked {
    cursor: not-allowed;
}

/* Root: zauzeta polja su klikabilna — isti kursor kao ostala radna polja */
body.is-root-user .calendar-table td.shared-date,
body.is-root-user .calendar-table td.locked {
    cursor: pointer;
}



/* Sidebar for user list */
#user-list-sidebar {
	min-width: 180px;
	max-width: 220px;
	max-height: 500px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 4px 18px rgba(0, 59, 126, 0.06);
	margin-right: 0;
	padding: 16px 12px;
	font-family: var(--font);
	font-size: 0.95em;
	color: var(--text);
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
	overflow-y: auto;
	min-height: 420px;
}
.user-list-entry {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1em;
	font-weight: 500;
	padding: 2px 4px;
	cursor: default;
	border-radius: 6px;
	transition: background 0.12s ease;
	box-sizing: border-box;
}
.user-list-entry:hover,
.user-list-entry.user-list-hover-active {
	background: rgba(0, 59, 126, 0.08);
}
.user-list-entry.selected-filter {
	background: rgba(77, 150, 255, 0.2);
}
.user-list-related-section {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed rgba(100, 116, 139, 0.35);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.user-list-related-title {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
	padding: 0 4px 4px;
}
.user-list-entry--related {
	opacity: 0.92;
}
.user-color-box--related {
	border-style: dashed;
	border-color: #94a3b8;
}
.user-color-box {
	width: 16px;
	height: 16px;
	border-radius: 4px;
	margin-right: 4px;
	border: 1.5px solid #e0e7ef;
	display: inline-block;
	flex-shrink: 0;
}

/* Root filter sidebar */
#user-list-sidebar.root-filter-sidebar {
	min-width: 248px;
	max-width: 280px;
	min-height: 0;
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin-right: 0;
	padding: 0;
	background: linear-gradient(165deg, #ffffff 0%, #f4f8ff 55%, #eef4fc 100%);
	border: 1px solid rgba(0, 59, 126, 0.12);
	border-radius: 16px;
	box-shadow: 0 8px 28px rgba(0, 59, 126, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
	overflow: hidden;
}

.root-filter-container {
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	flex-shrink: 0;
}

.root-filter {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	width: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 59, 126, 0.45) transparent;
}

.root-filter::-webkit-scrollbar {
	width: 6px;
}

.root-filter::-webkit-scrollbar-thumb {
	background: rgba(0, 59, 126, 0.35);
	border-radius: 999px;
}

.root-filter-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 12px;
	background: linear-gradient(135deg, #003b7e 0%, #36cfc9 100%);
	color: #fff;
}

.root-filter-header-icon {
	font-size: 1.35rem;
	line-height: 1;
	opacity: 0.95;
}

.root-filter-title {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.25;
}

.root-filter-subtitle {
	font-size: 0.72rem;
	font-weight: 500;
	opacity: 0.88;
	margin-top: 2px;
}

.root-filter-select-all {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 12px 8px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #e6eef8;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.root-filter-select-all:hover {
	border-color: #91caff;
	box-shadow: 0 4px 14px rgba(0, 59, 126, 0.1);
	transform: translateY(-1px);
}

.root-filter-select-all-text {
	font-size: 0.88rem;
	font-weight: 600;
	color: #1f2937;
}

.root-filter-acting {
	margin: 0 12px 10px;
	padding: 10px 12px;
	background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
	border: 1px solid rgba(0, 59, 126, 0.2);
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	cursor: context-menu;
}

.root-filter-acting-label {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
}

.root-filter-acting-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #003b7e;
}

.root-filter-acting-hint {
	font-size: 0.68rem;
	color: #94a3b8;
}

.root-filter-member--acting,
.root-filter-proxy.root-filter-member--acting {
	background: rgba(0, 59, 126, 0.12);
	border-radius: 8px;
	box-shadow: inset 0 0 0 2px rgba(0, 59, 126, 0.45);
}

.root-filter-proxy {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 10px 10px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px dashed #cbd5e1;
	cursor: context-menu;
	background: #fafbfc;
}

.root-filter-proxy-hint {
	font-size: 0.65rem;
	color: #94a3b8;
	margin-left: auto;
}

.calendar-table td.acting-selected {
	font-weight: 700;
	z-index: 1;
	position: relative;
}

.root-filter-teams {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 4px 10px 14px;
}

.root-filter-team {
	background: #fff;
	border: 1px solid #e8eef6;
	border-radius: 12px;
	overflow: hidden;
	transition: opacity 0.2s, box-shadow 0.2s;
}

.root-filter-team:hover {
	box-shadow: 0 4px 16px rgba(0, 59, 126, 0.08);
}

.root-filter-team--off {
	opacity: 0.72;
}

.root-filter-team--off .root-filter-members {
	display: none;
}

.root-filter-team-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	cursor: pointer;
	background: linear-gradient(90deg, #fafcff 0%, #f5f9ff 100%);
	border-bottom: 1px solid transparent;
	transition: background 0.2s;
}

.root-filter-team:not(.root-filter-team--off) .root-filter-team-head {
	border-bottom-color: #eef2f7;
}

.root-filter-team-head:hover {
	background: linear-gradient(90deg, #f0f7ff 0%, #e8f3ff 100%);
}

.root-filter-team-name {
	flex: 1;
	font-size: 0.78rem;
	font-weight: 600;
	color: #1e3a5f;
	line-height: 1.3;
	min-width: 0;
	word-break: break-word;
}

.root-filter-team-count {
	flex-shrink: 0;
	font-size: 0.68rem;
	font-weight: 700;
	color: #003b7e;
	background: rgba(0, 59, 126, 0.1);
	padding: 2px 7px;
	border-radius: 999px;
}

.root-filter-members {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 8px 8px;
}

.root-filter-member {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.root-filter-member:hover,
.root-filter-member.user-list-hover-active,
.root-filter-proxy.user-list-hover-active {
	background: rgba(0, 59, 126, 0.06);
}

.root-filter-member--off {
	opacity: 0.45;
}

.root-filter-member--me {
	cursor: default;
	background: linear-gradient(90deg, rgba(72, 201, 176, 0.12) 0%, rgba(0, 59, 126, 0.06) 100%);
	border: 1px solid rgba(72, 201, 176, 0.25);
	margin-bottom: 4px;
}

.root-filter-member--me:hover {
	background: linear-gradient(90deg, rgba(72, 201, 176, 0.14) 0%, rgba(0, 59, 126, 0.08) 100%);
}

.root-filter-member-name {
	flex: 1;
	font-size: 0.82rem;
	font-weight: 500;
	color: #334155;
	line-height: 1.25;
	min-width: 0;
	word-break: break-word;
}

.root-filter-member--me .root-filter-member-name {
	font-weight: 600;
	color: #0f4c5c;
}

.root-filter-you-badge {
	flex-shrink: 0;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	background: linear-gradient(135deg, #48c9b0, #003b7e);
	padding: 2px 6px;
	border-radius: 4px;
}

.root-filter-avatar {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.12);
}

.root-filter-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.root-filter-checkbox-ui {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 2px solid #c5d4e8;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.root-filter-checkbox-ui--sm {
	width: 16px;
	height: 16px;
	border-radius: 4px;
}

.root-filter-checkbox:checked + .root-filter-checkbox-ui {
	background: linear-gradient(135deg, #003b7e, #1e4a8a);
	border-color: #003b7e;
	box-shadow: 0 2px 8px rgba(0, 59, 126, 0.35);
}

.root-filter-checkbox:checked + .root-filter-checkbox-ui::after {
	content: '';
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translate(-1px, -1px);
}

.root-filter-select-all:focus-within .root-filter-checkbox-ui,
.root-filter-team-head:focus-within .root-filter-checkbox-ui,
.root-filter-member:focus-within .root-filter-checkbox-ui {
	outline: 2px solid rgba(0, 59, 126, 0.35);
	outline-offset: 2px;
}
/* Secondary team selection modal uses same style as primary */
#subteam-modal {
	position: fixed;
	top: 0; left: 0; width: 100vw; height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
#subteam-modal #team-modal-backdrop {
	position: absolute;
	top: 0; left: 0; width: 100vw; height: 100vh;
	background: rgba(0,0,0,0.25);
	z-index: 1;
}
#subteam-modal #team-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 36px 32px 28px 32px;
	min-width: 320px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#subteam-modal #team-modal-content h3 {
	margin-bottom: 18px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
}
#subteam-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}
.subteam-option {
	font-size: 1em;
	font-weight: 600;
	padding: 12px 18px;
	border-radius: 8px;
	border: none;
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,59,126,0.07);
	transition: background 0.18s, box-shadow 0.18s, transform 0.13s;
	width: 100%;
}
.subteam-option:hover {
	background: linear-gradient(90deg, #1e4a8a 0%, #003b7e 100%);
	box-shadow: 0 4px 16px rgba(0,59,126,0.13);
	transform: translateY(-2px) scale(1.04);
}
/* Profile modal (ime / prezime) */
#profile-modal {
	position: fixed;
	top: 0; left: 0; width: 100vw; height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
}
#profile-modal-backdrop {
	position: absolute;
	top: 0; left: 0; width: 100vw; height: 100vh;
	background: rgba(0,0,0,0.25);
	z-index: 1;
}
#profile-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 36px 32px 28px 32px;
	min-width: 320px;
	max-width: 420px;
	width: 90vw;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}
#profile-modal-content h3 {
	margin-bottom: 10px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
}
.profile-modal-hint {
	margin: 0 0 18px;
	font-size: 0.9em;
	color: #555;
	line-height: 1.4;
	text-align: center;
}
#profile-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}
#profile-form label {
	font-size: 0.85em;
	font-weight: 600;
	color: #333;
	margin-top: 4px;
}
#profile-form input[type="text"] {
	font-size: 1em;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #d0d7de;
	width: 100%;
	box-sizing: border-box;
}
#profile-form input[type="text"]:focus {
	outline: none;
	border-color: #003b7e;
	box-shadow: 0 0 0 2px rgba(0, 59, 126, 0.15);
}
#profile-save-btn {
	margin-top: 12px;
	font-size: 1em;
	font-weight: 600;
	padding: 12px 18px;
	border-radius: 8px;
	border: none;
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
	cursor: pointer;
}
#profile-save-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}
#profile-message {
	min-height: 1.2em;
	font-size: 0.85em;
	color: #c0392b;
	text-align: center;
}

/* Team selection modal */
#team-modal {
	position: fixed;
	top: 0; left: 0; width: 100vw; height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
#team-modal-backdrop {
	position: absolute;
	top: 0; left: 0; width: 100vw; height: 100vh;
	background: rgba(0,0,0,0.25);
	z-index: 1;
}
#team-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 36px 32px 28px 32px;
	min-width: 320px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#team-modal-content h3 {
	margin-bottom: 18px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
}
#team-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}
.team-option {
	font-size: 1em;
	font-weight: 600;
	padding: 12px 18px;
	border-radius: 8px;
	border: none;
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,59,126,0.07);
	transition: background 0.18s, box-shadow 0.18s, transform 0.13s;
	width: 100%;
}
.team-option:hover {
	background: linear-gradient(90deg, #1e4a8a 0%, #003b7e 100%);
	box-shadow: 0 4px 16px rgba(0,59,126,0.13);
	transform: translateY(-2px) scale(1.04);
}
/* Auth UI styles */
#auth-container {
	width: 100vw;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(80% 60% at 50% 0%, rgba(0, 59, 126, 0.08), transparent 55%),
		#f4f7fb;
	position: absolute;
	top: 0; left: 0;
	z-index: 10;
	padding: 24px;
	font-family: var(--font);
}

#auth-form {
	position: relative;
	overflow: hidden;
	background: #fff;
	border-radius: 18px;
	border: 1px solid #d7e0ec;
	box-shadow: 0 14px 40px #003b7e17;
	padding: 32px 28px 24px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: min(420px, 100%);
	gap: 8px;
}

#auth-form::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 4px;
	background: linear-gradient(90deg, #d31219 0, #d31219 34%, #003b7e 34%, #003b7e);
}

.auth-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-bottom: 4px;
}

.auth-brand .auth-brand-mark {
	margin-bottom: 8px;
}

.auth-brand-name {
	margin: 0;
	font-size: 1.05rem;
	letter-spacing: 0.08em;
}

.auth-brand-sub {
	margin: 0 0 6px;
}

#auth-form h2 {
	margin: 10px 0 8px;
	color: #002858;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0;
	text-align: center;
}

.auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	font-size: 0.82em;
	font-weight: 600;
	color: var(--text-muted);
}

#auth-form input[type="email"],
#auth-form input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid #d7e0ec;
	font-size: 0.95rem;
	font-weight: 500;
	color: #0f1b2d;
	margin-bottom: 0;
	outline: none;
	transition: border 0.18s, box-shadow 0.18s;
	background: #fff;
	font-family: inherit;
}

#auth-form input[type="email"]:focus,
#auth-form input[type="password"]:focus {
	border-color: #003b7e;
	box-shadow: 0 0 0 3px #003b7e29;
	background: #fff;
}

#auth-actions {
	display: flex;
	flex-direction: row;
	gap: 16px;
	width: 100%;
	justify-content: center;
	margin-top: 4px;
}

#auth-actions button {
	font-size: 0.98rem;
	font-weight: 750;
	padding: 12px 18px;
	border-radius: 999px;
	border: none;
	background: linear-gradient(135deg, #d31219, #a50e14);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 22px #d3121940;
	transition: background 0.15s, box-shadow 0.15s, transform 0.13s;
	width: 100%;
	margin-top: 8px;
	font-family: inherit;
	letter-spacing: 0.01em;
}

#auth-actions button:hover {
	background: linear-gradient(135deg, #e0151c, #8e0c11);
	box-shadow: 0 12px 24px #d312194d;
	transform: translateY(-1px);
}

#auth-form [hidden] {
	display: none !important;
}

.auth-forgot {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #003b7e;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
}

.auth-forgot-lead {
	margin: 0 0 8px;
	color: #5a6b82;
	font-size: 0.86rem;
	line-height: 1.4;
	text-align: center;
}

.auth-forgot-send {
	width: 100%;
	margin-top: 8px;
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	background: #003b7e;
	color: #fff;
	font-family: inherit;
	font-size: 0.98rem;
	font-weight: 750;
	cursor: pointer;
}

#forgot-message {
	min-height: 1.2em;
	margin-top: 10px;
	text-align: center;
	font-size: 0.86rem;
	font-weight: 650;
}
}

#auth-message {
	min-height: 22px;
	color: #e53935;
	font-size: 0.9em;
	text-align: center;
	margin-top: 0;
}
/* Custom button style (kalendar — akcije) */
.custom-btn {
	font-family: var(--font);
	font-size: 0.82em;
	font-weight: 600;
	padding: 11px 12px;
	border-radius: 10px;
	background: #003b7e;
	color: #fff;
	border: none;
	box-shadow: 0 2px 8px rgba(0, 59, 126, 0.16);
	margin: 0;
	cursor: pointer;
	transition: background 0.18s, box-shadow 0.18s, transform 0.13s, opacity 0.15s;
	letter-spacing: 0.01em;
	width: 100%;
	line-height: 1.25;
	text-align: center;
}
.custom-btn p {
	margin: 0;
}
.custom-btn:hover:not(:disabled) {
	box-shadow: 0 4px 14px rgba(0, 59, 126, 0.22);
	transform: translateY(-1px);
}
.custom-btn--submit {
	background: linear-gradient(135deg, #003b7e 0%, #0d7de0 100%);
	font-size: 0.9em;
	padding: 14px 12px;
	box-shadow: 0 6px 16px rgba(0, 59, 126, 0.24);
}
.custom-btn--submit:hover:not(:disabled) {
	background: linear-gradient(135deg, #1e4a8a 0%, #003b7e 100%);
}
.custom-btn--propose {
	background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
	box-shadow: 0 4px 12px rgba(194, 65, 12, 0.22);
	font-size: 0.86em;
	padding: 12px 12px;
}
.custom-btn--propose:hover:not(:disabled) {
	background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
	box-shadow: 0 6px 16px rgba(194, 65, 12, 0.28);
}
.custom-btn--propose:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}
.custom-btn--report {
	background: #334155;
	box-shadow: 0 2px 8px rgba(51, 65, 85, 0.18);
}
.custom-btn--report:hover:not(:disabled) {
	background: #1e293b;
	box-shadow: 0 4px 12px rgba(51, 65, 85, 0.24);
}
.custom-btn--resolution,
.custom-btn.resolution-btn {
	background: #5b4b8a;
	box-shadow: 0 2px 8px rgba(91, 75, 138, 0.2);
}
.custom-btn--resolution:hover:not(:disabled),
.custom-btn.resolution-btn:not(:disabled):hover {
	background: #4a3c72;
	box-shadow: 0 4px 12px rgba(91, 75, 138, 0.28);
}
.custom-btn.resolution-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
.custom-btn--forma,
.custom-btn.forma-btn {
	background: #003b7e;
	box-shadow: 0 2px 8px rgba(13, 148, 136, 0.18);
}
.custom-btn--forma:hover:not(:disabled),
.custom-btn.forma-btn:hover {
	background: #0f766e;
	box-shadow: 0 4px 12px rgba(13, 148, 136, 0.26);
}
.custom-btn--ponisti,
.custom-btn.ponisti-btn {
	background: #c0392b;
	box-shadow: 0 2px 8px rgba(192, 57, 43, 0.18);
}
.custom-btn--ponisti:hover:not(:disabled),
.custom-btn.ponisti-btn:not(:disabled):hover {
	background: #a93226;
	box-shadow: 0 4px 12px rgba(192, 57, 43, 0.26);
}
.custom-btn.ponisti-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
.custom-btn--log,
.custom-btn.audit-log-btn {
	background: #64748b;
	box-shadow: 0 2px 8px rgba(100, 116, 139, 0.18);
}
.custom-btn--log:hover:not(:disabled),
.custom-btn.audit-log-btn:hover {
	background: #475569;
	box-shadow: 0 4px 12px rgba(100, 116, 139, 0.26);
}

.custom-btn--pending {
	background: #0f766e;
	box-shadow: 0 2px 8px rgba(15, 118, 110, 0.2);
}

.custom-btn--pending:hover:not(:disabled) {
	background: #115e59;
}

#pending-modal {
	position: fixed;
	inset: 0;
	z-index: 1400;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#pending-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 35, 66, 0.35);
}

#pending-content {
	position: relative;
	z-index: 1;
	width: min(640px, 100%);
	max-height: min(88vh, 820px);
	overflow: auto;
	background: #fff;
	border: 1px solid #d7e0ec;
	border-radius: 18px;
	box-shadow: 0 14px 40px #003b7e17;
	padding: 24px 22px 18px;
}

#pending-content h3 {
	margin: 0 0 8px;
	color: #003b7e;
	font-size: 1.3rem;
	font-weight: 750;
	text-align: center;
}

.pending-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pending-card {
	border: 1px solid #d7e0ec;
	border-radius: 12px;
	padding: 12px;
	background: #f8fafc;
}

.pending-card h4 {
	margin: 0 0 4px;
	font-size: 1rem;
	color: #0f1b2d;
}

.pending-card p {
	margin: 0 0 6px;
	color: #5a6b82;
	font-size: 0.86rem;
}

.pending-dates {
	margin: 0 0 8px;
	padding-left: 18px;
	font-weight: 700;
	color: #0f1b2d;
}

.pending-actions {
	display: flex;
	gap: 8px;
}

.pending-actions button,
.pending-reject button {
	flex: 1;
	border: 0;
	border-radius: 999px;
	padding: 9px 10px;
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.pending-approve {
	background: #2f9e44;
}

.pending-reject-open,
.pending-reject button[type="submit"] {
	background: #e03131;
}

.pending-reject {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

.pending-reject textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #d7e0ec;
	border-radius: 12px;
	padding: 8px 10px;
	font-family: inherit;
}

#pending-message {
	min-height: 1.2em;
	margin: 10px 0 0;
	text-align: center;
	color: #d31219;
	font-size: 0.86rem;
}

/* Audit log modal */
#audit-log-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
	padding: 16px;
	box-sizing: border-box;
}

#audit-log-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.25);
	z-index: 1;
}

#audit-log-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(0, 59, 126, 0.18);
	padding: 28px 24px 22px 24px;
	width: min(720px, 100%);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#audit-log-content h3 {
	margin: 0 0 8px;
	color: #003b7e;
	font-size: 1.25em;
	font-weight: 700;
	text-align: center;
	flex-shrink: 0;
}

.audit-log-message {
	margin: 0 0 12px;
	font-size: 0.85em;
	color: #64748b;
	text-align: center;
	flex-shrink: 0;
}

.audit-log-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	min-height: 0;
	padding-right: 4px;
	margin-bottom: 14px;
}

.audit-log-entry {
	border: 1px solid #e6eef8;
	border-radius: 10px;
	padding: 10px 12px;
	background: #f8fbff;
}

.audit-log-entry-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.audit-log-time {
	font-size: 0.78em;
	font-weight: 600;
	color: #64748b;
}

.audit-log-action {
	font-size: 0.72em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #003b7e;
	background: rgba(0, 59, 126, 0.1);
	padding: 2px 8px;
	border-radius: 999px;
}

.audit-log-hint {
	margin: 0 0 8px;
	font-size: 0.82em;
	color: #64748b;
	text-align: center;
	flex-shrink: 0;
}

.audit-log-actor {
	font-size: 0.9em;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 2px;
}

.audit-log-actor-email {
	font-weight: 500;
	color: #64748b;
}

.audit-log-target {
	font-weight: 600;
	color: #003b7e;
}

.audit-log-summary {
	font-size: 0.88em;
	color: #334155;
}

.audit-log-details {
	margin-top: 6px;
	font-size: 0.8em;
	color: #64748b;
	line-height: 1.4;
}

.audit-log-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.audit-log-actions button {
	flex: 1;
	font-size: 0.92em;
	font-weight: 700;
	padding: 11px 12px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
}

.audit-log-refresh {
	background: linear-gradient(90deg, #003b7e 60%, #1e4a8a 100%);
	color: #fff;
}

.audit-log-close {
	background: #f0f4f8;
	color: #334155;
}

.calendar-actions-col {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	width: 148px;
	min-width: 148px;
	max-width: 148px;
}

.actions-group-label {
	margin: 4px 0 0;
	padding: 0 2px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.admin-actions {
	display: none;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	padding-top: 4px;
	border-top: 1px dashed var(--border);
}

.admin-actions .custom-btn {
	font-size: 0.78em;
	padding: 10px 10px;
}

.custom-btn--accounts {
	background: linear-gradient(135deg, #0f9f6e, #047857);
	box-shadow: 0 2px 8px rgba(4, 120, 87, 0.22);
}

.custom-btn--accounts:hover:not(:disabled) {
	background: linear-gradient(135deg, #12b37c, #065f46);
	box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

#help-modal,
#accounts-modal {
	position: fixed;
	inset: 0;
	z-index: 1400;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#help-backdrop,
#accounts-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 35, 66, 0.35);
}

#help-content,
#accounts-content {
	position: relative;
	z-index: 1;
	background: #fff;
	border: 1px solid #d7e0ec;
	border-radius: 18px;
	box-shadow: 0 14px 40px #003b7e17;
	padding: 28px 28px 22px;
	width: min(560px, 100%);
	max-height: min(88vh, 820px);
	overflow: auto;
}

#accounts-content {
	width: min(920px, 100%);
}

#help-content h3,
#accounts-content h3 {
	margin: 0 0 8px;
	color: #003b7e;
	font-size: 1.35rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	text-align: center;
}

#help-content [hidden] {
	display: none !important;
}

.help-body h4 {
	margin: 16px 0 6px;
	color: #002858;
	font-size: 0.98rem;
}

.help-body p {
	margin: 0 0 8px;
	color: #334155;
	font-size: 0.92rem;
	line-height: 1.45;
}

.help-close {
	display: block;
	margin: 18px auto 0;
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	background: #003b7e;
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.accounts-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 18px;
	align-items: start;
}

.accounts-list-col {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

#accounts-search,
.accounts-form input[type="email"],
.accounts-form input[type="text"],
.accounts-form input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid #d7e0ec;
	font-family: inherit;
	font-size: 0.92rem;
	color: #0f1b2d;
	background: #fff;
}

#accounts-search:focus,
.accounts-form input:focus {
	outline: none;
	border-color: #003b7e;
	box-shadow: 0 0 0 3px #003b7e29;
}

.accounts-new-btn,
.accounts-form-actions button[type="submit"] {
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	background: linear-gradient(135deg, #0f9f6e, #047857);
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.accounts-summary {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
}

.accounts-summary label {
	color: #003b7e;
	font-size: 0.92rem;
	font-weight: 700;
}

.accounts-summary textarea {
	width: 100%;
	min-height: 72px;
	resize: vertical;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid #d7e0ec;
	font-family: inherit;
	font-size: 0.92rem;
	color: #0f1b2d;
	background: #fff;
}

.accounts-summary textarea:focus {
	outline: none;
	border-color: #003b7e;
	box-shadow: 0 0 0 3px #003b7e29;
}

#accounts-summary-save {
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	background: #003b7e;
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

#accounts-summary-message {
	min-height: 1.1em;
	font-size: 0.85rem;
	text-align: center;
}

.accounts-list {
	max-height: 280px;
	overflow: auto;
	border: 1px solid #d7e0ec;
	border-radius: 12px;
	background: #f8fafc;
}

.accounts-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	padding: 10px 12px;
	border: none;
	border-bottom: 1px solid #e6edf5;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.accounts-row.is-active {
	background: #e8f6ef;
}

.accounts-row-name {
	font-weight: 700;
	color: #0f1b2d;
	font-size: 0.9rem;
}

.accounts-row-meta {
	font-size: 0.75rem;
	color: #5a6b82;
}

.accounts-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.accounts-form label,
.accounts-teams legend {
	font-size: 0.78rem;
	font-weight: 700;
	color: #5a6b82;
}

.accounts-password-hint,
#accounts-message {
	margin: 0;
	font-size: 0.82rem;
	color: #5a6b82;
}

#accounts-message {
	min-height: 1.2em;
	color: #d31219;
	text-align: center;
}

.accounts-teams {
	margin: 8px 0 0;
	padding: 10px 12px 12px;
	border: 1px solid #d7e0ec;
	border-radius: 12px;
}

.accounts-team-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
	font-size: 0.88rem;
	color: #0f1b2d;
	font-weight: 500;
}

.accounts-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 8px;
}

.accounts-form-actions button {
	flex: 1;
}

.accounts-delete-btn {
	margin-top: 8px;
	width: 100%;
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	background: #d31219;
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

.accounts-delete-btn[hidden] {
	display: none;
}

.accounts-delete-btn:hover {
	background: #b10e14;
}

@media (max-width: 760px) {
	.accounts-layout {
		grid-template-columns: 1fr;
	}
	.accounts-list {
		max-height: 180px;
	}
}

.calendar-table td.weekend {
	pointer-events: none;
	background: #f1f5f9 !important;
	color: #94a3b8 !important;
	cursor: not-allowed;
	font-weight: 500;
}

.calendar-table td.selected {
	font-weight: 700;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 76px 16px 28px;
	background:
		radial-gradient(80% 60% at 50% 0%, rgba(0, 59, 126, 0.08), transparent 55%),
		#f4f7fb;
	font-family: var(--font);
	color: var(--text);
	letter-spacing: 0.01em;
}

/* Global loading overlay */
.app-loading {
	position: fixed;
	inset: 0;
	z-index: 5000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(234, 242, 251, 0.72);
	backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-loading.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.app-loading-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 22px 28px;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(219, 228, 239, 0.95);
	box-shadow: var(--shadow);
	min-width: 160px;
}

.app-loading-spinner {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid rgba(0, 59, 126, 0.18);
	border-top-color: var(--brand-soft);
	border-right-color: var(--accent);
	animation: app-loading-spin 0.75s linear infinite;
}

.app-loading-text {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-muted);
}

@keyframes app-loading-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.app-loading-spinner {
		animation: none;
		border-top-color: var(--brand);
		border-right-color: var(--brand);
	}
	.app-loading {
		transition: none;
	}
}

#calendar-outer-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
}

.calendar-layout-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: center;
	gap: 16px;
}

.calendar-main {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.calendar-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 10px 14px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 59, 126, 0.05);
}

.calendar-hint {
	margin: 0;
	font-size: 0.86rem;
	font-weight: 500;
	color: var(--text-muted);
	line-height: 1.35;
}

.calendar-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-muted);
}

.legend-swatch {
	width: 12px;
	height: 12px;
	border-radius: 4px;
	display: inline-block;
	flex-shrink: 0;
	border: 1px solid rgba(15, 23, 42, 0.08);
}

.legend-swatch--today {
	background: linear-gradient(135deg, #003b7e, #1e4a8a);
}

.legend-swatch--selected {
	background: #48C9B0;
}

.legend-swatch--shared {
	background: #a0c4ff;
}

.legend-swatch--related {
	background:
		repeating-linear-gradient(
			-45deg,
			rgba(71, 85, 105, 0.25),
			rgba(71, 85, 105, 0.25) 2px,
			rgba(71, 85, 105, 0.45) 2px,
			rgba(71, 85, 105, 0.45) 4px
		),
		#e8eef5;
	box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.7);
}

.legend-swatch--weekend {
	background: #f1f5f9;
}

#nav-btns-row,
.actions-rail {
	display: flex;
	flex-direction: column;
	align-items: center;
	align-self: stretch;
	justify-content: flex-start;
	margin-left: 0;
	gap: 18px;
	padding: 14px 12px;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 4px 18px rgba(0, 59, 126, 0.06);
}

.nav-arrows-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.nav-period-label {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.nav-btn {
	font-size: 1.2em;
	background: none;
	border: none;
	cursor: pointer;
	margin: 0;
	transition: color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.13s;
	border-radius: 10px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-btn--prev {
	color: #003b7e;
	background: rgba(0, 59, 126, 0.1);
}

.nav-btn--prev:hover {
	color: #fff;
	background: #003b7e;
	box-shadow: 0 2px 10px rgba(0, 59, 126, 0.28);
	transform: translateY(-1px);
}

.nav-btn--next {
	color: #003b7e;
	background: rgba(13, 148, 136, 0.12);
}

.nav-btn--next:hover {
	color: #fff;
	background: #003b7e;
	box-shadow: 0 2px 10px rgba(13, 148, 136, 0.28);
	transform: translateY(-1px);
}

#calendar-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	align-self: flex-start;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(219, 228, 239, 0.9);
	border-radius: 16px;
	padding: 8px;
	box-shadow: var(--shadow);
}

.calendar-row {
	display: flex;
	flex-direction: row;
	gap: 6px;
	justify-content: center;
	align-items: flex-start;
	padding: 4px;
}

.calendar {
	width: 220px;
	height: auto;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 6px;
	box-shadow: 0 1px 6px rgba(0, 59, 126, 0.05);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	overflow: hidden;
}

.calendar-header {
	text-align: center;
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 0.95em;
	letter-spacing: 0.01em;
	color: var(--brand);
	background: linear-gradient(90deg, #eef5ff 0%, #f6fbfa 100%);
	border-radius: 8px;
	padding: 6px 4px;
}

.calendar-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
	table-layout: fixed;
}

.calendar-table th, .calendar-table td {
	width: 14.28%;
	text-align: center;
	padding: 3px 0;
	font-variant-numeric: tabular-nums;
}

.calendar-table th {
	color: #7b8ba3;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.calendar-table td {
	height: 28px;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s, transform 0.12s;
	font-weight: 500;
	vertical-align: middle;
}

.calendar-table td:hover {
	background: #e8f4ff;
	color: #003b7e;
}

.calendar-table .today {
	background: linear-gradient(135deg, #003b7e 0%, #1e4a8a 100%);
	color: #fff;
	border-radius: 6px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 59, 126, 0.25);
}

.calendar-row.current {
	box-shadow: 0 0 0 1px rgba(0, 59, 126, 0.18);
	border-radius: 14px;
	background: rgba(0, 59, 126, 0.04);
	padding: 6px;
}
