:root {
    --bg: #f6f7f9;
    --surface: #fff;
    --text: #172033;
    --muted: #667085;
    --line: #e6e9ef;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --nav: #111827;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #ea580c;
    --purple: #7c3aed;
    --radius: 14px;
    --shadow: 0 1px 3px #10182812, 0 10px 24px #10182808
}

* {
    box-sizing: border-box
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg)
}

body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5
}

a {
    color: inherit;
    text-decoration: none
}

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

button {
    cursor: pointer
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    background: var(--nav);
    color: #d1d5db;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    z-index: 40
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 17px;
    padding: 0 8px 25px
}

.brand span,
.logo-mark,
.mobile-logo {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    font-weight: 800;
    color: white
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #ffffff13;
    color: white
}

.sidebar nav i {
    width: 20px;
    text-align: center;
    font-style: normal
}

.sidebar-user {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid #ffffff18;
    display: flex;
    flex-direction: column
}

.main {
    margin-left: 248px;
    min-height: 100vh
}

.topbar {
    height: 66px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.top-actions form {
    margin: 0
}

.avatar,
.profile-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800
}

.icon-button {
    display: none;
    border: 0;
    background: none;
    font-size: 23px
}

.link-button {
    border: 0;
    background: none;
    color: var(--muted)
}

.page {
    max-width: 1500px;
    margin: auto;
    padding: 28px
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px
}

.page-head h1,
.mobile-form-head h1,
.project-hero h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 3px 0 6px
}

.page-head p,
.mobile-form-head p {
    margin: 0;
    color: var(--muted)
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 11px !important;
    font-weight: 750;
    color: var(--primary) !important
}

.button {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 10px 15px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-weight: 650;
    transition: .15s
}

.button.primary {
    background: var(--primary);
    color: #fff
}

.button.primary:hover {
    background: var(--primary-dark)
}

.button.secondary {
    border-color: var(--line);
    background: #fff
}

.button.ghost {
    color: var(--primary)
}

.button.wide {
    width: 100%;
    padding: 12px
}

.button.huge {
    min-height: 54px;
    font-size: 16px
}

.card,
.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow)
}

.card {
    padding: 22px
}

.card h2 {
    font-size: 17px;
    margin: 0 0 4px
}

.new-project-script {
    max-width: 820px;
    padding: 0;
    overflow: hidden
}

.new-project-script-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc
}

.new-project-script-head>span {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 11px;
    background: #dbeafe;
    color: var(--primary);
    font-size: 21px
}

.new-project-script-head h2,
.new-project-script-head p,
.script-steps p {
    margin: 0
}

.new-project-script-head p {
    margin-top: 3px;
    color: var(--muted)
}

.script-steps {
    margin: 0;
    padding: 8px 24px;
    list-style: none
}

.script-steps li {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line)
}

.script-steps li:last-child {
    border-bottom: 0
}

.script-steps li>span {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 750
}

.script-steps p {
    font-size: 15px;
    font-weight: 600
}

.card-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px
}

.card-head p {
    margin: 0;
    color: var(--muted)
}

.metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px
}

.dashboard-head {
    margin-bottom: 20px
}

.dashboard-head h1 {
    font-size: 26px
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px
}

.summary-metric {
    position: relative;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius)
}

.summary-metric.danger {
    background: #fffafa;
    border-color: #fecaca
}

.summary-metric>div {
    display: flex;
    flex-direction: column
}

.summary-metric strong {
    font-size: 28px;
    line-height: 1.1
}

.summary-metric small {
    color: var(--muted)
}

.summary-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800
}

.summary-icon.blue { background: #eff6ff; color: var(--primary) }
.summary-icon.green { background: #ecfdf3; color: var(--green) }
.summary-icon.red { background: #fee2e2; color: var(--red) }

.metric-caption {
    margin-left: auto;
    align-self: flex-start;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 650;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 99px
}

.active-projects-card {
    margin-bottom: 20px
}

.card-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 650
}

.card-link:hover {
    color: var(--primary-dark)
}

.active-projects-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px
}

.active-project {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(100px, 1fr) minmax(110px, 170px) 16px;
    align-items: center;
    gap: 12px;
    padding: 14px 4px;
    border-top: 1px solid var(--line)
}

.active-project:hover .project-info strong {
    color: var(--primary)
}

.project-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary)
}

