/* =========================================================
   月謝報告システム 共通CSS
   保存先のおすすめ:
   reports/static/reports/css/app.css
   ========================================================= */

/* ---------- 共通 ---------- */
:root {
    --teacher-bg: #fffee0;
    --admin-bg: #e0ffff;
    --detail-bg: #f5f6f8;

    --surface: #ffffff;
    --text: #333333;
    --muted: #666666;
    --border: #d9dee3;

    --primary: #4169e1;
    --primary-soft: #eaf2ff;
    --primary-text: #315c9b;

    --success-bg: #e7f5ea;
    --success-text: #26723b;

    --warning-bg: #fff8e6;
    --warning-border: #e6b94c;

    --danger-bg: #fff0f0;
    --danger-border: #e1a4a4;
    --danger-text: #8c2828;

    --submit: #ffb31a;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--text);
    font-family: sans-serif;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   ログイン
   body class="page-login"
   ========================================================= */
.page-login {
    margin: 0;
    padding: 20px;
    background: var(--teacher-bg);
}

.page-login .login-box {
    max-width: 420px;
    margin: 60px auto;
    padding: 30px;
    background: var(--surface);
    border-radius: 12px;
}

.page-login h1 {
    margin-bottom: 30px;
    text-align: center;
}

.page-login label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
}

.page-login input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
}

.page-login button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.page-login .b_send {
    background: var(--submit);
}

.page-login .error {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--danger-bg);
    border: 1px solid #e3a4a4;
    border-radius: 8px;
}

/* ログイン画面：教室名 */

.page-login .login-brand {
    margin-bottom: 28px;
    text-align: center;
}

.page-login .brand-name {
    margin-bottom: 5px;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.22em;

    color: #6c7a86;
}

.page-login .login-brand h1 {
    margin: 0;

    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.08em;

    color: #2f4050;
}



/* =========================================================
   個人ページ
   ========================================================= */

.page-mypage {
    margin: 0;
    background: var(--teacher-bg);
    color: var(--text);
}

.page-mypage .mypage-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 25px 18px 50px;
}


/* 上部 */

.page-mypage .mypage-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.page-mypage .mypage-top h1 {
    margin: 0 0 5px;
    padding: 0;
    font-size: 25px;
}

.page-mypage .user-id {
    margin: 0;
    padding: 0;
    color: #666;
    font-size: 14px;
}

.page-mypage .logout-button {
    flex-shrink: 0;
    padding: 9px 14px;
    background: #ffffff;
    color: #555;
    border: 1px solid #cccccc;
    border-radius: 8px;
    text-decoration: none;
}


/* 新規入力 */

.page-mypage .new-report-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dedecb;
    border-radius: 12px;
}

.page-mypage .new-report-card h2 {
    margin: 0 0 5px;
    padding: 0;
}

.page-mypage .new-report-card p {
    margin: 0;
    padding: 0;
    color: #666;
}

.page-mypage .b-new {
    display: inline-block;
    flex-shrink: 0;
    padding: 12px 22px;

    background-color: var(--submit);
    color: #333333;

    border: 1px solid #e5a000;
    border-radius: 9px;

    font-weight: bold;
    text-decoration: none;

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.page-mypage .b-new:hover {
    opacity: 0.85;
}

.page-mypage .school-info,
.page-mypage .remarks-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8fbfd;
    border: 1px solid #d9e5ec;
    border-radius: 8px;
}

.page-mypage .school-info h4,
.page-mypage .remarks-info h4 {
    margin: 0 0 10px;
}

.page-mypage .school-info p,
.page-mypage .remarks-info p {
    margin: 5px 0;
}

.page-mypage .mypage-report-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 15px;
    padding: 18px 20px;

    background: #ffffff;
    border: 1px solid #d7e1e5;
    border-radius: 10px;
}

.page-mypage .mypage-report-info h3 {
    margin: 0 0 8px;
}

.page-mypage .mypage-report-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.page-mypage .mypage-report-total span {
    font-size: 14px;
    color: #666666;
}

.page-mypage .mypage-report-total strong {
    font-size: 20px;
}

