:root {
	--ttd-sidebar-width: 272px;
	--ttd-bg: #f5f7fb;
	--ttd-surface: #ffffff;
	--ttd-border: #e5e9f0;
	--ttd-text: #172033;
	--ttd-muted: #667085;
	--ttd-accent: #2563eb;
	--ttd-accent-soft: #eef4ff;
	--ttd-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

html {
	box-sizing: border-box;
	background: var(--ttd-bg);
}

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

body.ttd-dashboard-theme {
	min-height: 100vh;
	margin: 0;
	padding-left: var(--ttd-sidebar-width);
	background: var(--ttd-bg);
	color: var(--ttd-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--ttd-accent);
}

.ttd-sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 100;
	width: var(--ttd-sidebar-width);
	height: 100vh;
	overflow-y: auto;
	border-right: 1px solid var(--ttd-border);
	background: var(--ttd-surface);
}

.admin-bar .ttd-sidebar {
	top: 32px;
	height: calc(100vh - 32px);
}

.ttd-sidebar-inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 28px;
	min-height: 100%;
	padding: 28px 20px 22px;
}

.ttd-sidebar-main {
	display: grid;
	gap: 28px;
	align-content: start;
}

.ttd-brand {
	min-height: 42px;
	padding: 0 12px;
}

.ttd-brand .custom-logo-link {
	display: inline-flex;
}

.ttd-brand .custom-logo {
	display: block;
	width: auto;
	max-width: 190px;
	max-height: 56px;
}

.ttd-site-title {
	color: var(--ttd-text);
	font-size: 1.18rem;
	font-weight: 850;
	letter-spacing: -0.03em;
	text-decoration: none;
}

.ttd-sidebar-nav {
	display: grid;
	gap: 5px;
}

.ttd-sidebar-nav a {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	gap: 11px;
	min-height: 45px;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--ttd-text);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.ttd-sidebar-nav a:hover,
.ttd-sidebar-nav a:focus,
.ttd-sidebar-nav a.is-active {
	background: var(--ttd-accent-soft);
	color: var(--ttd-accent);
	outline: none;
}

.ttd-sidebar-nav a.is-active {
	font-weight: 800;
}

.ttd-nav-icon {
	position: relative;
	display: inline-block;
	width: 18px;
	height: 18px;
	color: currentColor;
}

.ttd-nav-icon::before,
.ttd-nav-icon::after {
	content: "";
	position: absolute;
	border: 1.8px solid currentColor;
}

.ttd-nav-icon--grid::before {
	inset: 1px;
	border-radius: 4px;
	box-shadow: inset 7px 0 0 transparent;
}

.ttd-nav-icon--grid::after {
	top: 1px;
	bottom: 1px;
	left: 8px;
	width: 0;
	border-width: 0 0 0 1.8px;
	box-shadow: -7px 7px 0 -6px currentColor;
}

.ttd-nav-icon--folder::before {
	inset: 4px 1px 2px;
	border-radius: 3px;
}

.ttd-nav-icon--folder::after {
	top: 1px;
	left: 3px;
	width: 7px;
	height: 5px;
	border-bottom: 0;
	border-radius: 3px 3px 0 0;
}

.ttd-nav-icon--check::before {
	inset: 1px;
	border-radius: 5px;
}

.ttd-nav-icon--check::after {
	top: 5px;
	left: 5px;
	width: 7px;
	height: 4px;
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}

.ttd-nav-icon--board::before {
	inset: 1px;
	border-radius: 4px;
}

.ttd-nav-icon--board::after {
	top: 3px;
	bottom: 3px;
	left: 6px;
	width: 4px;
	border-width: 0 1.8px;
}

.ttd-nav-icon--file::before {
	inset: 1px 3px;
	border-radius: 3px;
}

.ttd-nav-icon--file::after {
	right: 3px;
	top: 1px;
	width: 6px;
	height: 6px;
	border-width: 0 0 1.8px 1.8px;
}


.ttd-nav-icon--mobile::before {
	inset: 0 4px;
	border-radius: 4px;
}

.ttd-nav-icon--mobile::after {
	left: 8px;
	bottom: 3px;
	width: 2px;
	height: 2px;
	border: 0;
	border-radius: 50%;
	background: currentColor;
}

.ttd-nav-icon--bell::before {
	inset: 2px 3px 4px;
	border-radius: 9px 9px 5px 5px;
}

.ttd-nav-icon--bell::after {
	bottom: 0;
	left: 7px;
	width: 4px;
	height: 2px;
	border-width: 0 0 1.8px;
}

.ttd-nav-icon--gear::before {
	inset: 2px;
	border-radius: 50%;
}

.ttd-nav-icon--gear::after {
	inset: 6px;
	border-radius: 50%;
}

.ttd-nav-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ttd-accent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
}

.ttd-sidebar-bottom {
	display: grid;
	gap: 14px;
	padding-top: 18px;
	border-top: 1px solid var(--ttd-border);
}

