*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-hover: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-primary-text: #ffffff;
    --color-success: #059669;
    --color-success-light: #d1fae5;
    --color-success-text: #065f46;
    --color-danger: #dc2626;
    --color-danger-light: #fee2e2;
    --color-danger-text: #991b1b;
    --color-warning: #d97706;
    --color-warning-light: #fef3c7;
    --color-warning-text: #92400e;
    --color-info: #0284c7;
    --color-info-light: #e0f2fe;
    --color-info-text: #075985;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.15s ease;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

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

.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    white-space: nowrap;
}

.navbar-brand:hover {
    color: var(--color-primary);
}

.navbar-brand svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.87rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.nav-link-logout {
    color: var(--color-danger);
}

.nav-link-logout:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.btn-nav-primary {
    background: var(--color-primary);
    color: var(--color-primary-text) !important;
    border-radius: var(--radius-sm);
}

.btn-nav-primary:hover {
    background: var(--color-primary-hover);
    color: var(--color-primary-text) !important;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.87rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--color-text-secondary);
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 800px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.page-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-0.5px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-primary-text);
}

.btn-outline {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}

.btn-outline:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: transparent;
}

.btn-secondary:hover {
    background: #bfdbfe;
    color: var(--color-primary-hover);
}

.btn-success {
    background: var(--color-success);
    color: #ffffff;
    border-color: var(--color-success);
}

.btn-success:hover {
    background: #047857;
    color: #ffffff;
}

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

.btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
}

.btn-warning {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
}