.page-mypage .detail-button {
    display: inline-block;
    padding: 9px 14px;

    background: #eaf2ff;
    color: #315c9b;

    border: 1px solid #bfd0e6;
    border-radius: 8px;

    text-decoration: none;
    font-weight: bold;

    flex-shrink: 0;
}

.page-mypage .detail-button:hover {
    background: #dceaff;
}

/* 送信済み */

.page-mypage .submitted-title {
    margin: 35px 0 15px;
    padding: 0;
}

.page-mypage .mypage-report-card {
    margin-bottom: 18px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dedecb;
    border-radius: 12px;
}

.page-mypage .report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eeeeee;
}

.page-mypage .report-header h3 {
    margin: 0;
    padding: 0;
}

.page-mypage .report-total {
    flex-shrink: 0;
    min-width: 130px;
    padding: 10px 14px;
    background: #fff3b8;
    border: 1px solid #e8d06c;
    border-radius: 8px;
    text-align: right;
}

.page-mypage .report-total span {
    display: block;
    margin-bottom: 3px;
    color: #666666;
    font-size: 13px;
    font-weight: normal;
}

.page-mypage .report-total strong {
    display: block;
    color: #333333;
    font-size: 18px;
    font-weight: bold;
}

.page-mypage .submitted-date {
    margin: 12px 0 18px;
    padding: 0;
    color: #777;
    font-size: 13px;
}


/* 内訳 */

.page-mypage .report-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    padding: 15px;
    background: #f0faff;
    border: 1px solid #d9edf7;
    border-radius: 8px;
}

.page-mypage .report-details p {
    margin: 0;
    padding: 0;
}

.page-mypage .report-details strong {
    font-weight: bold;
}

/* その他 */

.page-mypage .other-items {
    margin-top: 15px;
    padding: 15px;
    background: #f5fbff;
    border-radius: 8px;
}

.page-mypage .other-items hr {
    border-color: #add8e6;
}

.page-mypage .other-items h4 {
    margin: 0 0 10px;
    padding: 0;
}

.page-mypage .other-item {
    padding: 8px 0;
    border-bottom: 1px solid #dde7ed;
}

.page-mypage .other-item:last-child {
    border-bottom: none;
}

.page-mypage .other-item p {
    margin: 3px 0;
    padding: 0;
}




/* コンクール */

.page-mypage .contest-info {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff8e6;
    border-radius: 8px;
}

.page-mypage .contest-info p {
    margin: 5px 0;
    padding: 0;
}


/* データなし */

.page-mypage .empty-report {
    padding: 25px;
    background: #ffffff;
    border: 1px solid #dedecb;
    border-radius: 12px;
    text-align: center;
    color: #666;
}

/* =========================================================
   報告入力
   body class="page-report-form"
   ========================================================= */
.page-report-form {
    margin: 0;
    background: var(--teacher-bg);
}

.page-report-form .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.page-report-form .card {
    margin-bottom: 16px;
    padding: 5px 20px 20px;
    background: #f6feff;
    border-radius: 12px;
}

.page-report-form .err_card {
    margin-bottom: 16px;
    padding: 5px 20px 20px;
    background: #ff9e66;
    border-radius: 12px;
}

.page-report-form h1 {
    font-size: 24px;
}

.page-report-form .money-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    font-size: 18px;
}

.page-report-form input[type="number"] {
    width: 70px;
    padding: 10px;
    font-size: 18px;
}

.page-report-form input[type="text"] {
    max-width: 100%;
    padding: 9px;
}

.page-report-form select {
    padding: 8px;
    font-size: 16px;
}

.page-report-form .result {
    font-weight: bold;
}

.page-report-form .total {
    font-size: 26px;
    font-weight: bold;
}

.page-report-form button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #e0ffe0;
    font-size: 18px;
    cursor: pointer;
}

.page-report-form .b_send {
    background: var(--submit);
}

.page-report-form .err {
    background: red;
}

.page-report-form .form-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.page-report-form .back-button {
    display: inline-block;
    padding: 8px 12px;
    background: #ffffff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-report-form .back-button:hover {
    background: #f3f7fa;
}

