:root {
	--lga-primary: #2563eb;
	--lga-primary-dark: #1d4ed8;
	--lga-bg: #f4f6f9;
	--lga-card: #ffffff;
	--lga-border: #e2e6ec;
	--lga-text: #1f2533;
	--lga-text-muted: #6b7280;
	--lga-danger: #c0392b;
	--lga-radius: 10px;
}

* {
	box-sizing: border-box;
}

body.lga-app {
	margin: 0;
	background: var(--lga-bg);
	color: var(--lga-text);
	font-family: "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ---------- ログイン画面 ---------- */
.lga-login-screen {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
}

.lga-login-box {
	width: 100%;
	max-width: 380px;
	background: var(--lga-card);
	border-radius: var(--lga-radius);
	box-shadow: 0 8px 30px rgba(20, 30, 60, 0.08);
	padding: 2.5em 2em;
}

.lga-brand-logo {
	display: block;
	margin: 0 auto 0.2em;
	max-width: 220px;
	max-height: 70px;
}

.lga-brand-sub {
	margin: 0 0 1.5em;
	text-align: center;
	color: var(--lga-text-muted);
	font-size: 0.9em;
}

.lga-login-box form {
	display: flex;
	flex-direction: column;
	gap: 1.1em;
}

.lga-login-box label {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	font-size: 0.9em;
	color: var(--lga-text-muted);
}

.lga-login-box input {
	padding: 0.7em 0.8em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	font-size: 1em;
}

.lga-login-box button {
	margin-top: 0.5em;
	padding: 0.75em;
	border: none;
	border-radius: 6px;
	background: var(--lga-primary);
	color: #fff;
	font-size: 1em;
	font-weight: bold;
	cursor: pointer;
	transition: background 0.15s ease;
}

.lga-login-box button:hover {
	background: var(--lga-primary-dark);
}

/* ---------- ポータル本体 ---------- */
.lga-shell {
	max-width: 880px;
	margin: 0 auto;
	padding: 1.5em 1em 3em;
}

.lga-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5em;
	padding: 1em 0 1.2em;
	border-bottom: 1px solid var(--lga-border);
	margin-bottom: 1.2em;
}

.lga-header-brand {
	font-size: 1.2em;
	font-weight: bold;
}

.lga-header-logo {
	display: block;
	max-height: 36px;
	max-width: 160px;
}

.lga-header-user {
	font-size: 0.9em;
	color: var(--lga-text-muted);
	display: flex;
	align-items: center;
	gap: 0.8em;
}

.lga-logout {
	color: var(--lga-primary);
	text-decoration: none;
	font-weight: bold;
}

.lga-logout:hover {
	text-decoration: underline;
}

.lga-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-bottom: 1.2em;
}

.lga-tab-btn {
	padding: 0.6em 1.1em;
	border: 1px solid var(--lga-border);
	background: var(--lga-card);
	border-radius: 999px;
	font-size: 0.92em;
	color: var(--lga-text-muted);
	cursor: pointer;
	transition: all 0.15s ease;
}

.lga-tab-btn:hover {
	border-color: var(--lga-primary);
	color: var(--lga-primary);
}

.lga-tab-btn.is-active {
	background: var(--lga-primary);
	border-color: var(--lga-primary);
	color: #fff;
	font-weight: bold;
}

.lga-tab-panel {
	display: none;
	background: var(--lga-card);
	border-radius: var(--lga-radius);
	border: 1px solid var(--lga-border);
	padding: 1.5em;
	box-shadow: 0 2px 10px rgba(20, 30, 60, 0.04);
}

.lga-tab-panel.is-active {
	display: block;
}

.lga-tab-panel h2 {
	margin-top: 0;
	font-size: 1.1em;
}

.lga-tab-panel h2:not(:first-child) {
	margin-top: 1.8em;
	padding-top: 1.2em;
	border-top: 1px solid var(--lga-border);
}

/* ---------- 時計・打刻 ---------- */
.lga-clock {
	max-width: 320px;
	margin: 0 auto 1em;
	padding: 0.2em;
	font-size: 2.4em;
	font-weight: bold;
	text-align: center;
	letter-spacing: 0.05em;
	font-family: "SF Mono", "Consolas", monospace;
	color: var(--lga-text);
}

.lga-punch-box {
	max-width: 360px;
	margin: 0 auto 1.5em;
	padding: 1.5em;
	border: 1px solid var(--lga-border);
	border-radius: var(--lga-radius);
	text-align: center;
	background: #fafbfd;
}

.lga-today {
	font-weight: bold;
	color: var(--lga-text-muted);
}

.lga-btn {
	margin: 0 0.4em;
	padding: 0.7em 1.8em;
	font-size: 1.05em;
	border: none;
	border-radius: 6px;
	background: var(--lga-primary);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

.lga-btn:hover:not(:disabled) {
	background: var(--lga-primary-dark);
}

.lga-btn:disabled {
	background: #c6cbd4;
	cursor: not-allowed;
}

/* ---------- テーブル ---------- */
.lga-history-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.5em;
}