.btn-warning:hover {
    background: #b45309;
    color: #ffffff;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    flex-wrap: wrap;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-body.p-0 {
    padding: 0;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.form-row .form-group-btn {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 0.75rem;
}

.form-label {
    display: block;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.required {
    color: var(--color-danger);
}

.form-input {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all var(--transition);
    line-height: 1.5;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    font-size: 0.87rem;
    color: var(--color-text-secondary);
}

.form-errors {
    margin-top: 0.3rem;
}

.form-error {
    display: block;
    color: var(--color-danger);
    font-size: 0.8rem;
}

.form-help {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.form-section-desc {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.form-inline {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.input-with-button .form-input {
    flex: 1;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.87rem;
}

.data-table th {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--color-bg);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--color-surface-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table-sm th,
.data-table-sm td {
    padding: 0.5rem 0.75rem;
    font-size: 0.83rem;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-secondary);
}

.pw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pw-input-wrapper .form-input {
    padding-right: 2.8rem;
}

.pw-toggle-btn {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s;
}

.pw-toggle-btn:hover {
    color: var(--color-text);
}

.pw-rules {
    background: #f7fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.pw-rules-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.pw-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pw-rule {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.pw-rule-icon {
    display: inline-block;
    width: 1.2em;
    text-align: center;
    margin-right: 0.3em;
}

.pw-rule-pass {
    color: #38a169;
    font-weight: 500;
}

.pw-rule-pass .pw-rule-icon {
    color: #38a169;
}

.pw-rule-fail {
    color: #e53e3e;
}

.pw-rule-fail .pw-rule-icon {
    color: #e53e3e;
}

.pw-rules-example {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.pw-rules-example code {
    background: #edf2f7;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.pw-match-error {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

.font-medium {
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-pending {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
}

.status-approved {
    background: var(--color-success-light);
    color: var(--color-success-text);
}

.status-rejected {
    background: var(--color-danger-light);
    color: var(--color-danger-text);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-info {
    background: var(--color-info-light);
    color: var(--color-info-text);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.mobile-sub-info {
    display: none;
}

.mobile-only-inline {
    display: none !important;
}

.mobile-only-inline-block {
    display: none !important;
}

.mobile-hidden-inline {
    display: inline;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sort-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.sort-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-pending .stat-icon {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.stat-approved .stat-icon {
    background: var(--color-success-light);
    color: var(--color-success);
}

.stat-products .stat-icon {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-nav-grid-2col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.admin-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.admin-nav-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
    transform: translateY(-2px);
}

.admin-nav-card svg {
    color: var(--color-primary);
}

.admin-nav-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.admin-nav-card p {
    font-size: 0.83rem;
    color: var(--color-text-secondary);
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    background: var(--color-bg);
    transition: border-color var(--transition);
}

.product-item:hover {
    border-color: var(--color-border);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.product-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.product-qty {
    flex-shrink: 0;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.qty-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
}

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

.qty-btn-minus {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
}

.qty-btn-plus {
    border-radius: 0 var(--radius) var(--radius) 0;
    border-left: none;
}

.qty-input {
    text-align: center;
    width: 52px;
    height: 36px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.detail-full {
    grid-column: 1 / -1;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 0.93rem;
    color: var(--color-text);
}

.filter-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.filter-chip:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.filter-active {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-color: var(--color-primary);
}

.filter-active:hover {
    background: var(--color-primary-hover);
    color: var(--color-primary-text);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.empty-state p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.empty-state-sm {
    padding: 2rem 1rem;
    text-align: center;
}

.empty-state-sm p {
    color: var(--color-text-secondary);
    font-size: 0.87rem;
    margin-bottom: 0.75rem;
}

.info-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--color-info-light);
    color: var(--color-info-text);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.breakdown-card {
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.breakdown-card:last-child {
    margin-bottom: 0;
}

.breakdown-title {
    padding: 0.6rem 0.75rem;
    background: var(--color-bg);
    font-size: 0.87rem;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border-light);
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 0.5rem;
}

.auth-icon {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.auth-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.auth-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.87rem;
}

.auth-form {
    padding: 1.5rem 2rem;
}

.auth-footer {
    text-align: center;
    padding: 0 2rem 1.75rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.auth-footer a {
    font-weight: 500;
}

.messages-container {
    max-width: 1200px;
    margin: 0.75rem auto 0;
    padding: 0 1.5rem;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    animation: slideIn 0.2s ease;
}

.alert-success {
    background: var(--color-success-light);
    color: var(--color-success-text);
}

.alert-error {
    background: var(--color-danger-light);
    color: var(--color-danger-text);
}

.alert-warning {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
}

.alert-info {
    background: var(--color-info-light);
    color: var(--color-info-text);
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--color-border-light);
    margin-top: auto;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.status-withdrawal_pending {
    background: #fef3c7;
    color: #92400e;
}

.status-withdrawn {
    background: #f1f5f9;
    color: #64748b;
}

.status-deleted {
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.7rem;
    margin-left: 0.4rem;
}

.row-deleted {
    opacity: 0.5;
    background: #fef2f2;
}

.row-deleted:hover {
    background: #fef2f2 !important;
}

.warning-banner {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
}

.warning-banner p {
    margin-top: 0.25rem;
    font-weight: 400;
    font-size: 0.83rem;
}

.stat-withdrawal .stat-icon {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.stat-areas .stat-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table th {
    padding: 0.6rem 0.25rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.calendar-table .cal-sun {
    color: var(--color-danger);
}

.calendar-table .cal-sat {
    color: var(--color-primary);
}

.cal-cell {
    vertical-align: top;
    padding: 0.35rem;
    min-height: 80px;
    height: 80px;
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background var(--transition);
}

.cal-cell:hover {
    background: var(--color-surface-hover);
}

.cal-empty {
    background: var(--color-bg);
    cursor: default;
}

.cal-empty:hover {
    background: var(--color-bg);
}

.cal-today {
    background: var(--color-primary-light);
}

.cal-today:hover {
    background: #bfdbfe;
}

.cal-selected {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.cal-has-events {
    background: var(--color-success-light);
}

.cal-has-events:hover {
    background: #a7f3d0;
}

.cal-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}

.cal-events {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cal-event-item {
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 1rem;
    animation: modalIn 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border-light);
}

.modal-loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.rejection-reason-box {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-danger-light);
    border-radius: var(--radius);
    font-size: 0.87rem;
}

.rejection-reason-box .detail-label {
    color: var(--color-danger-text);
}

.rejection-reason-box .detail-value {
    color: var(--color-danger-text);
    white-space: pre-wrap;
}

.row-disabled {
    opacity: 0.5;
    background: #fef2f2;
}

.row-disabled:hover {
    background: #fef2f2 !important;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-item {
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.comment-body {
    font-size: 0.87rem;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
    line-height: 1.5;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 0.5rem 1rem;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow-md);
        z-index: 99;
    }

    .navbar-links.active {
        display: flex;
    }

    .nav-link,
    .nav-user {
        padding: 0.6rem 0.75rem;
        justify-content: flex-start;
    }

    .page-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .admin-nav-grid,
    .admin-nav-grid-2col {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .admin-nav-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .admin-nav-card svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .admin-nav-card h3 {
        font-size: 0.9rem;
        margin: 0;
    }

    .admin-nav-card p {
        display: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--color-border-light);
        gap: 0.25rem;
    }

    .data-table tbody tr:last-child {
        border-bottom: none;
    }

    .data-table tbody tr > td {
        border-bottom: none;
        padding: 0;
        font-size: 0.85rem;
    }

    .data-table tbody tr td.mobile-col-main {
        flex: 1;
        min-width: 0;
    }

    .data-table tbody tr td.mobile-col-actions {
        flex-shrink: 0;
    }

    .data-table tbody tr td.mobile-col-full {
        width: 100%;
    }

    .data-table tbody tr td.mobile-hidden {
        display: none;
    }

    .mobile-sub-info {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        margin-top: 0.25rem;
    }

    .mobile-sub-info .text-muted {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .mobile-only-inline {
        display: inline-flex !important;
        margin-left: 0.35rem;
    }

    .mobile-only-inline-block {
        display: inline !important;
    }

    .mobile-hidden-inline {
        display: none !important;
    }

    .action-buttons {
        flex-direction: row;
        align-items: center;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1.25rem 0;
    }

    .auth-form {
        padding: 1.25rem 1.5rem;
    }

    .auth-header {
        padding: 1.5rem 1.5rem 0.5rem;
    }

    .auth-footer {
        padding: 0 1.5rem 1.25rem;
    }

    .data-table th {
        padding: 0.6rem 0.75rem;
    }

    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }

    .input-with-button {
        flex-direction: column;
    }
}

/* Notice styles */
.notice-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.notice-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #fecaca;
    transition: background 0.15s;
}

.notice-row:last-child {
    border-bottom: none;
}

.notice-row:hover {
    background: #fee2e2;
}

.notice-new-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.0625rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: #ef4444;
    border-radius: var(--radius-sm);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.notice-row-date {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.notice-row-subject {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.notice-row-body {
    flex: 1;
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.notice-card-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #fecaca;
}

.notice-target-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.notice-target-user {
    background: #dbeafe;
    color: #1e40af;
}

.notice-target-admin {
    background: #fef3c7;
    color: #92400e;
}

.notice-target-all {
    background: #d1fae5;
    color: #065f46;
}

.notice-detail-header {
    margin-bottom: 0.5rem;
}

.notice-detail-subject {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.notice-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notice-detail-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.text-link {
    color: var(--color-primary);
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .notice-row {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .notice-row-body {
        width: 100%;
        flex-basis: 100%;
    }
}

/* Diff highlighting */
.diff-changed {
    background-color: #fffde7;
}

.diff-removed {
    background-color: #ffebee;
    color: #c62828;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-decoration: line-through;
}

.diff-added {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .navbar-inner {
        padding: 0 1rem;
    }

    .messages-container {
        padding: 0 1rem;
    }
}