.page-report-form input[type="number"].other-amount-input {
    width: 130px;
    min-width: 130px;
}

.page-report-form .school-count-row {
    display: grid;
    grid-template-columns: 1fr 80px 30px;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.page-report-form .school-count-row input {
    width: 80px;
}

.page-report-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    resize: vertical;
    font-size: 16px;
}

/* =========================================================
   報告管理
   body class="page-report-admin"
   ========================================================= */
.page-report-admin {
    margin: 0;
    padding: 0;
    background: var(--admin-bg);
}

.page-report-admin .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px;
}

.page-report-admin h1 {
    margin-bottom: 10px;
}

.page-report-admin h2 {
    margin-top: 0;
}

.page-report-admin .admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 25px;
}

.page-report-admin .menu-button,
.page-report-admin .logout-button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}

.page-report-admin .menu-button {
    background: var(--primary);
    color: #ffffff;
}

.page-report-admin .logout-button {
    background: #eeeeee;
    color: #444444;
    border: 1px solid #cccccc;
}

.page-report-admin .card {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid #c8dddd;
    border-radius: 12px;
}

.page-report-admin .filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 15px;
}

.page-report-admin .filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.page-report-admin select {
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid #bbbbbb;
    border-radius: 7px;
    font-size: 15px;
}

.page-report-admin .filter-button {
    padding: 9px 20px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    cursor: pointer;
}

.page-report-admin .summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.page-report-admin .summary-item {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    background: #f5fbff;
    border: 1px solid #c7dce8;
    border-radius: 10px;
}

.page-report-admin .summary-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 14px;
}

.page-report-admin .summary-item strong {
    font-size: 22px;
}

.page-report-admin .unsubmitted {
    margin-top: 15px;
    padding: 15px;
    background: var(--warning-bg);
    border-left: 5px solid var(--warning-border);
    border-radius: 6px;
}

.page-report-admin .unsubmitted h3 {
    margin-top: 0;
}

.page-report-admin .report-card {
    margin-bottom: 15px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid #c8dddd;
    border-radius: 12px;
}

.page-report-admin .report-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.page-report-admin .report-meta {
    color: var(--muted);
    font-size: 14px;
}

.page-report-admin .report-total {
    font-size: 18px;
}

.page-report-admin .detail-button {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 14px;
    background: var(--primary-soft);
    color: var(--primary-text);
    border-radius: 7px;
    font-weight: bold;
    text-decoration: none;
}

.page-report-admin .teacher-status-card {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #c8dddd;
    border-radius: 12px;
}

.page-report-admin .teacher-status-card h2 {
    margin-bottom: 15px;
}

.page-report-admin .teacher-status-list {
    border: 1px solid #d9e2e8;
    border-radius: 8px;
    overflow: hidden;
}

.page-report-admin .teacher-status-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    align-items: center;
    gap: 10px;

    padding: 12px 15px;

    border-bottom: 1px solid #e1e5e8;
}

.page-report-admin .teacher-status-row:last-child {
    border-bottom: none;
}

.page-report-admin .teacher-status-row:nth-child(even) {
    background: #f8fbfd;
}

.page-report-admin .teacher-name {
    font-weight: bold;
}

.page-report-admin .teacher-amount {
    text-align: right;
    font-weight: bold;
}

.page-report-admin .teacher-detail {
    text-align: right;
}

.page-report-admin .status-submitted {
    display: inline-block;
    padding: 4px 9px;
    background: #e7f5ea;
    color: #26723b;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.page-report-admin .status-unsubmitted {
    display: inline-block;
    padding: 4px 9px;
    background: #fff0e8;
    color: #a04b20;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.page-report-admin .statement-button {
    display: inline-block;
    margin-top: 5px;
    margin-left: 6px;
    padding: 8px 14px;

    background: #fff3c4;
    color: #6b5400;

    border: 1px solid #e0c76a;
    border-radius: 7px;

    font-weight: bold;
    text-decoration: none;
}

.page-report-admin .statement-button:hover {
    background: #ffeaa0;
}

.page-report-admin .report-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* =========================================================
   報告詳細
   body class="page-report-detail"
   ========================================================= */