.lga-history-table th,
.lga-history-table td {
	border-bottom: 1px solid var(--lga-border);
	padding: 0.6em 0.7em;
	text-align: left;
	font-size: 0.92em;
}

.lga-history-table th {
	color: var(--lga-text-muted);
	font-weight: 600;
}

.lga-history-table tfoot td {
	font-weight: bold;
	border-bottom: none;
	border-top: 2px solid var(--lga-border);
}

.lga-history-table tr.lga-sat td {
	background: #eaf2fb;
}

.lga-history-table tr.lga-sun td {
	background: #fbeaea;
}

.lga-month-form {
	margin-bottom: 1em;
}

/* ---------- フォーム共通 ---------- */
.lga-request-form,
.lga-password-form {
	max-width: 480px;
	margin: 0.5em 0 1.5em;
	padding: 1.2em;
	border: 1px solid var(--lga-border);
	border-radius: var(--lga-radius);
	display: flex;
	flex-direction: column;
	gap: 0.7em;
	background: #fafbfd;
}

.lga-request-form input,
.lga-request-form textarea,
.lga-password-form input {
	padding: 0.6em 0.7em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	font-size: 0.95em;
	width: 100%;
}

.lga-request-form label,
.lga-password-form label {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	font-size: 0.88em;
	color: var(--lga-text-muted);
}

.lga-request-form button,
.lga-password-form button {
	align-self: flex-start;
	padding: 0.6em 1.4em;
	border: none;
	border-radius: 6px;
	background: var(--lga-primary);
	color: #fff;
	font-weight: bold;
	cursor: pointer;
	transition: background 0.15s ease;
}

.lga-request-form button:hover,
.lga-password-form button:hover {
	background: var(--lga-primary-dark);
}

.lga-approve-btn {
	padding: 0.4em 0.9em;
	margin-right: 0.4em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

.lga-approve-btn[data-decision="approve"] {
	border-color: var(--lga-primary);
	color: var(--lga-primary);
}

.lga-approve-btn[data-decision="reject"] {
	border-color: var(--lga-danger);
	color: var(--lga-danger);
}

.lga-notice {
	color: var(--lga-danger);
	font-size: 0.92em;
}

#lga-request-msg,
#lga-password-msg,
#lga-msg,
#lga-employee-admin-msg {
	min-height: 1.4em;
	font-size: 0.9em;
	color: var(--lga-primary-dark);
}

.lga-withdraw-btn,
.lga-open-correction-btn,
.lga-ga-save-btn {
	padding: 0.4em 0.9em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	background: #fff;
	color: var(--lga-text-muted);
	cursor: pointer;
}

.lga-pending-badge {
	display: inline-block;
	padding: 0.3em 0.7em;
	border-radius: 999px;
	background: #fff3cd;
	color: #8a6300;
	font-size: 0.85em;
	white-space: nowrap;
}

.lga-news-card {
	max-width: 100%;
	margin-bottom: 1em;
	padding: 1.5em;
	border: 1px solid var(--lga-border);
	border-radius: var(--lga-radius);
	background: #fafbfd;
	text-align: center;
}

.lga-news-reminder {
	background: #fff3cd;
	border-color: #f0d77b;
	color: #8a6300;
	font-weight: bold;
}

.lga-news-announcement {
	text-align: left;
}

.lga-news-label {
	margin: 0;
	color: var(--lga-text-muted);
	font-size: 0.9em;
}

.lga-news-value {
	margin: 0.2em 0 0.6em;
	font-size: 2em;
	font-weight: bold;
	color: var(--lga-primary);
}

.lga-news-sub {
	margin: 0.4em 0;
	font-size: 0.88em;
	line-height: 1.6;
}

.lga-news-card .lga-goto-tab {
	margin-top: 1em;
	padding: 0.6em 1.4em;
	border: none;
	border-radius: 6px;
	background: var(--lga-primary);
	color: #fff;
	font-weight: bold;
	cursor: pointer;
}

.lga-news-card .lga-goto-tab:hover {
	background: var(--lga-primary-dark);
}

.lga-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: center;
	margin-bottom: 1em;
	padding: 0.8em;
	background: #fafbfd;
	border: 1px solid var(--lga-border);
	border-radius: 8px;
}

.lga-filter-bar label {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	font-size: 0.85em;
	color: var(--lga-text-muted);
}

select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6em center;
	background-size: 10px 7px;
	padding-right: 2em;
}

.lga-filter-bar select,
.lga-filter-bar input {
	padding: 0.4em;
	padding-right: 2em;
	min-width: 7em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
}

.lga-filter-bar button {
	align-self: flex-end;
	padding: 0.5em 1.2em;
	border: none;
	border-radius: 6px;
	background: var(--lga-primary);
	color: #fff;
	cursor: pointer;
}