.project-info {
    min-width: 0;
    display: flex;
    flex-direction: column
}

.project-info strong,
.project-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.project-info small {
    color: var(--muted)
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 9px
}

.project-progress>span {
    height: 6px;
    flex: 1;
    overflow: hidden;
    border-radius: 99px;
    background: #e5e7eb
}

.project-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary)
}

.project-progress strong {
    min-width: 34px;
    text-align: right;
    font-size: 12px
}

.project-arrow {
    color: #98a2b3;
    font-size: 22px
}

.dashboard-primary {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .8fr);
    gap: 20px
}

.overdue-chart-card,
.attention-card {
    min-height: 350px
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px
}

.chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--red)
}

.overdue-chart {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0
}

.chart-row {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr 30px;
    align-items: center;
    gap: 14px
}

.chart-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #344054;
    font-weight: 600
}

.chart-track {
    height: 14px;
    overflow: hidden;
    border-radius: 4px;
    background: #f2f4f7
}

.chart-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: filter .15s
}

.chart-row:hover .chart-track i {
    filter: brightness(.9)
}

.chart-row strong {
    color: #b91c1c;
    text-align: right
}

.chart-empty {
    min-height: 230px;
    display: grid;
    place-content: center;
    justify-items: center;
    color: var(--muted)
}

.chart-empty span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--green);
    font-size: 20px;
    margin-bottom: 10px
}

.chart-empty strong { color: var(--text) }
.chart-empty p { margin: 2px 0 0 }
.empty.compact { padding: 65px 20px }

.metric {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow)
}

.metric div:last-child {
    display: flex;
    flex-direction: column
}

.metric strong {
    font-size: 26px
}

.metric small {
    color: var(--muted)
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-weight: bold
}

.metric-icon.blue {
    background: #dbeafe;
    color: #2563eb
}

.metric-icon.green {
    background: #dcfce7;
    color: #16a34a
}

.metric-icon.red {
    background: #fee2e2;
    color: #dc2626
}

.metric-icon.orange {
    background: #ffedd5;
    color: #ea580c
}

.metric-icon.purple {
    background: #ede9fe;
    color: #7c3aed
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.span-2 {
    grid-column: span 2
}

.attention-list a,
.service-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--line)
}

.attention-list a>div,
.service-row>div:first-child {
    display: flex;
    flex-direction: column;
    flex: 1
}

.attention-list small,
.service-row small {
    color: var(--muted)
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a
}

.status-dot.critico {
    background: #dc2626
}

.status-dot.atencao {
    background: #f59e0b
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px
}

.donut {
    --value: 50;
    width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--value)*1%), #e5e7eb 0);
    display: grid;
    place-items: center;
    position: relative
}

.donut:before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff
}

.donut span {
    font-size: 25px;
    font-weight: 800;
    z-index: 1
}

.table-card {
    overflow: hidden
}

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

th {
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #fafafa
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 99px;
    background: #f2f4f7;
    color: #475467;
    font-size: 12px;
    font-weight: 650
}

.badge.status {
    background: #eff6ff;
    color: #1d4ed8
}

.badge.critico {
    background: #fee2e2;
    color: #b91c1c
}

.badge.atencao {
    background: #ffedd5;
    color: #c2410c
}

.progress {
    height: 7px;
    min-width: 80px;
    border-radius: 99px;
    background: #e5e7eb;
    overflow: hidden
}

.progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: inherit
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px
}

.filters input,
.filters select {
    max-width: 330px
}

.empty {
    text-align: center;
    padding: 36px;
    color: var(--muted)
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    outline: none
}

.item-actions-select {
    width: 150px;
    min-width: 130px;
    padding: 7px 34px 7px 10px;
    font-size: 13px;
    font-weight: 700
}

.item-actions-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap
}

.item-edit-button {
    min-height: 34px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 7px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700
}

.item-edit-button:hover {
    background: #dbeafe
}

.item-grid-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc
}

.item-grid-toolbar select,
.item-grid-toolbar input[type=date] {
    width: auto;
    min-width: 170px
}