.page-report-detail {
    margin: 0;
    padding: 30px;
    background: var(--detail-bg);
}

.page-report-detail .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: var(--surface);
    border-radius: 8px;
}

.page-report-detail h1 {
    padding-bottom: 10px;
    border-bottom: 3px solid #5b8db8;
}

.page-report-detail h2 {
    margin-top: 30px;
    padding: 8px 12px;
    background: #eaf2f8;
    border-left: 5px solid #5b8db8;
    font-size: 18px;
}

.page-report-detail table {
    width: 100%;
    margin: 15px 0 25px;
    border-collapse: collapse;
}

.page-report-detail th {
    padding: 10px;
    background: #eaf2f8;
    border: 1px solid #bfc8d0;
    text-align: center;
}

.page-report-detail td {
    padding: 10px;
    border: 1px solid #d4d9dd;
}

.page-report-detail td.number {
    text-align: left;
}

.page-report-detail tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.page-report-detail .contest {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fafafa;
    border: 1px solid #d4d9dd;
}

.page-report-detail .contest p {
    margin: 7px 0;
}

.page-report-detail .contest-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 12px 15px;
    background: #eaf8ec;
    border-radius: 4px;
}

.page-report-detail .contest-amount strong {
    font-size: 22px;
}

.page-report-detail .total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 22px 25px;
    background: #fff4d6;
    border: 2px solid #e6b94c;
    border-radius: 8px;
    font-size: 18px;
}

.page-report-detail .total strong {
    font-size: 30px;
}

.page-report-detail .submitted {
    color: var(--muted);
    font-size: 14px;
}

.page-report-detail .back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 12px;
    background: #fff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-report-detail .back-button:hover {
    background-color: #f3f7fa;
}

.page-report-detail .remarks-box {
    padding: 15px 20px;
    background: #fafafa;
    border: 1px solid #d4d9dd;
    border-radius: 6px;
    line-height: 1.7;
}

.page-report-form .form-note {
    margin-top: -5px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #777;
}
.page-report-detail .detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-report-detail .detail-actions .back-button {
    margin-top: 0;
}

.page-report-detail .edit-button {
    display: inline-block;
    padding: 8px 14px;
    background: #4169e1;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-report-detail .edit-button:hover {
    opacity: 0.85;
}

.page-report-detail .delete-link {
	display: inline-block;
	padding: 8px 14px;
	background: #fff0f0;
	color: #a52a2a;
	border: 1px solid #d9a0a0;
	border-radius: 8px;
	text-decoration: none;
	font-weight: bold;
}

.page-report-detail .delete-link:hover {
	background: #ffe1e1;
}

/* =========================================================
   管理者詳細：金額内訳
   ========================================================= */

.page-report-detail .total-breakdown {
    margin-top: 30px;
    padding: 20px 22px;
    background: #f7f8fa;
    border-radius: 10px;
}


/* 内訳 */
.page-report-detail .total-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 4px;
    border-bottom: 1px solid #dddddd;
}

.page-report-detail .total-breakdown-row:last-of-type {
    border-bottom: none;
}

.page-report-detail .total-breakdown-row span {
    color: #555555;
}

.page-report-detail .total-breakdown-row strong {
    font-size: 18px;
    color: #333333;
}


/* 総合計だけ強調 */
.page-report-detail .total-breakdown-final {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 18px;
    padding: 18px 20px;

    background: #fff3c4;
    border: 2px solid #e6b94c;
    border-radius: 9px;

    font-size: 20px;
    font-weight: bold;
}

.page-report-detail .total-breakdown-final strong {
    font-size: 30px;
    color: #333333;
}

/* =========================================================
   ユーザー管理
   body class="page-user-admin"
   ========================================================= */
.page-user-admin {
    margin: 0;
    background: var(--admin-bg);
}

.page-user-admin .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px;
}

.page-user-admin .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.page-user-admin h1 {
    margin: 0;
}

.page-user-admin .back-link {
    display: inline-block;
    padding: 8px 12px;
    background: #ffffff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-user-admin .back-link:hover {
    background: #f3f7fa;
}