.lga-employee-admin-form input,
.lga-employee-admin-form select {
	padding: 0.3em;
	border: 1px solid var(--lga-border);
	border-radius: 4px;
}

.lga-employee-admin-form button {
	padding: 0.35em 0.7em;
	margin-right: 0.3em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

/* ---------- 管理タブ: サブタブ ---------- */
.lga-subtabs {
	display: flex;
	gap: 0.4em;
	margin-bottom: 1.2em;
	border-bottom: 1px solid var(--lga-border);
	padding-bottom: 0.6em;
}

.lga-subtab-btn {
	padding: 0.5em 1em;
	border: 1px solid var(--lga-border);
	background: #fff;
	border-radius: 6px;
	font-size: 0.9em;
	color: var(--lga-text-muted);
	cursor: pointer;
}

.lga-subtab-btn.is-active {
	background: var(--lga-primary);
	border-color: var(--lga-primary);
	color: #fff;
	font-weight: bold;
}

.lga-subtab-panel {
	display: none;
}

.lga-subtab-panel.is-active {
	display: block;
}

.lga-master-textarea {
	width: 100%;
	max-width: 320px;
	padding: 0.6em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	font-family: monospace;
}

/* ---------- 従業員管理テーブル: 横スクロール＋列固定 ---------- */
.lga-table-scroll {
	overflow-x: auto;
	max-width: 100%;
	border: 1px solid var(--lga-border);
	border-radius: 8px;
}

.lga-sticky-table {
	border: none;
	white-space: nowrap;
}

.lga-sticky-col {
	position: sticky;
	background: #fff;
	z-index: 1;
}

.lga-sticky-col-1 {
	left: 0;
	min-width: 110px;
}

.lga-sticky-col-2 {
	left: 110px;
	min-width: 110px;
	box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.12);
}

.lga-employee-actions {
	white-space: nowrap;
}

.lga-sticky-table td,
.lga-sticky-table th {
	min-width: 140px;
}

.lga-sticky-table td select,
.lga-sticky-table td input {
	min-width: 130px;
	width: 100%;
	box-sizing: border-box;
}

.lga-sticky-table .lga-employee-actions {
	min-width: 220px;
}

/* ---------- 権限編集ポップアップ ---------- */
.lga-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(20, 30, 60, 0.45);
	z-index: 100;
	align-items: center;
	justify-content: center;
}

.lga-modal.is-open {
	display: flex;
}

.lga-modal-content {
	background: #fff;
	border-radius: var(--lga-radius);
	padding: 1.8em;
	width: 90%;
	max-width: 420px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.lga-modal-content h3 {
	margin-top: 0;
}

.lga-modal-content label {
	display: block;
	margin-bottom: 0.7em;
	font-size: 0.92em;
}

.lga-modal-content label input[type="text"],
.lga-modal-content label input[type="email"] {
	display: block;
	width: 100%;
	margin-top: 0.3em;
	padding: 0.5em 0.6em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	box-sizing: border-box;
}

.lga-modal-actions {
	margin-top: 1em;
	display: flex;
	gap: 0.6em;
}

.lga-modal-actions button {
	padding: 0.5em 1.2em;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

#lga-permissions-save {
	background: var(--lga-primary);
	color: #fff;
}

#lga-permissions-cancel {
	background: #eee;
}

/* ---------- 総務サブパネル アコーディオン ---------- */
.lga-ga-sec {
	border: 1px solid var(--lga-border);
	border-radius: 8px;
	margin-bottom: 0.7em;
	overflow: hidden;
}

.lga-ga-sec-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.85em 1.2em;
	background: #eef0f4;
	cursor: pointer;
	font-weight: bold;
	font-size: 0.95em;
	user-select: none;
	border: none;
	width: 100%;
	text-align: left;
}

.lga-ga-sec-head:hover {
	background: #e3e6ec;
}

.lga-ga-toggle {
	font-size: 0.75em;
	color: var(--lga-text-muted);
	transition: transform 0.2s;
	display: inline-block;
}

.lga-ga-sec.is-open .lga-ga-toggle {
	transform: rotate(90deg);
}

.lga-ga-sec-body {
	display: none;
	padding: 1.2em;
	border-top: 1px solid var(--lga-border);
}

.lga-ga-sec.is-open .lga-ga-sec-body {
	display: block;
}

/* 賃金設定モーダルの数値入力 */
#lga-wage-modal-content input[type="number"],
.lga-modal-content input[type="number"] {
	display: block;
	width: 100%;
	margin-top: 0.3em;
	padding: 0.5em 0.6em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	box-sizing: border-box;
}

.lga-modal-content select {
	display: block;
	width: 100%;
	margin-top: 0.3em;
	padding: 0.5em 0.6em;
	border: 1px solid var(--lga-border);
	border-radius: 6px;
	box-sizing: border-box;
}
