/* スマートフォンでの利用を最優先にしたシンプルなスタイル */

:root {
    color-scheme: light;
    --color-bg: #f5f5f2;
    --color-surface: #ffffff;
    --color-text: #222222;
    --color-muted: #666666;
    --color-primary: #2e7d32;
    --color-primary-dark: #1b5e20;
    --color-danger: #c62828;
    --color-border: #dddddd;
    --color-pending: #f9a825;
    --color-approved: #2e7d32;
    --color-rejected: #c62828;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Hiragino Sans", "Meiryo", sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

header.app-header {
    background: var(--color-primary);
    color: #fff;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: bold;
}

header.app-header a {
    color: #fff;
}

.card {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    margin-top: 0;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    font-size: 17px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 14px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.btn:active {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: #eeeeee;
    color: var(--color-text);
}

.btn-danger {
    background: var(--color-danger);
}

.btn-small {
    width: auto;
    padding: 8px 14px;
    font-size: 15px;
}

.time-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.time-range-row input[type="time"] {
    margin-bottom: 0;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.list-item:last-child {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: #fff;
}

.badge-pending  { background: var(--color-pending); }
.badge-approved { background: var(--color-approved); }
.badge-rejected { background: var(--color-rejected); }

.error {
    background: #ffebee;
    color: var(--color-danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.success {
    background: #e8f5e9;
    color: var(--color-primary-dark);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.muted {
    color: var(--color-muted);
    font-size: 14px;
}

nav.admin-menu a {
    display: block;
    padding: 14px 16px;
    background: var(--color-surface);
    border-radius: 10px;
    margin-bottom: 10px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 給与明細などの表 */
table.payslip {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

table.payslip th,
table.payslip td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
}

table.payslip th:first-child,
table.payslip td:first-child {
    text-align: left;
}

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

.payslip-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.warning {
    background: #fff8e1;
    color: #8d6e00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

/* 印刷時は、操作ボタンやナビゲーションを隠し、明細だけを見せる */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .container {
        max-width: none;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