.page-user-admin .card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.page-user-admin table {
    width: 100%;
    border-collapse: collapse;
}

.page-user-admin th {
    padding: 13px 12px;
    background: #eaf2f8;
    border-bottom: 1px solid #c6d1da;
    text-align: left;
}

.page-user-admin td {
    padding: 14px 12px;
    border-bottom: 1px solid #e1e5e8;
}

.page-user-admin tbody tr:last-child td {
    border-bottom: none;
}

.page-user-admin tbody tr:nth-child(even) {
    background: #fafbfc;
}

.page-user-admin .username {
    font-family: monospace;
}

.page-user-admin .badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.page-user-admin .active {
    background: var(--success-bg);
    color: var(--success-text);
}

.page-user-admin .inactive {
    background: #eeeeee;
    color: #666666;
}

.page-user-admin .user-inactive td {
    background-color: #e1e3e5;
    color: #888888;
}

.page-user-admin .user-inactive td:not(:last-child) {
    opacity: 0.75;
}

.page-user-admin .inactive .username{
    color: #888;
}

.page-user-admin .inactive .actions a {
    color :#777;
}

.page-user-admin .admin {
    background: #fff1d6;
    color: #8a5c00;
}

.page-user-admin .teacher {
    background: #eaf2f8;
    color: #365f7d;
}

.page-user-admin .actions a {
    display: inline-block;
    margin-right: 8px;
    color: #356d99;
    text-decoration: none;
}

.page-user-admin .add-button {
    display: inline-block;
    padding: 10px 16px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 7px;
    text-decoration: none;
}


/* =========================================================
   ユーザー追加
   body class="page-user-create"
   ========================================================= */
.page-user-create {
    margin: 0;
    background: var(--admin-bg);
}

.page-user-create .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.page-user-create .header {
    margin-bottom: 20px;
}

.page-user-create .header a {
    color: #456b8c;
    text-decoration: none;
}

.page-user-create .card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.page-user-create h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.page-user-create .description {
    margin-bottom: 25px;
    color: var(--muted);
}

.page-user-create .field {
    margin-bottom: 20px;
}

.page-user-create label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.page-user-create input {
    width: 100%;
    padding: 12px;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    font-size: 16px;
}

.page-user-create input:focus {
    outline: 2px solid #7fa6c4;
    border-color: #7fa6c4;
}

.page-user-create .help {
    margin-top: 6px;
    color: #777777;
    font-size: 13px;
}

.page-user-create .error {
    margin-bottom: 20px;
    padding: 12px 15px;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    border-radius: 8px;
}

