:root {
    --atp-green: #13513f;
    --atp-green-deep: #0e4334;
    --atp-green-soft: #e4f4ed;
    --atp-blue: #2468ee;
    --atp-blue-soft: #e9f1ff;
    --atp-ink: #172033;
    --atp-muted: #718096;
    --atp-border: #e2e8ee;
    --atp-surface: #ffffff;
    --atp-background: #f6f8fa;
    --atp-orange: #ea7000;
    --atp-orange-soft: #fff0dc;
    --atp-success: #0eaa5b;
    --atp-success-soft: #dcf9e9;
    --atp-radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--atp-ink);
    font-family: "DM Sans", sans-serif;
}

.app-body {
    min-width: 320px;
    background: var(--atp-background);
}

.app-sidebar {
    background: var(--atp-green);
    color: #eaf4ef;
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 256px;
    z-index: 1040;
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    height: 80px;
    padding: 0 32px;
}

.brand-mark {
    align-items: center;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    color: #20e08a;
    display: inline-flex;
    font-size: 20px;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.sidebar-brand strong,
.sidebar-brand small,
.sidebar-user-copy strong,
.sidebar-user-copy small {
    display: block;
}

.sidebar-brand strong {
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    letter-spacing: 0;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    letter-spacing: 0.9px;
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.sidebar-item {
    align-items: center;
    border-radius: var(--atp-radius);
    color: rgba(255, 255, 255, 0.84);
    display: flex;
    font-size: 16px;
    font-weight: 500;
    gap: 14px;
    margin-bottom: 4px;
    min-height: 48px;
    padding: 0 16px;
    text-decoration: none;
}

.sidebar-item:hover,
.sidebar-item.is-active {
    background: var(--atp-green-deep);
    color: #fff;
}

.sidebar-item i {
    color: #96c5b4;
    font-size: 18px;
    width: 18px;
}

.sidebar-item.is-active i {
    color: #43eda0;
}

.sidebar-badge {
    align-items: center;
    background: #c2a700;
    border-radius: 999px;
    color: #23351e;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    margin-left: auto;
    min-width: 20px;
    padding: 0 6px;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin: 28px 16px 12px;
    text-transform: uppercase;
}

.sidebar-user {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    min-height: 88px;
    padding: 16px 24px;
}

.user-avatar {
    align-items: center;
    background: #08bfc4;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.sidebar-user-copy {
    min-width: 0;
}

.sidebar-user-copy strong {
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy small {
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user > a {
    color: rgba(255, 255, 255, 0.6);
    margin-left: auto;
}

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

.topbar {
    align-items: center;
    background: var(--atp-surface);
    border-bottom: 1px solid var(--atp-border);
    display: flex;
    height: 80px;
    justify-content: space-between;
    padding: 0 52px 0 32px;
}

.topbar-title,
.topbar-actions {
    align-items: center;
    display: flex;
}

.topbar h1 {
    font-family: "Manrope", sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.topbar-actions {
    gap: 22px;
}

.global-search {
    align-items: center;
    background: #fafbfd;
    border: 1px solid var(--atp-border);
    border-radius: 8px;
    display: flex;
    height: 39px;
    padding: 0 13px;
    width: 256px;
}

.global-search i,
.topbar-notification {
    color: #98a5b8;
}

.global-search input {
    background: transparent;
    border: 0;
    color: var(--atp-ink);
    font-size: 14px;
    min-width: 0;
    outline: 0;
    padding-left: 11px;
    width: 100%;
}

.global-search input::placeholder {
    color: #98a5b8;
}

.topbar-notification {
    font-size: 20px;
}

.app-content {
    margin: 0 auto;
    max-width: 1440px;
    padding: 32px 46px 48px;
}

.app-alert {
    border-radius: var(--atp-radius);
    margin-bottom: 20px;
}

.app-card {
    background: var(--atp-surface);
    border: 1px solid var(--atp-border);
    border-radius: var(--atp-radius);
    box-shadow: 0 2px 4px rgba(24, 33, 50, 0.05);
}

.card-heading {
    align-items: center;
    border-bottom: 1px solid var(--atp-border);
    display: flex;
    justify-content: space-between;
    min-height: 76px;
    padding: 0 24px;
}

.card-heading h2,
.card-heading h3 {
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.card-heading h2 i,
.card-heading h3 i {
    color: #8a98aa;
    font-size: 17px;
    margin-right: 9px;
}

.card-link {
    color: var(--atp-green);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.card-link:hover {
    color: var(--atp-blue);
}

.btn {
    border-radius: 7px;
    font-weight: 600;
    letter-spacing: 0;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: #1458df;
    border-color: #1458df;
}

.btn-outline-primary {
    border-color: var(--atp-blue);
    color: var(--atp-blue);
}

.btn-outline-primary:hover {
    background: var(--atp-blue);
    border-color: var(--atp-blue);
}

.btn-warning {
    background: #e69b00;
    border-color: #e69b00;
    color: #fff;
}

.btn-warning:hover {
    background: #c98400;
    border-color: #c98400;
    color: #fff;
}

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

.form-control,
.form-select {
    border-color: #ccd5e0;
    border-radius: 7px;
    color: var(--atp-ink);
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: #75a8ff;
    box-shadow: 0 0 0 3px rgba(36, 104, 238, 0.12);
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

.icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #526175;
    display: inline-flex;
    font-size: 22px;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.mobile-menu-button {
    display: none;
    margin-right: 10px;
}

.sidebar-backdrop {
    display: none;
}

.status-badge,
.country-badge,
.type-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 11px;
    white-space: nowrap;
}

.status-unprocessed {
    background: var(--atp-orange-soft);
    border: 1px solid #ffd49e;
    color: #b94800;
}

.status-planned {
    background: #e2edff;
    border: 1px solid #c4dafe;
    color: #1552c5;
}

.status-completed {
    background: var(--atp-success-soft);
    border: 1px solid #b5efcf;
    color: #087d3f;
}

.country-dk {
    background: #ffebee;
    color: #cc1d2f;
}

.country-no {
    background: #e7f0ff;
    color: #1d5bd0;
}

.country-se {
    background: #fff8d8;
    color: #b77a00;
}

.type-badge {
    background: #eef2ff;
    color: #4249a7;
    font-weight: 600;
}

.type-inspection {
    background: #f1f3f6;
    color: #536174;
}

.type-repair {
    background: #f1edff;
    color: #7140d5;
}

.type-maintenance {
    background: #eaf4ff;
    color: #1763d3;
}

.type-installation {
    background: #f8edff;
    color: #9b32b2;
}

.table-responsive {
    border-radius: 0 0 var(--atp-radius) var(--atp-radius);
}

.app-table {
    margin-bottom: 0;
    min-width: 800px;
}

.app-table thead th {
    background: #f9fafc;
    border-bottom: 1px solid var(--atp-border);
    color: #667187;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 15px 24px;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table tbody td {
    border-color: #edf0f3;
    color: #4f5d72;
    font-size: 14px;
    padding: 16px 24px;
    vertical-align: middle;
}

.app-table .order-link {
    color: var(--atp-blue);
    font-weight: 700;
    text-decoration: none;
}

.app-table .customer-name {
    color: var(--atp-ink);
    font-weight: 700;
}

.table-muted {
    color: #97a3b6;
}

.empty-state {
    color: var(--atp-muted);
    padding: 48px 24px;
    text-align: center;
}

.stats-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    background: var(--atp-surface);
    border: 1px solid var(--atp-border);
    border-radius: var(--atp-radius);
    box-shadow: 0 2px 4px rgba(24, 33, 50, 0.05);
    display: flex;
    justify-content: space-between;
    min-height: 174px;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.stat-card::after {
    border-radius: 0 0 0 88%;
    content: "";
    height: 65px;
    position: absolute;
    right: -12px;
    top: 0;
    width: 82px;
}

.stat-card p {
    color: #647086;
    font-size: 15px;
    margin: 0 0 28px;
}

.stat-card strong {
    color: var(--atp-ink);
    display: inline-block;
    font-family: "Manrope", sans-serif;
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    margin-right: 8px;
}

.stat-card div > span {
    font-size: 12px;
    font-weight: 600;
}

.stat-card a {
    bottom: 24px;
    font-size: 14px;
    font-weight: 700;
    left: 24px;
    position: absolute;
    text-decoration: none;
}

.stat-icon {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    position: relative;
    width: 36px;
    z-index: 1;
}

.stat-unprocessed { border-color: #ffdbab; }
.stat-unprocessed::after { background: #fff5e9; }
.stat-unprocessed .stat-icon { background: #fff0dc; color: #f06a00; }
.stat-unprocessed div > span, .stat-unprocessed a { color: #eb5b00; }
.stat-planned { border-color: #cee0ff; }
.stat-planned::after { background: #eff6ff; }
.stat-planned .stat-icon { background: #dfebff; color: var(--atp-blue); }
.stat-planned div > span, .stat-planned a { color: var(--atp-blue); }
.stat-completed { border-color: #c9f0d9; }
.stat-completed::after { background: #edfff4; }
.stat-completed .stat-icon { background: #dff9e9; color: var(--atp-success); }
.stat-completed div > span { color: #07934b; }
.stat-total::after { background: #f5f6f8; }
.stat-total .stat-icon { background: #f1f3f6; color: #607087; }

.country-card {
    padding-bottom: 24px;
}

.country-stat-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 24px;
}

.country-stat {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--atp-radius);
    display: flex;
    font-size: 16px;
    font-weight: 700;
    justify-content: space-between;
    min-height: 67px;
    padding: 0 18px;
}

.country-stat span {
    align-items: center;
    display: flex;
    gap: 13px;
}

.country-stat i {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.country-stat strong {
    font-family: "Manrope", sans-serif;
    font-size: 24px;
    font-weight: 800;
}

.country-stat.country-dk { background: #fff1f2; border-color: #ffd8dc; color: #1c2638; }
.country-stat.country-dk i { background: #ff3141; color: #fff; }
.country-stat.country-dk strong { color: #f10f22; }
.country-stat.country-no { background: #eff6ff; border-color: #d1e4ff; color: #1c2638; }
.country-stat.country-no i { background: #2d7df4; color: #fff; }
.country-stat.country-no strong { color: #216de2; }
.country-stat.country-se { background: #fffcec; border-color: #fff0a8; color: #1c2638; }
.country-stat.country-se i { background: #ffd018; color: #285790; }
.country-stat.country-se strong { color: #db9300; }

.filter-card {
    padding: 24px;
}

.filter-grid {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(240px, 1.7fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.filter-search {
    min-width: 0;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap i {
    color: #98a5b8;
    left: 14px;
    position: absolute;
    top: 12px;
}

.input-icon-wrap .form-control {
    padding-left: 39px;
}

.filter-submit {
    grid-column: 1;
}

.filter-submit .btn {
    min-width: 180px;
}

.page-intro {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.page-intro p {
    color: var(--atp-muted);
    margin: 0 0 5px;
}

.page-intro h2 {
    font-family: "Manrope", sans-serif;
    font-size: 23px;
    font-weight: 800;
    margin: 0;
}

.page-intro h2 .status-badge {
    margin-left: 8px;
    vertical-align: middle;
}

.order-form-body {
    padding: 26px 24px;
}

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

.form-grid-small {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(84px, 0.7fr) minmax(0, 1.3fr);
}

.card-footer-actions {
    border-top: 1px solid var(--atp-border);
    padding: 18px 24px;
    text-align: right;
}

.order-readonly {
    padding: 28px;
}

.order-detail-grid {
    display: grid;
    gap: 28px 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.order-detail-grid div {
    min-width: 0;
}

.order-detail-grid dt {
    color: var(--atp-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.order-detail-grid dd {
    color: var(--atp-ink);
    font-size: 15px;
    margin: 0;
}

.admin-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
}

.admin-list-card {
    min-width: 0;
}

.admin-table {
    min-width: 650px;
}

.subheading {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 6px;
}

.permission-overrides {
    border-top: 1px solid var(--atp-border);
}

.permission-override-row {
    align-items: center;
    border-bottom: 1px solid var(--atp-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 12px 0;
}

.permission-override-row strong,
.permission-override-row small {
    display: block;
}

.permission-override-row strong {
    color: var(--atp-ink);
    font-size: 13px;
}

.permission-override-row small {
    color: var(--atp-muted);
    font-size: 11px;
    margin-top: 2px;
}

.permission-override-row .form-select {
    flex: 0 0 132px;
    min-height: 34px;
}

.permissions-card {
    max-width: 920px;
}

.role-select {
    min-width: 160px;
}

.permissions-body {
    padding: 8px 24px 24px;
}

.permission-group {
    border-bottom: 1px solid var(--atp-border);
    padding: 20px 0;
}

.permission-group:last-child {
    border-bottom: 0;
}

.permission-group h3 {
    color: var(--atp-green);
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 11px;
}

.permission-option {
    align-items: center;
    display: grid;
    gap: 11px;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    padding: 8px 0;
}

.permission-option input {
    accent-color: var(--atp-green);
    height: 16px;
    width: 16px;
}

.permission-option span {
    color: var(--atp-ink);
    font-size: 14px;
    font-weight: 600;
}

.permission-option small {
    color: var(--atp-muted);
    font-family: monospace;
    font-size: 11px;
}

.installer-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.installer-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--atp-border);
    border-radius: var(--atp-radius);
    box-shadow: 0 2px 4px rgba(24, 33, 50, 0.04);
    color: var(--atp-ink);
    display: flex;
    gap: 12px;
    min-height: 88px;
    padding: 16px;
    text-decoration: none;
}

.installer-card:hover,
.installer-card.is-selected {
    border-color: #89b3ff;
    box-shadow: 0 3px 8px rgba(36, 104, 238, 0.12);
}

.installer-card > span:nth-child(2) {
    min-width: 0;
}

.installer-card strong,
.installer-card small {
    display: block;
}

.installer-card strong {
    font-size: 14px;
}

.installer-card small {
    color: var(--atp-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.installer-count {
    align-items: center;
    background: var(--atp-blue-soft);
    border-radius: 50%;
    color: var(--atp-blue);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    margin-left: auto;
    width: 30px;
}

.profile-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.45fr);
    max-width: 960px;
}

.profile-summary {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 34px 24px;
    text-align: center;
}

.profile-avatar {
    align-items: center;
    background: var(--atp-green);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-family: "Manrope", sans-serif;
    font-size: 27px;
    font-weight: 800;
    height: 76px;
    justify-content: center;
    margin-bottom: 16px;
    width: 76px;
}

.profile-summary h2 {
    font-family: "Manrope", sans-serif;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
}

.profile-summary p {
    color: var(--atp-muted);
    font-size: 14px;
    margin: 5px 0 22px;
}

.customer-filter-grid {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(240px, 1.7fr) minmax(150px, 0.8fr);
}

.customer-table {
    min-width: 1000px;
}

.integration-badge,
.service-badge,
.service-candidate-count {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 9px;
    white-space: nowrap;
}

.integration-badge {
    background: #eef2ff;
    color: #4a47a3;
}

.service-overdue {
    background: #fff0dc;
    color: #b94800;
}

.service-due {
    background: #ffe9eb;
    color: #c21e35;
}

.service-due_soon {
    background: #fff7d6;
    color: #966900;
}

.service-not_due {
    background: #e5f8ed;
    color: #087d3f;
}

.service-interval-options {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.service-interval-options label,
.route-choice {
    align-items: center;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}

.service-interval-options input[type="radio"],
.route-choice input {
    accent-color: var(--atp-green);
    height: 17px;
    width: 17px;
}

.service-interval-options .form-control {
    max-width: 130px;
}

.route-destination-card {
    grid-column: 1;
}

.route-choice {
    align-items: flex-start;
    border-bottom: 1px solid var(--atp-border);
    display: flex;
    padding: 12px 0;
}

.route-choice span {
    display: block;
}

.route-choice strong,
.route-choice small {
    display: block;
}

.route-choice small {
    color: var(--atp-muted);
    font-size: 12px;
    font-weight: 400;
    margin-top: 2px;
}

.home-address-fields {
    padding-top: 18px;
}

.settings-card {
    max-width: 960px;
}

.service-candidate-count {
    background: var(--atp-green-soft);
    color: var(--atp-green);
    font-size: 13px;
    padding: 9px 12px;
}

.service-route-panel {
    background: #fff;
    border: 1px solid var(--atp-border);
    border-radius: var(--atp-radius);
    box-shadow: 0 2px 4px rgba(24, 33, 50, 0.05);
    overflow: hidden;
}

.route-controls {
    align-items: end;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 0.9fr);
    padding: 22px 24px;
}

.route-destination {
    display: grid;
    gap: 3px;
}

.route-label {
    color: var(--atp-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.route-destination strong {
    color: var(--atp-ink);
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 800;
}

.route-destination > span:last-child {
    color: #526175;
    font-size: 13px;
}

.route-action-group {
    text-align: center;
}

.route-location-button {
    min-height: 46px;
    padding-left: 18px;
    padding-right: 18px;
}

.route-action-group p {
    color: var(--atp-muted);
    font-size: 11px;
    margin: 7px 0 0;
}

.route-manual-start .form-label {
    margin-bottom: 5px;
}

.service-map-shell {
    border-top: 1px solid var(--atp-border);
    position: relative;
}

.service-map {
    background: #e8f0ec;
    height: 450px;
    width: 100%;
}

.map-empty {
    align-items: center;
    color: #596b67;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    justify-content: center;
    text-align: center;
}

.map-empty i {
    color: var(--atp-green);
    font-size: 33px;
}

.map-empty strong {
    color: var(--atp-ink);
    font-family: "Manrope", sans-serif;
    font-size: 17px;
}

.map-empty span {
    color: var(--atp-muted);
    font-size: 14px;
}

.route-message {
    bottom: 16px;
    left: 16px;
    margin: 0;
    max-width: calc(100% - 32px);
    position: absolute;
    z-index: 2;
}

.service-candidates {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-candidate {
    background: #fff;
    border: 1px solid var(--atp-border);
    border-left: 4px solid #d7dfe8;
    border-radius: var(--atp-radius);
    box-shadow: 0 2px 4px rgba(24, 33, 50, 0.05);
    min-width: 0;
    padding: 18px;
}

.service-candidate.service-overdue { border-left-color: var(--atp-orange); }
.service-candidate.service-due { border-left-color: #d9283e; }
.service-candidate.service-due_soon { border-left-color: #d5a300; }

.service-candidate-status {
    align-items: center;
    display: flex;
    font-size: 12px;
    gap: 9px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.service-candidate-status > span:last-child {
    color: var(--atp-muted);
    text-align: right;
}

.service-candidate h3 {
    color: var(--atp-ink);
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 7px;
}

.service-candidate p {
    color: #546276;
    font-size: 13px;
    margin: 5px 0;
}

.service-candidate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 17px;
}

.service-candidate-actions .btn {
    min-height: 38px;
}

.service-candidate-actions .btn.is-selected {
    background: var(--atp-green);
    border-color: var(--atp-green);
}

.planning-page {
    margin: -32px -46px -48px;
}

.planning-unprocessed {
    background: #fff;
    border-bottom: 1px solid var(--atp-border);
}

.planning-unprocessed-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 53px;
    padding: 0 32px;
}

.planning-unprocessed-header h2 {
    align-items: center;
    display: flex;
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 800;
    gap: 9px;
    margin: 0;
}

.unprocessed-dot {
    background: #ff6a00;
    border-radius: 50%;
    height: 12px;
    width: 12px;
}

.unprocessed-count {
    align-items: center;
    background: #fff0dc;
    border-radius: 999px;
    color: #e85f00;
    display: inline-flex;
    font-size: 12px;
    height: 21px;
    justify-content: center;
    min-width: 21px;
    padding: 0 7px;
}

.link-button {
    background: transparent;
    border: 0;
    color: #59667b;
    font-size: 13px;
    font-weight: 600;
    padding: 4px;
}

.unprocessed-strip {
    display: flex;
    gap: 16px;
    min-height: 185px;
    overflow-x: auto;
    padding: 28px 32px 30px;
}

.unprocessed-empty {
    color: var(--atp-muted);
    margin: 28px 0;
}

.planning-unprocessed.is-collapsed .unprocessed-strip {
    display: none;
}

.planning-unprocessed.is-collapsed {
    border-bottom: 0;
}

.planning-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 18px 32px;
}

.month-switcher {
    align-items: center;
    background: #fff;
    border: 1px solid #dde4ec;
    border-radius: var(--atp-radius);
    box-shadow: 0 1px 2px rgba(30, 43, 63, 0.06);
    display: inline-flex;
    height: 42px;
    overflow: hidden;
}

.month-switcher a {
    align-items: center;
    color: #526176;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    text-decoration: none;
    width: 44px;
}

.month-switcher a:hover {
    background: #f4f7fa;
}

.month-switcher span {
    border-left: 1px solid #e5e9ef;
    border-right: 1px solid #e5e9ef;
    font-size: 14px;
    font-weight: 700;
    min-width: 106px;
    padding: 0 16px;
    text-align: center;
}

.view-only-label {
    color: #718096;
    font-size: 13px;
    font-weight: 600;
}

.planning-message {
    margin: 0 32px 16px;
}

.planning-board-scroll {
    overflow-x: auto;
    padding: 0 24px 32px;
}

.planning-board {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(6, minmax(280px, 1fr));
    min-height: 680px;
    min-width: 1830px;
}

.planning-week {
    background: #eef1f5;
    border: 1px solid #e3e7ec;
    border-radius: var(--atp-radius);
    min-height: 650px;
    overflow: hidden;
}

.planning-week > header {
    align-items: center;
    background: #2d405e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 60px;
    padding: 12px 12px;
}

.planning-week.is-current > header {
    background: var(--atp-blue);
}

.planning-week h2 {
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin: 0;
}

.planning-week p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    margin: 2px 0 0;
}

.planning-week > header > span {
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 25px;
    justify-content: center;
    min-width: 25px;
}

.planning-dropzone {
    min-height: 590px;
    padding: 8px;
}

.planning-order {
    background: #fff;
    border: 1px solid #e0e5eb;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(31, 42, 58, 0.08);
    cursor: grab;
    flex: 0 0 280px;
    margin-bottom: 12px;
    min-height: 128px;
    padding: 12px;
}

.planning-order:active {
    cursor: grabbing;
}

.planning-order.is-unprocessed {
    border-color: #ffcd99;
    margin-bottom: 0;
}

.planning-order.is-saving {
    opacity: 0.55;
    pointer-events: none;
}

.planning-order-meta {
    align-items: center;
    color: #95a1b2;
    display: flex;
    font-family: monospace;
    font-size: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.planning-order-meta .country-badge {
    border-radius: 3px;
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    padding: 5px 8px;
    text-transform: uppercase;
}

.planning-order strong {
    color: #202a3c;
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.planning-order p {
    color: #6d798c;
    font-size: 12px;
    margin: 4px 0 12px;
}

.planning-order-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.planning-order .type-badge {
    border-radius: 3px;
    font-size: 11px;
    padding: 6px 8px;
}

.installer-initials {
    align-items: center;
    background: #f0f2f5;
    border-radius: 50%;
    color: #748197;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 23px;
    justify-content: center;
    width: 23px;
}

.login-page {
    background: linear-gradient(135deg, #eaf2ee 0%, #f9fbfa 55%, #eef5f2 100%);
    min-height: 100vh;
}

.login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 18px;
}

.login-card {
    background: #fff;
    border: 1px solid #dce9e2;
    border-radius: var(--atp-radius);
    box-shadow: 0 20px 48px rgba(20, 71, 56, 0.12);
    max-width: 440px;
    padding: 38px;
    width: 100%;
}

.login-card .brand-mark {
    background: var(--atp-green);
    color: #4af2a3;
}

.login-card h1 {
    font-family: "Manrope", sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.eyebrow {
    color: var(--atp-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.login-card .form-control {
    min-height: 47px;
}

.login-card .btn {
    min-height: 46px;
}

.login-links {
    display: flex;
    font-size: 14px;
    justify-content: space-between;
    margin-top: 19px;
}

.login-links a {
    color: var(--atp-green);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        box-shadow: 8px 0 28px rgba(16, 38, 31, 0.22);
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .sidebar-backdrop.is-visible {
        background: rgba(18, 27, 39, 0.35);
        bottom: 0;
        display: block;
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 1035;
    }

    .topbar {
        padding: 0 24px;
    }

    .app-content {
        padding: 26px 24px 40px;
    }

    .planning-page {
        margin: -26px -24px -40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid,
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .route-controls {
        grid-template-columns: 1fr 1fr;
    }

    .route-destination {
        grid-column: 1 / -1;
    }

    .service-candidates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .installer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .topbar {
        height: 68px;
        padding: 0 16px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .topbar-actions {
        gap: 10px;
    }

    .global-search {
        width: 42px;
    }

    .global-search input {
        display: none;
    }

    .app-content {
        padding: 18px 14px 32px;
    }

    .stats-grid,
    .country-stat-grid,
    .filter-grid,
    .customer-filter-grid,
    .route-controls,
    .service-candidates {
        grid-template-columns: 1fr;
    }

    .filter-submit {
        grid-column: auto;
    }

    .filter-submit .btn {
        width: 100%;
    }

    .page-intro {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

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

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

    .permission-option {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .permission-option small {
        grid-column: 2;
    }

    .planning-page {
        margin: -18px -14px -32px;
    }

    .service-map {
        height: 360px;
    }

    .route-action-group {
        text-align: left;
    }

    .planning-unprocessed-header,
    .planning-toolbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .unprocessed-strip {
        padding-left: 16px;
        padding-right: 16px;
    }

    .planning-board-scroll {
        padding-left: 16px;
        padding-right: 16px;
    }

    .login-card {
        padding: 28px 22px;
    }
}