.item-grid-toolbar [data-bulk-values] {
    display: contents
}

.grid-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700
}

.grid-select-all input,
[data-grid-check] {
    width: 18px;
    height: 18px
}

.grid-check-column {
    width: 38px
}

.grid-input {
    min-width: 110px;
    padding: 7px 8px;
    font-size: 13px
}

.grid-input.is-dirty {
    border-color: #f59e0b;
    background: #fffbeb
}

.project-access {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 16px
}

.project-access legend {
    padding: 0 8px;
    font-weight: 800
}

.project-access-list {
    display: grid;
    gap: 8px;
    margin-top: 12px
}

.project-access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px
}

.project-access-row label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 0
}

.project-access-row > label:first-child {
    flex: 1;
    min-width: 0
}

.project-access-row .read-only-option {
    flex: 0 0 auto;
    white-space: nowrap
}

.project-access-row input {
    width: 18px;
    height: 18px
}

.project-access-row span {
    display: grid
}

.project-access-row small {
    color: var(--muted)
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px #3b82f622
}

textarea {
    min-height: 90px;
    resize: vertical
}

label small,
.muted {
    color: var(--muted);
    font-weight: 400
}

.form {
    max-width: 950px
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px
}

.narrow {
    max-width: 520px;
    display: grid;
    gap: 17px
}

.alert {
    padding: 11px 14px;
    border-radius: 9px;
    margin-bottom: 16px
}

.alert.success {
    background: #dcfce7;
    color: #166534
}

.alert.danger {
    background: #fee2e2;
    color: #991b1b
}

.alert.warning {
    background: #fef3c7;
    color: #92400e
}

.project-hero {
    background: linear-gradient(120deg, #172554, #1e40af);
    color: #fff;
    border-radius: 16px;
    padding: 27px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.hero-meta {
    display: flex;
    gap: 8px
}

.hero-progress {
    display: flex;
    flex-direction: column;
    text-align: right
}

.hero-progress strong {
    font-size: 40px
}

.hero-progress span {
    color: #bfdbfe
}

.tabs {
    display: flex;
    gap: 8px;
    overflow: auto;
    margin: 18px 0
}

.tabs a {
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line)
}

.tabs .tab-tools-start {
    margin-left: auto
}

.tabs .tab-tool {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    font-size: 13px
}

.tabs .tab-tool:hover {
    background: #fff;
    border-color: var(--line);
    color: var(--primary)
}

.action-stack {
    display: grid;
    gap: 9px;
    margin-top: 17px
}

.service-row .progress {
    max-width: 150px
}

.gantt-row {
    display: grid;
    grid-template-columns: 250px 1fr 55px;
    gap: 15px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--line)
}

.gantt-label {
    display: flex;
    flex-direction: column
}

.gantt-label small {
    color: var(--muted)
}

.gantt-track {
    height: 24px;
    background: repeating-linear-gradient(90deg, #f3f4f6 0, #f3f4f6 calc(10% - 1px), #e5e7eb 10%);
    position: relative;
    border-radius: 5px
}

.gantt-track i {
    position: absolute;
    height: 15px;
    top: 4px;
    border-radius: 4px;
    background: #93c5fd;
    min-width: 8%;
    width: 65%
}

.gantt-track i span {
    display: block;
    height: 100%;
    width: var(--progress);
    background: #2563eb;
    border-radius: 4px
}

.field-form {
    max-width: 720px;
    margin: auto;
    display: grid;
    gap: 18px
}

.mobile-form-head {
    max-width: 720px;
    margin: 0 auto 20px
}

.big-input {
    font-size: 22px;
    padding: 14px
}

.preview-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.preview-grid img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px
}

.timeline {
    max-width: 900px
}

.timeline-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    margin-bottom: 16px
}

.timeline-item time {
    font-weight: 750;
    padding-top: 18px
}

.timeline-item time small {
    display: block;
    color: var(--muted);
    font-weight: 400
}

.modal {
    border: 0;
    border-radius: 14px;
    width: min(680px, calc(100% - 24px));
    padding: 0;
    box-shadow: 0 24px 80px #0004
}

.modal::backdrop {
    background: #10182899
}