.ttd-user-card {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.ttd-user-avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 14px;
}

.ttd-user-card > div {
	display: grid;
	min-width: 0;
	gap: 2px;
}

.ttd-user-card strong,
.ttd-user-card span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ttd-user-card strong {
	font-size: 0.88rem;
}

.ttd-user-card span {
	color: var(--ttd-muted);
	font-size: 0.72rem;
}

.ttd-sidebar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
}

.ttd-sidebar-actions a {
	color: var(--ttd-muted);
	font-size: 0.8rem;
	text-decoration: none;
}

.ttd-menu-toggle {
	display: none;
}

.ttd-main {
	min-width: 0;
	min-height: 100vh;
}

.ttd-content {
	width: 100%;
}

.ttd-content--app {
	min-height: 100vh;
}

.ttd-content--page {
	padding: clamp(24px, 4vw, 48px);
}

.ttd-page-card {
	width: min(100%, 1080px);
	padding: clamp(24px, 4vw, 44px);
	border: 1px solid var(--ttd-border);
	border-radius: 20px;
	background: var(--ttd-surface);
	box-shadow: var(--ttd-shadow);
}

.ttd-entry-header h1 {
	margin: 0 0 24px;
	font-size: clamp(1.8rem, 3vw, 2.7rem);
	line-height: 1.15;
	letter-spacing: -0.04em;
}

.ttd-entry-header a {
	color: inherit;
	text-decoration: none;
}

.ttd-entry-content {
	line-height: 1.8;
}

.ttd-entry-content > *:first-child {
	margin-top: 0;
}

.ttd-entry-content > *:last-child {
	margin-bottom: 0;
}

.ttd-entry-content img {
	max-width: 100%;
	height: auto;
}

.ttd-content--login {
	display: grid;
	place-items: center;
	min-height: 100vh;
	padding: 32px;
}

.ttd-login-card {
	width: min(100%, 460px);
	padding: 34px;
	border: 1px solid var(--ttd-border);
	border-radius: 22px;
	background: var(--ttd-surface);
	box-shadow: var(--ttd-shadow);
}

.ttd-login-head {
	margin-bottom: 24px;
}

.ttd-login-head p {
	margin: 0 0 7px;
	color: var(--ttd-accent);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ttd-login-head h1 {
	margin: 0;
	font-size: 2rem;
	letter-spacing: -0.04em;
}

.ttd-login-card form {
	display: grid;
	gap: 16px;
}

.ttd-login-card form p {
	display: grid;
	gap: 7px;
	margin: 0;
}

.ttd-login-card label {
	color: var(--ttd-text);
	font-size: 0.85rem;
	font-weight: 700;
}

.ttd-login-card input[type="text"],
.ttd-login-card input[type="password"] {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #d7dde7;
	border-radius: 11px;
	background: #fff;
	font: inherit;
	outline: none;
}

.ttd-login-card input[type="text"]:focus,
.ttd-login-card input[type="password"]:focus {
	border-color: var(--ttd-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ttd-login-card .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}

.ttd-login-card input[type="submit"] {
	width: 100%;
	min-height: 46px;
	border: 0;
	border-radius: 11px;
	background: var(--ttd-accent);
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 860px) {
	body.ttd-dashboard-theme {
		padding-left: 0;
	}

	.ttd-sidebar {
		position: relative;
		width: 100%;
		height: auto;
		min-height: 72px;
		overflow: visible;
		border-right: 0;
		border-bottom: 1px solid var(--ttd-border);
	}

	.admin-bar .ttd-sidebar {
		top: 0;
		height: auto;
	}

	.ttd-sidebar-inner {
		position: relative;
		display: block;
		min-height: 72px;
		padding: 15px 16px;
	}

	.ttd-sidebar-main {
		display: block;
	}

	.ttd-brand {
		display: flex;
		align-items: center;
		min-height: 42px;
		padding-right: 58px;
		padding-left: 0;
	}

	.ttd-menu-toggle {
		position: absolute;
		top: 17px;
		right: 16px;
		display: inline-grid;
		place-items: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 1px solid var(--ttd-border);
		border-radius: 11px;
		background: #fff;
		color: var(--ttd-text);
		font-size: 1.25rem;
		cursor: pointer;
	}

	.ttd-sidebar-nav,
	.ttd-sidebar-bottom {
		display: none;
	}

	.ttd-sidebar.is-menu-open .ttd-sidebar-nav,
	.ttd-sidebar.is-menu-open .ttd-sidebar-bottom {
		display: grid;
	}

	.ttd-sidebar-nav {
		margin-top: 14px;
	}

	.ttd-sidebar-bottom {
		margin-top: 16px;
	}

	.ttd-content--page,
	.ttd-content--login {
		padding: 22px 16px 40px;
	}

	.ttd-page-card {
		padding: 22px;
		border-radius: 16px;
	}
}

@media (max-width: 782px) {
	.admin-bar .ttd-sidebar {
		top: 0;
	}
}