.page-user-create .buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.page-user-create .submit-button {
    flex: 1;
    padding: 14px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.page-user-create .cancel-button {
    flex: 1;
    padding: 14px;
    background: var(--surface);
    color: #444444;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
}

.page-user-create .back-button {
    display: inline-block;
    padding: 8px 12px;
    background: #ffffff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-user-create .back-button:hover {
    background: #f3f7fa;
}

/* =========================================================
   ユーザー編集
   body class="page-user-edit"
   ========================================================= */

.page-user-edit {
    margin: 0;
    background: var(--admin-bg);
}

.page-user-edit .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.page-user-edit .header {
    margin-bottom: 25px;
}

.page-user-edit .card {
    margin-top: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.page-user-edit h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.page-user-edit .description {
    margin-bottom: 25px;
    color: var(--muted);
}

.page-user-edit .field {
    margin-bottom: 20px;
}

.page-user-edit label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.page-user-edit input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    font-size: 16px;
}

.page-user-edit input[type="text"]:focus {
    outline: 2px solid #7fa6c4;
    border-color: #7fa6c4;
}

.page-user-edit .help {
    margin-top: 6px;
    color: #777777;
    font-size: 13px;
}

.page-user-edit .error {
    margin-bottom: 20px;
    padding: 12px 15px;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    border-radius: 8px;
}

.page-user-edit .active-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.page-user-edit .active-check input {
    width: auto;
}

.page-user-edit .buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.page-user-edit .submit-button {
    flex: 1;
    padding: 14px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.page-user-edit .cancel-button {
    flex: 1;
    padding: 14px;
    background: var(--surface);
    color: #444444;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
}

.page-user-edit .back-button {
    display: inline-block;
    padding: 8px 12px;
    background: #ffffff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.page-user-edit .back-button:hover {
    background: #f3f7fa;
}

.page-user-edit .password-box {
    margin-top: 30px;
    padding: 20px;
    background: #fff8e6;
    border: 1px solid #e6c46a;
    border-radius: 10px;
}

.page-user-edit .password-box h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.page-user-edit .password-note {
    margin-top: 0;
    margin-bottom: 20px;
    color: #666666;
    font-size: 14px;
}

/* =========================================================
   報告削除確認
   ========================================================= */

.page-report-delete {
	margin: 0;
	padding: 20px;
	background: var(--admin-bg);
}

.page-report-delete .delete-container {
	max-width: 600px;
	margin: 40px auto;
}

.page-report-delete .delete-card {
	padding: 25px;
	background: #ffffff;
	border: 1px solid #e0b2b2;
	border-radius: 12px;
}

.page-report-delete h1 {
	margin-top: 0;
}

.page-report-delete .delete-warning {
	font-size: 18px;
	font-weight: bold;
}

.page-report-delete .delete-target {
	margin: 20px 0;
	padding: 15px;
	background: #f8f8f8;
	border-radius: 8px;
}

.page-report-delete .delete-note {
	color: #a52a2a;
	font-weight: bold;
}

.page-report-delete .delete-actions {
	display: flex;
	gap: 12px;
	margin-top: 25px;
}

.page-report-delete .cancel-button,
.page-report-delete .delete-button {
	flex: 1;
	padding: 12px;
	border-radius: 8px;
	text-align: center;
	font-weight: bold;
}

.page-report-delete .cancel-button {
	background: #ffffff;
	color: #444444;
	border: 1px solid #bfc7ce;
	text-decoration: none;
}

.page-report-delete .delete-button {
	background: #c94242;
	color: #ffffff;
	border: none;
	cursor: pointer;
}

/* =========================================================
   給与明細
   body class="page-report-statement"
   ========================================================= */
.page-report-statement {
    margin: 0;
    padding: 25px;
    background: var(--admin-bg);
}

.page-report-statement .statement-container {
    max-width: 760px;
    margin: 0 auto;
}


/* 上の操作ボタン */
.page-report-statement .statement-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.page-report-statement .back-button,
.page-report-statement .print-button {
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.page-report-statement .back-button {
    background: #ffffff;
    color: #456b8c;
    border: 1px solid #bfc7ce;
    text-decoration: none;
}

.page-report-statement .print-button {
    background: #4169e1;
    color: #ffffff;
    border: none;
}


/* 明細用紙 */
.page-report-statement .statement-sheet {
    padding: 40px 45px;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}


/* ヘッダー */
.page-report-statement .statement-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 35px;
}

.page-report-statement .statement-teacher {
    padding: 0 15px 4px;
    border-bottom: 2px solid #444444;
    font-size: 18px;
}

.page-report-statement .statement-teacher strong {
    margin-right: 8px;
    font-size: 24px;
}

.page-report-statement .statement-header h1 {
    margin: 0;
    padding: 0 15px 4px;
    border-bottom: 3px solid #444444;
    font-size: 25px;
}


/* 各項目 */
.page-report-statement .statement-section {
    margin-bottom: 30px;
}

.page-report-statement .statement-section h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.page-report-statement .section-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border: 1px solid #555555;
    border-radius: 50%;

    font-size: 17px;
}


/* A 月謝 */
.page-report-statement .statement-table {
    width: 100%;
    border-collapse: collapse;
}

.page-report-statement .statement-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #777777;
    text-align: right;
}

.page-report-statement .statement-table td:first-child {
    text-align: left;
}

.page-report-statement .statement-table td:last-child {
    min-width: 100px;
    font-weight: bold;
}