.modal form {
    padding: 22px
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px
}

.modal-head h2 {
    margin: 0
}

.modal-head button {
    border: 0;
    background: none;
    font-size: 25px
}

.profile {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 600px
}

.profile-avatar {
    width: 70px;
    height: 70px;
    font-size: 28px
}

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

.check input {
    width: auto
}

.error-page {
    text-align: center;
    padding: 80px 20px
}

.error-page>strong {
    font-size: 80px;
    color: #bfdbfe
}

.error-page h1 {
    font-size: 28px
}

.error-page pre {
    text-align: left;
    max-width: 900px;
    margin: 20px auto;
    overflow: auto;
    background: #111827;
    color: #fff;
    padding: 15px
}

.mobile-nav {
    display: none
}

.auth-page {
    background: #fff
}

.login-shell {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh
}

.login-visual {
    background: linear-gradient(145deg, #0f172aee, #1e3a8aee), radial-gradient(circle at 10% 20%, #60a5fa, #1e3a8a);
    color: #fff;
    padding: 70px;
    display: flex;
    align-items: flex-end
}

.login-visual h1 {
    font-size: 42px;
    line-height: 1.15;
    margin: 25px 0 15px
}

.login-visual p {
    color: #cbd5e1;
    font-size: 17px;
    max-width: 550px
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 30px
}

.login-card {
    width: min(410px, 100%)
}

.login-card h2 {
    font-size: 30px;
    margin: 5px 0
}

.login-card>label {
    margin-top: 18px
}

.login-card>.button {
    margin-top: 22px
}

.security-note {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--muted)
}

.mobile-logo {
    display: none
}

.material-fields {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px
}

.material-fields legend {
    font-weight: 700;
    padding: 0 6px
}

.equipment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px auto;
    gap: 10px;
    align-items: end;
    padding: 10px 0;
    border-bottom: 1px solid var(--line)
}

.equipment-table-head,
.planned-equipment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 10px
}

.equipment-table-head {
    padding: 10px 0 4px;
    color: var(--muted);
    font-size: 12px
}

.planned-equipment-row input[readonly] {
    background: #f8fafc;
    color: var(--text);
    cursor: default
}

.equipment-row .button {
    margin-bottom: 1px
}

.material-fields>[data-add-equipment] {
    margin-top: 12px
}

@media(max-width:600px) {
    .equipment-row {
        grid-template-columns: 1fr
    }

    .equipment-table-head {
        grid-template-columns: minmax(0, 1fr) 140px
    }

    .planned-equipment-row {
        grid-template-columns: minmax(0, 1fr) 140px
    }

    .equipment-row .button {
        justify-self: start
    }
}

