/* Workspace settings only. Keep form and table geometry independent of the
   capture/report screens and preserve the approved application branding. */
.settings-page{min-width:0;width:100%}
.settings-page .settings-layout{grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.settings-main,.settings-form{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;min-width:0}
.settings-page .settings-panel{margin:0;padding:24px;min-width:0}
.settings-page .panel-head{align-items:flex-start;gap:16px;margin-bottom:24px;min-width:0}
.settings-page .panel-head>div{min-width:0}
.settings-page .panel-head>svg,.settings-page .panel-head>img{flex-shrink:0}
.settings-page .panel-head h2{font-size:22px;line-height:1.3}
.settings-page .panel-head p{font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.settings-form>.settings-error:empty{display:none}
.settings-page .settings-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 20px;align-items:start}
.settings-page .settings-form-grid>*{min-width:0;max-width:100%}
:is(.settings-page,.settings-dialog) .field{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%;margin:0}
:is(.settings-page,.settings-dialog) .field>label{display:block;min-height:21px;margin:0;font-size:15px;line-height:1.4;font-weight:650;color:var(--text);overflow-wrap:anywhere}
:is(.settings-page,.settings-dialog) .field-hint{display:block;margin:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
:is(.settings-page,.settings-dialog) input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
:is(.settings-page,.settings-dialog) select{box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;height:48px;min-height:48px;padding:11px 12px;font-size:16px;line-height:24px;border-radius:10px}
:is(.settings-page,.settings-dialog) textarea{box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;min-height:100px;padding:11px 12px;font-size:16px;line-height:24px;border-radius:10px;resize:vertical}
:is(.settings-page,.settings-dialog) :disabled{cursor:not-allowed}
.settings-page .logo-upload-row{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:20px;margin-bottom:26px}
.settings-page .company-logo-box{width:112px;height:92px;min-width:112px;padding:12px}
.settings-logo-copy{min-width:0}
.settings-page .logo-upload-row p{max-width:480px;margin-top:10px;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.settings-page .logo-upload-row .btn{min-height:44px;font-size:14px;white-space:normal;text-align:left}
.settings-page .palette-swatches{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.settings-page .palette-swatch{min-width:0;min-height:86px;padding:13px 6px;font-size:12px;line-height:1.4;gap:9px}
.settings-page .palette-swatch i{width:30px;height:30px;flex-shrink:0}
.settings-custom-color{margin-top:22px}
.settings-color-controls{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:12px;min-width:0}
.settings-page .settings-color-controls input[type=color]{display:block;width:56px;min-width:56px;max-width:56px;height:48px;min-height:48px;margin:0;padding:5px;border-radius:10px;cursor:pointer}
.settings-page .settings-color-controls input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.settings-page .settings-color-controls input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}
.settings-page .settings-color-controls input[type=color]::-moz-color-swatch{border:0;border-radius:5px}
.settings-page .settings-color-controls input[name=accent_hex]{font-variant-numeric:tabular-nums;text-transform:uppercase}
.settings-page .settings-save{margin:0;justify-content:flex-end}
.settings-page .settings-save .btn{min-width:176px;min-height:48px;font-size:15px}
.settings-page .theme-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.settings-page .theme-choice{min-width:0;min-height:98px;font-size:14px;line-height:1.4;padding:17px 12px}
.settings-page .settings-account-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.settings-page .settings-account-actions .btn{min-height:46px;font-size:14px;white-space:normal}
.settings-page .settings-aside{min-width:0}
.settings-page .settings-info-item>div{min-width:0}
.settings-page .settings-info-item strong{font-size:13px;line-height:1.45}
.settings-page .settings-info-item p{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.settings-page .app-version{overflow-wrap:anywhere;margin-top:24px;line-height:1.6}
.settings-table-panel{min-width:0;padding:20px;overflow:hidden}
.settings-page .settings-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px;line-height:1.5}
.settings-page .settings-table th{padding:0 12px 14px;font-size:11px;line-height:1.45;letter-spacing:.7px;vertical-align:bottom;overflow-wrap:anywhere}
.settings-page .settings-table td{padding:18px 12px;font-size:14px;line-height:1.5;vertical-align:middle;overflow-wrap:anywhere;min-width:0}
.settings-page .settings-table th:first-child,.settings-page .settings-table td:first-child{padding-left:0}
.settings-page .settings-table th:last-child,.settings-page .settings-table td:last-child{padding-right:0}
.settings-team-table th:nth-child(2){width:110px}
.settings-team-table th:nth-child(3){width:105px}
.settings-team-table th:nth-child(4){width:116px}
.settings-page .settings-admin-table{table-layout:auto}
.settings-admin-table th:first-child{width:30%}
.settings-admin-table th:last-child{min-width:150px}
.settings-page .settings-table-actions{text-align:right}
.settings-page .settings-table .btn{min-height:44px;font-size:14px;padding:10px 12px}
.settings-page .settings-table .badge{font-size:12px;padding:7px 9px}
.settings-page .team-person{align-items:center;gap:12px;min-width:0}
.settings-person-copy{min-width:0}
.settings-page .team-person strong{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.settings-page .team-person small{display:block;font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin-top:3px}
.settings-page .team-person .avatar{width:36px;height:36px;font-size:11px;flex-shrink:0}
.settings-table-note{margin-top:20px;align-items:flex-start;font-size:14px;line-height:1.6}
.settings-page .settings-account-requests{margin-top:24px}
.settings-account-request>div{min-width:0;overflow-wrap:anywhere}
.settings-account-request small{display:block;line-height:1.6;margin-top:4px}
.settings-dialog .modal-body>.stack,.settings-dialog form.stack{gap:20px}
.settings-dialog .modal-footer{gap:10px;flex-wrap:wrap}
.settings-dialog .modal-footer .btn{min-height:48px;font-size:15px}

@media(max-width:1250px){
 .settings-page .settings-layout{grid-template-columns:minmax(0,1fr)}
}
/* Admin tables have six columns; switch to labelled rows before those columns
   would squeeze account names or action buttons. Keep the same semantic table. */
@media(max-width:1100px){
 .settings-page .settings-admin-table,.settings-admin-table tbody{display:block;width:100%}
 .settings-admin-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .settings-admin-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px;padding:18px 0;border-bottom:1px solid var(--line)}
 .settings-admin-table tbody tr:first-child{padding-top:0}
 .settings-admin-table tbody tr:last-child{padding-bottom:0;border-bottom:0}
 .settings-page .settings-admin-table td{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:0;border:0;font-size:14px;min-width:0}
 .settings-admin-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;font-weight:600;line-height:1.4}
 .settings-admin-table .settings-table-identity,.settings-admin-table .settings-table-actions{grid-column:1 / -1}
 .settings-admin-table .settings-table-identity::before,.settings-admin-table .settings-table-actions::before{display:none}
 .settings-page .settings-admin-table .settings-table-actions{align-items:stretch;text-align:left}
 .settings-admin-table .settings-table-actions .btn{width:100%}
}
@media(max-width:740px){
 .settings-main,.settings-form{gap:20px}
 .settings-page .settings-panel,.settings-table-panel{padding:20px 18px;border-radius:14px}
 .settings-page .panel-head{margin-bottom:22px;gap:12px}
 .settings-page .panel-head h2{font-size:21px;line-height:1.3}
 .settings-page .panel-head p{font-size:13px;line-height:1.55}
 .settings-page .settings-form-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .settings-page .settings-form-grid .full{grid-column:auto}
 .settings-page .logo-upload-row{grid-template-columns:88px minmax(0,1fr);gap:14px;align-items:start;margin-bottom:24px}
 .settings-page .company-logo-box{width:88px;min-width:88px;height:82px;padding:9px}
 .settings-page .logo-upload-row .btn{width:100%;justify-content:flex-start;font-size:13px;padding:10px 11px}
 .settings-page .logo-upload-row p{font-size:12px;line-height:1.5}
 .settings-page .palette-swatches{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .settings-page .palette-swatch{min-height:84px;font-size:13px;padding:12px 7px}
 .settings-page .settings-save .btn{width:100%;min-height:50px;font-size:16px}
 .settings-page .theme-choices{gap:10px}
 .settings-page .theme-choice{min-height:92px;font-size:13px;padding:16px 7px}
 .settings-page .settings-account-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .settings-page .settings-account-actions .btn{width:100%;min-height:48px;font-size:14px;justify-content:flex-start}
 .settings-page .settings-team-table,.settings-team-table tbody{display:block;width:100%}
 .settings-team-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .settings-team-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 16px;padding:18px 0;border-bottom:1px solid var(--line)}
 .settings-team-table tbody tr:first-child{padding-top:0}
 .settings-team-table tbody tr:last-child{padding-bottom:0;border-bottom:0}
 .settings-page .settings-team-table td{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:0;border:0;font-size:14px;min-width:0}
 .settings-team-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;font-weight:600;line-height:1.4}
 .settings-team-table .settings-table-identity,.settings-team-table .settings-table-actions{grid-column:1 / -1}
 .settings-team-table .settings-table-identity::before,.settings-team-table .settings-table-actions::before{display:none}
 .settings-page .settings-team-table .settings-table-actions{align-items:stretch;text-align:left}
 .settings-team-table .settings-table-actions .btn{width:100%}
 .settings-table-note{font-size:13px}
 .settings-dialog .modal-footer>.btn:last-child{flex:1;min-width:0}
 .settings-dialog .modal-footer>.btn:first-child:nth-last-child(3){width:100%;order:-1}
}
@media(max-width:360px){
 .settings-page .logo-upload-row{grid-template-columns:minmax(0,1fr)}
 .settings-page .settings-panel,.settings-table-panel{padding:18px 16px}
}