/* 一行計算 */
.page-report-statement .statement-calc-row {
    display: grid;
    grid-template-columns:
        minmax(90px, 1fr)
        30px
        minmax(70px, 1fr)
        30px
        minmax(100px, 1fr);

    align-items: center;
    gap: 5px;

    padding: 8px 10px;

    border-bottom: 1px solid #777777;

    text-align: right;
}


/* 小計 */
.page-report-statement .statement-subtotal {
    display: flex;
    justify-content: flex-end;
    gap: 30px;

    margin: 4px 0 0 auto;
    padding: 6px 12px;

    width: 240px;

    border: 2px solid #555555;
}

.page-report-statement .statement-subtotal strong {
    min-width: 100px;
    text-align: right;
}


/* 注記 */
.page-report-statement .statement-note {
    margin: 6px 0;
    color: #777777;
    font-size: 12px;
}


/* 最終計算内訳 */
.page-report-statement .statement-summary {
    margin: 35px 0 25px;
    padding: 16px 20px;

    background: #f7f8fa;
    border-radius: 8px;
}

.page-report-statement .statement-summary-row,
.page-report-statement .statement-other-total {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding: 6px 0;
}

.page-report-statement .statement-other {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #cccccc;
}

.page-report-statement .statement-other-title {
    margin-bottom: 3px;
    font-weight: bold;
}

.page-report-statement .statement-other-total {
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid #cccccc;
}


/* 最終給与 */
.page-report-statement .statement-final {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    margin: 35px 25px;
    padding: 15px 20px;

    border-bottom: 4px double #333333;

    font-size: 25px;
    font-weight: bold;
}

.page-report-statement .statement-final strong {
    font-size: 34px;
}


/* 下部 */
.page-report-statement .statement-footer {
    margin: 25px auto 0;
    padding: 10px 18px;

    border: 2px solid #333333;
    border-radius: 6px;

    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 700px) {
    .page-user-admin .container {
        padding: 12px;
    }

    .page-user-admin .header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-user-admin .card {
        overflow-x: auto;
    }

    .page-user-admin table {
        min-width: 700px;
    }
}

@media (max-width: 600px) {
    .page-report-admin .container {
        padding: 12px;
    }

    .page-report-admin .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .page-report-admin .filter-item,
    .page-report-admin .filter-item select,
    .page-report-admin .filter-button {
        width: 100%;
    }

    .page-report-admin .summary {
        flex-direction: column;
    }

    .page-report-admin .summary-item {
        min-width: 0;
    }

    .page-report-admin .card,
    .page-report-admin .report-card {
        padding: 15px;
    }

    .page-report-detail {
        padding: 10px;
    }

    .page-report-detail .container {
        padding: 15px;
    }

    .page-report-detail th,
    .page-report-detail td {
        padding: 7px 5px;
        font-size: 14px;
    }

    .page-report-detail .total {
        gap: 10px;
    }

    .page-report-detail .total strong {
        font-size: 26px;
    }   

    .page-report-form .container {
        padding: 12px;
    }

    .page-report-form .money-row {
        flex-wrap: wrap;
    }

    .page-mypage > * {
        max-width: 100%;
    }
}

@media (max-width: 500px) {
    .page-user-create .container {
        padding: 12px;
    }

    .page-user-create .card {
        padding: 18px;
    }

    .page-user-create .buttons {
        flex-direction: column;
    }

    .page-login {
        padding: 12px;
    }

    .page-login .login-box {
        margin: 30px auto;
        padding: 22px;
    }
}

@media (max-width: 500px) {

    .page-user-edit .container {
        padding: 12px;
    }

    .page-user-edit .card {
        padding: 18px;
    }

    .page-user-edit .buttons {
        flex-direction: column;
    }
}

@media (max-width: 600px) {

    .page-mypage .mypage-container {
        padding: 18px 12px 40px;
    }

    .page-mypage .mypage-top {
        align-items: flex-start;
    }

    .page-mypage .mypage-top h1 {
        font-size: 21px;
    }

    .page-mypage .new-report-card {
        flex-direction: column;
        align-items: stretch;
    }

    .page-mypage .b-new {
        text-align: center;
    }

    .page-mypage .report-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-mypage .report-details {
        grid-template-columns: 1fr;
    }

    .page-mypage .mypage-report-card {
        padding: 16px;
    }
}