.mobile-project-name,
.mobile-register-action {
    display: none
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.row-actions form {
    display: inline-flex;
    margin: 0
}

.table-card .row-actions>a:not(.button),
.table-card .row-actions>button:not(.button),
.table-card .row-actions>form>button:not(.button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 15px;
    background: #fff;
    color: var(--text);
    font-weight: 650;
    line-height: 1;
    transition: .15s
}

.table-card .row-actions>form>button:not(.button) {
    border-color: transparent;
    background: var(--red);
    color: #fff
}

.table-card .row-actions>.button,
.table-card .row-actions>form>.button {
    min-width: 72px;
    min-height: 40px;
    line-height: 1
}

.table-card .row-actions>a:not(.button):hover,
.table-card .row-actions>button:not(.button):hover {
    background: #f8fafc
}

.table-card .row-actions>form>button:not(.button):hover,
.table-card .row-actions>form>.button.danger:hover {
    filter: brightness(.92)
}

.tabs a.active {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700
}

select[multiple] {
    min-height: 150px
}

@media(max-width:1100px) {
    .metrics {
        grid-template-columns: repeat(3, 1fr)
    }

    .dashboard-primary {
        grid-template-columns: 1fr
    }

    .active-projects-list {
        grid-template-columns: 1fr
    }

    .overdue-chart-card,
    .attention-card {
        min-height: auto
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr
    }

    .grid-3>.span-2 {
        grid-column: span 1
    }
}

@media(max-width:820px) {
    body {
        padding-bottom: 66px
    }

    .sidebar {
        transform: translateX(-100%);
        transition: .2s
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main {
        margin-left: 0
    }

    .topbar {
        padding: 0 16px
    }

    .icon-button {
        display: block
    }

    .page {
        padding: 19px 14px
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr)
    }

    .dashboard-metrics {
        grid-template-columns: 1fr 1fr
    }

    .summary-metric.danger {
        grid-column: 1 / -1
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: #fff;
        border-top: 1px solid var(--line);
        z-index: 35;
        justify-content: space-around
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        min-width: 54px;
        color: #475467
    }

    .mobile-nav b {
        font-size: 18px
    }

    .login-shell {
        grid-template-columns: 1fr
    }

    .login-visual {
        display: none
    }

    .mobile-logo {
        display: grid;
        margin-bottom: 28px
    }

    .table-card {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible
    }

    table thead {
        display: none
    }

    table,
    tbody,
    tr,
    td {
        display: block
    }

    tr {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 10px;
        box-shadow: var(--shadow)
    }

    td {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        padding: 7px 5px;
        border: 0;
        text-align: right
    }

    td:before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 600;
        text-align: left
    }

    td:first-child {
        text-align: left;
        display: block
    }

    .gantt-row {
        grid-template-columns: 1fr 45px
    }

    .gantt-track {
        grid-row: 2;
        grid-column: 1/3
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px
    }

    .timeline-item time {
        padding: 0
    }

    .project-hero {
        padding: 22px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .span-2 {
        grid-column: span 1
    }
}

@media(max-width:520px) {
    .page-head {
        flex-direction: column
    }

    .page-head .button {
        width: 100%
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
        gap: 8px
    }

    .summary-metric.danger {
        grid-column: auto
    }

    .summary-metric {
        min-height: 78px;
        padding: 14px 16px
    }

    .active-project {
        grid-template-columns: 36px minmax(0, 1fr) 16px
    }

    .project-progress {
        display: none
    }

    .chart-row {
        grid-template-columns: minmax(85px, 120px) 1fr 24px;
        gap: 9px
    }

    .card {
        padding: 18px
    }

    .metric {
        padding: 13px;
        gap: 9px
    }

    .metric-icon {
        width: 34px;
        height: 34px
    }

    .metric strong {
        font-size: 21px
    }

    .metric small {
        font-size: 11px
    }

    .project-hero {
        align-items: flex-start
    }

    .hero-progress strong {
        font-size: 30px
    }

    .filters {
        flex-wrap: wrap
    }

    .filters>* {
        flex: 1
    }

    .login-panel {
        padding: 24px
    }

    .donut-wrap {
        flex-direction: column
    }

    .form-actions {
        position: sticky;
        bottom: 70px;
        background: #fff;
        padding-top: 10px
    }
}

.file-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line)
}

.file-row input {
    width: auto
}

.file-row a {
    color: var(--primary)
}

.danger-zone {
    max-width: 720px;
    margin: 18px auto;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.danger-zone p {
    margin: 4px 0 0
}

.button.danger {
    background: var(--red);
    color: #fff
}

@media(max-width:820px) {

    .desktop-project-name,
    .desktop-register-action {
        display: none !important
    }

    .mobile-project-name {
        display: inline
    }

    .mobile-register-action {
        display: flex;
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 76px;
        z-index: 34;
        min-height: 54px;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        color: #fff;
        font-size: 17px;
        font-weight: 800;
        box-shadow: 0 12px 30px #1d4ed855
    }

    .page:has(.mobile-register-action) {
        padding-bottom: 88px
    }

    .project-hero h1 {
        font-size: 24px;
        line-height: 1.15
    }

    .project-hero {
        min-height: 190px
    }
}

.password-copy {
    display: flex;
    gap: .5rem;
    align-items: stretch
}

.password-copy input {
    flex: 1
}

.password-copy .button {
    white-space: nowrap
}

.brand img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 38px
}

.company-logo {
    object-fit: contain;
    background: transparent;
    border-radius: 0
}

@media (max-width: 640px) {
    .project-access-row {
        align-items: flex-start;
        flex-direction: column
    }

    .project-access-row .read-only-option {
        margin-left: 28px
    }
}
