.agas-settlements-hero { margin-bottom: 18px; }
.agas-settlements-panel { overflow: visible; }
.agas-settlement-period-nav { display: grid; gap: 12px; margin: 0 0 18px; }
.agas-settlement-year-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.agas-settlement-year-picker label { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #173126; margin: 0; }
.agas-settlement-year-picker select { min-height: 40px; padding: 8px 12px; border: 1px solid #b8c9bf; border-radius: 10px; background: #fff; font: inherit; font-weight: 800; }
.agas-settlement-current-badge { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 999px; background: #ecfdf3; color: #166534; font-size: .82rem; font-weight: 800; }
.agas-settlement-period-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.agas-period-tab { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 8px 12px; border: 1px solid #b8c9bf; border-radius: 999px; color: #173126; background: #fff; text-decoration: none !important; font-weight: 800; }
.agas-period-tab.is-active, .agas-period-tab:hover { color: #fff; background: var(--agas-green); border-color: var(--agas-green); }
.agas-period-tab.is-disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.agas-period-tab.is-now:not(.is-active) { border-color: #86efac; background: #f8fff9; }
.agas-settlement-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.agas-settlement-meta-grid label { display: grid; gap: 6px; font-weight: 800; }
.agas-settlement-meta-grid input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b8c9bf; border-radius: 10px; font: inherit; }
.agas-settlement-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.agas-settlement-stat { display: grid; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid #dce8e1; background: #fff; box-shadow: 0 8px 22px rgba(47, 143, 34, .08); }
.agas-settlement-stat span { color: #557064; font-weight: 800; }
.agas-settlement-stat strong { font-size: 1.2rem; line-height: 1.2; }
.agas-settlement-stat.is-advances { background: #ecfdf3; border-color: #86efac; }
.agas-settlement-stat.is-invoices { background: #fdf2f8; border-color: #f9a8d4; }
.agas-settlement-stat.is-status { background: #eff6ff; border-color: #93c5fd; }
.agas-settlement-stat.is-balance.is-positive strong { color: #991b1b; }
.agas-settlement-stat.is-balance.is-negative strong { color: #1d4ed8; }
.agas-settlement-stat.is-balance.is-zero strong { color: #166534; }
.agas-settlement-table-section { margin-top: 22px; }
.agas-settlement-table-section h3 { margin: 0 0 10px; }
.agas-settlement-table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border: 1px solid #dce8e1; border-radius: 14px; background: #fff; }
.agas-settlement-table-scroll-hint { display: none; margin: 0 0 8px; color: #557064; font-size: .82rem; font-weight: 700; }
.agas-settlement-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.agas-settlement-table[data-table="advances"] { min-width: 920px; }
.agas-settlement-table[data-table="invoices"] { min-width: 1080px; }
.agas-settlement-table th, .agas-settlement-table td { padding: 10px; border-bottom: 1px solid #edf3ef; vertical-align: top; word-break: normal; }
.agas-settlement-table th { text-align: left; background: #f8fbf9; font-size: .92rem; white-space: nowrap; }
.agas-settlement-table input[type="text"], .agas-settlement-table input[type="date"], .agas-settlement-table input[type="file"] { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #b8c9bf; border-radius: 8px; font: inherit; font-size: 16px; }
.agas-settlement-table .col-lp { width: 48px; min-width: 48px; text-align: center; font-weight: 900; white-space: nowrap; }
.agas-settlement-table .col-date { width: 11rem; min-width: 11rem; }
.agas-settlement-table .col-from { width: 16rem; min-width: 16rem; }
.agas-settlement-table .col-notes { width: 14rem; min-width: 14rem; }
.agas-settlement-table .col-number { width: 11rem; min-width: 11rem; }
.agas-settlement-table .col-desc { width: 16rem; min-width: 16rem; }
.agas-settlement-table .col-amount { width: 9rem; min-width: 9rem; white-space: nowrap; }
.agas-settlement-table .col-file { width: 16rem; min-width: 16rem; max-width: none; padding-right: 12px; }
.agas-invoice-file, .col-file { display: grid; gap: 8px; max-width: none; min-width: 0; }
.agas-invoice-file { overflow: hidden; }
.agas-invoice-file-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.agas-file-upload { display: grid; gap: 4px; cursor: pointer; min-width: 0; }
.agas-file-upload-label { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 8px; border: 1px solid #b8c9bf; border-radius: 8px; background: #f8fbf9; color: #173126; font-weight: 800; font-size: .78rem; text-align: center; line-height: 1.2; word-break: break-word; }
.agas-file-upload-camera .agas-file-upload-label { background: #ecfdf3; border-color: #86efac; color: #166534; }
.agas-file-btn, .wp-admin .agas-file-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; max-width: 100%; min-height: 36px; padding: 6px 12px; border-radius: 8px; color: #fff !important; background: var(--agas-green, #2f8f22); text-decoration: none !important; font-weight: 800; font-size: .88rem; white-space: nowrap; box-shadow: none; }
.agas-file-btn:hover { background: #1c6f14; color: #fff !important; }
.agas-remove-row { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; margin: 0 auto; border: 0; border-radius: 999px; color: #fff; background: #991b1b; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.agas-invoice-file .agas-remove-row-inline { width: 100%; max-width: 100%; min-height: 36px; margin: 2px 0 0; border-radius: 8px; font-size: 1.1rem; }
.agas-add-row { margin-top: 12px; width: auto; min-height: 44px; font-size: .95rem; }
.agas-add-row:hover { border-color: var(--agas-green, #2f8f22); color: var(--agas-green, #2f8f22) !important; background: #f8fbf9; }
.wp-admin .agas-settlement-editor .agas-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; padding: 10px 18px; border-radius: 12px; font-weight: 800; cursor: pointer; text-decoration: none !important; }
.wp-admin .agas-settlement-editor .agas-button-secondary { color: #173126 !important; background: #fff; border: 1px solid #b8c9bf; box-shadow: none; }
.wp-admin .agas-settlement-editor .agas-button-primary { color: #fff !important; background: linear-gradient(135deg, var(--agas-green, #2f8f22), #1c6f14); border: 0; box-shadow: 0 8px 18px rgba(47, 143, 34, .22); }
.wp-admin .agas-settlement-editor .agas-button-large { width: 100%; min-height: 62px; font-size: 1.12rem; }
.agas-settlement-actions { display: grid; gap: 10px; margin-top: 22px; }
.agas-settlement-print-bar { display: grid; gap: 6px; margin: 0 0 22px; }
.agas-settlements-view-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.agas-settlement-print-help { margin: 0; color: #557064; font-size: .88rem; line-height: 1.45; }
.agas-settlement-actions-help { margin: -4px 0 8px; color: #557064; line-height: 1.45; }
.agas-settlement-workflow { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-weight: 800; }
.agas-settlement-workflow.is-draft { color: #854d0e; background: #fef9c3; border: 1px solid #fde047; }
.agas-settlement-workflow.is-submitted { color: #166534; background: #dcfce7; border: 1px solid #86efac; }
.agas-settlements-home .agas-settlement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agas-settlements-wrap .agas-settlement-period-tabs-admin { margin: 16px 0 20px; }
.agas-settlements-wrap .agas-period-tab { border-radius: 10px; min-width: auto; }
.agas-settlements-my-wrap .agas-settlements-my-card { max-width: none; }
.agas-settlements-admin-grid { display: flex; flex-direction: column; gap: 18px; align-items: stretch; }
.agas-settlements-list-card, .agas-settlements-editor-card { width: 100%; max-width: none; box-sizing: border-box; }
.agas-settlements-list-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.agas-settlements-list-table { width: 100%; min-width: 920px; table-layout: auto; border-collapse: collapse; }
.agas-settlements-list-table th, .agas-settlements-list-table td { vertical-align: middle; word-break: normal; padding-top: 10px; padding-bottom: 10px; }
.agas-settlements-list-table .col-period { min-width: 9rem; white-space: nowrap; }
.agas-settlements-list-table .col-person { min-width: 10rem; }
.agas-settlements-list-table .col-role { min-width: 6rem; white-space: nowrap; }
.agas-settlements-list-table .col-money { min-width: 7.5rem; white-space: nowrap; text-align: right; }
.agas-settlements-list-table .col-status { min-width: 5.5rem; white-space: nowrap; }
.agas-settlements-list-table .col-actions { min-width: 220px; white-space: nowrap; }
.agas-settlements-list-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }
.agas-settlement-table .col-desc { min-width: 16rem; }
.agas-settlement-table .col-number { min-width: 11rem; }
.agas-settlement-table .col-date { min-width: 11rem; }
.agas-settlement-table .col-amount { min-width: 9rem; }
.agas-settlement-table .col-actions {
	width: 56px;
	min-width: 56px;
	padding-left: 8px;
	padding-right: 8px;
	text-align: center;
	vertical-align: top;
}
.agas-settlement-table[data-table="advances"] .col-actions {
	position: sticky;
	right: 0;
	z-index: 2;
	background: #fff;
	box-shadow: -8px 0 12px rgba(23, 49, 38, .08);
}
.agas-settlement-table[data-table="advances"] thead .col-actions {
	background: #f8fbf9;
	z-index: 3;
}
.agas-file-upload input[type="file"] { font-size: 0; width: .1px; height: .1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }
.agas-file-upload { position: relative; }
.agas-file-selected { display: block; color: #355748; font-size: .78rem; line-height: 1.3; word-break: break-word; }
.agas-settlement-table tr.is-carryover-row { background: #fffbeb; }
.agas-settlement-table tr.is-carryover-row input[readonly] { color: #854d0e; background: #fefce8; border-color: #fde68a; cursor: default; }
.agas-create-settlement-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 0 0 16px; }
.agas-create-settlement-form label { display: grid; gap: 4px; font-weight: 700; }
@media (max-width: 980px) {
	.agas-settlement-summary, .agas-settlement-meta-grid, .agas-settlements-admin-grid, .agas-settlements-home .agas-settlement-summary { grid-template-columns: 1fr; }
	.agas-settlement-table-scroll-hint { display: block; }
	.agas-invoice-file-actions { grid-template-columns: 1fr; }
	.agas-settlement-table[data-table="invoices"] .col-file { width: 220px; min-width: 220px; }
}