@media (max-width: 600px) {

    .page-report-admin .teacher-status-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .page-report-admin .teacher-amount,
    .page-report-admin .teacher-detail {
        text-align: left;
    }
}

@media print {

    @page {
        size: A4 portrait;
        margin: 6mm 12mm;
    }

    .page-report-statement {
        margin: 0;
        padding: 0;
        background: #ffffff;
        /* フォントサイズ */
        font-size: 16px;
    }

    .page-report-statement .statement-actions {
        display: none;
    }

    .page-report-statement .statement-container {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .page-report-statement .statement-sheet {
        /*padding: 5mm 7mm;*/
        padding: 4mm 3mm;
        border: none;
        box-shadow: none;
    }

    .page-report-statement .statement-header {
        margin-bottom: 10px;
    }

    .page-report-statement .statement-header h1 {
        font-size: 22px;
    }

    .page-report-statement .statement-teacher {
        font-size: 15px;
    }

    .page-report-statement .statement-teacher strong {
        font-size: 20px;
    }

    .page-report-statement .statement-section {
        margin-bottom: 8px;
        break-inside: avoid;
    }

    .page-report-statement .statement-section h2 {
        margin: 0 0 2px;
        font-size: 17px;
    }

    .page-report-statement .statement-table td {
        padding: 1px 5px;
        font-size: 14px;
        line-height: 1.25;
    }

    .page-report-statement .statement-calc-row {
        padding: 3px 6px;
        font-size: 14px;
    }

    .page-report-statement .statement-subtotal {
        width: 220px;
        padding: 2px 8px;
        font-size: 14px;
    }

    .page-report-statement .statement-note {
        margin: 2px 0;
        font-size: 11px;
    }

    .page-report-statement .statement-summary {
        margin: 8px 0;
        padding: 6px 12px;
    }

    .page-report-statement .statement-summary-row,
    .page-report-statement .statement-other-total {
        padding: 2px 0;
        font-size: 14px;
    }

    .page-report-statement .statement-final {
        margin: 10px 5px;
        padding: 6px 12px;
        font-size: 19px;
    }

    .page-report-statement .statement-final strong {
        font-size: 27px;
    }

    .page-report-statement .statement-footer {
        margin-top: 8px;
        padding: 6px 10px;
        border: 2px solid #000000;
        font-size: 13px;
        font-weight: bold;
    }

    /* フォントの大きさ */
    .page-report-statement .statement-header h1 {
        font-size: 24px;
    }

    .page-report-statement .statement-teacher {
        font-size: 17px;
    }

    .page-report-statement .statement-teacher strong {
        font-size: 22px;
    }

    .page-report-statement .statement-section h2 {
        margin: 0 0 2px;
        font-size: 19px;
    }

    .page-report-statement .statement-table td {
        padding: 1px 5px;
        font-size: 16px;
        line-height: 1.2;
    }

    .page-report-statement .statement-calc-row {
        padding: 2px 6px;
        font-size: 16px;
    }

    .page-report-statement .statement-subtotal {
        width: 230px;
        padding: 2px 8px;
        font-size: 16px;
    }

    .page-report-statement .statement-note {
        margin: 2px 0;
        font-size: 12px;
    }

    .page-report-statement .statement-summary-row,
    .page-report-statement .statement-other-total {
        padding: 2px 0;
        font-size: 16px;
    }

    .page-report-statement .statement-final {
        margin: 8px 5px;
        padding: 5px 12px;
        font-size: 21px;
    }

    .page-report-statement .statement-final strong {
        font-size: 30px;
    }

    .page-report-statement .statement-footer {
        margin-top: 7px;
        padding: 6px 10px;

        border: 2px solid #000000;

        font-size: 15px;
        font-weight: bold;
    }

    /* 縦方向の節約 */
    .page-report-statement .statement-header {
        margin-bottom: 7px;
    }

    .page-report-statement .statement-section {
        margin-bottom: 5px;
        break-inside: avoid;
    }

    .page-report-statement .statement-summary {
        margin: 6px 0;
        padding: 5px 12px;
    }
}