.services-page-header {
    align-items: flex-start;
    gap: 20px;
}

.services-page-description {
    max-width: 760px;
    color: #475569;
    line-height: 1.7;
    margin: 6px 0 0;
}

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

.services-header-actions .btn.btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.services-header-actions .btn.btn-info:hover {
    background: #99f6e4;
    border-color: #5eead4;
    transform: translateY(-1px);
}

.services-phase-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.services-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.services-summary-card {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.services-summary-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.services-summary-card strong {
    display: block;
    margin: 8px 0 10px;
    font-size: 28px;
    color: #0f172a;
}

.services-summary-card p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.services-summary-card-accent {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    border-color: transparent;
}

.services-summary-card-accent strong,
.services-summary-card-accent p {
    color: #f8fafc;
}

.services-summary-card-accent .services-summary-label {
    background: rgba(255, 255, 255, 0.15);
    color: #dbeafe;
}

.services-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.services-ops-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.services-panel,
.services-table-panel {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.services-panel h3,
.services-table-panel h3 {
    margin: 0 0 14px;
    font-size: 20px;
    color: #0f172a;
}

.services-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.services-checklist {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    line-height: 1.8;
}

.services-table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.services-table-subtitle {
    margin: 6px 0 0;
    color: #475569;
    line-height: 1.6;
}

.services-generated-at {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

.services-table-state {
    margin-bottom: 12px;
    color: #475569;
    font-size: 14px;
}

.services-table-wrapper {
    overflow-x: auto;
}

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

.services-table th,
.services-table td {
    padding: 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.services-table th {
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
}

.services-table td {
    color: #475569;
    line-height: 1.6;
}

.services-name {
    font-weight: 700;
    color: #0f172a;
}

.services-code {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.services-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.services-pill-healthy {
    background: #dcfce7;
    color: #166534;
}

.services-pill-degraded {
    background: #fef3c7;
    color: #92400e;
}

.services-pill-unhealthy {
    background: #fee2e2;
    color: #b91c1c;
}

.services-pill-disabled,
.services-pill-not-configured {
    background: #e2e8f0;
    color: #475569;
}

.services-url-list,
.services-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.services-url-list li,
.services-meta-list li {
    margin-bottom: 8px;
}

.services-url-list li:last-child,
.services-meta-list li:last-child {
    margin-bottom: 0;
}

.services-url-label,
.services-meta-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.services-url-list a {
    color: #1d4ed8;
    text-decoration: none;
    word-break: break-all;
}

.services-url-list a:hover {
    text-decoration: underline;
}

.services-status-note {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
}

.services-empty {
    color: #94a3b8;
    font-style: italic;
}

.services-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.services-action-button-secondary {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.services-action-button-secondary:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.services-deployment-meta {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.services-deployment-meta li {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.services-deployment-label {
    font-weight: 700;
    color: #334155;
}

.services-release {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.services-deployment-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.services-deployment-badge-success {
    background: #dcfce7;
    color: #166534;
}

.services-deployment-badge-partial {
    background: #fef3c7;
    color: #92400e;
}

.services-deployment-badge-rollback {
    background: #ede9fe;
    color: #6d28d9;
}

.services-deployment-badge-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.services-profile-grid {
    display: grid;
    gap: 12px;
}

.services-profile-card {
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    padding: 16px;
    background: #f8fafc;
}

.services-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.services-profile-header h4 {
    margin: 0;
    font-size: 17px;
    color: #0f172a;
}

.services-profile-code {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.services-profile-description {
    margin: 10px 0 12px;
    color: #475569;
    line-height: 1.6;
    font-size: 13px;
}

.services-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.services-profile-stat {
    border-radius: 12px;
    background: #ffffff;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}

.services-profile-stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.services-profile-stat strong {
    font-size: 18px;
    color: #0f172a;
}

.services-recent-table-wrapper {
    overflow-x: auto;
}

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

.services-recent-table th,
.services-recent-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.services-recent-table th {
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
}

.services-recent-service {
    font-weight: 700;
    color: #0f172a;
}

.services-recent-subtext {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.services-action-button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.services-action-button:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.services-action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.services-modal[hidden] {
    display: none;
}

.services-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1400;
}

.services-modal-panel {
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}

.services-modal-header,
.services-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.services-modal-header {
    border-bottom: 1px solid #e2e8f0;
}

.services-modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.services-modal-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.services-modal-close {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.services-modal-body {
    padding: 24px;
}

.services-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.services-modal-meta-card {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.services-modal-meta-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.services-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.services-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.services-field span {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.services-field input,
.services-field textarea,
.services-field select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
}

.services-field textarea {
    min-height: 110px;
    resize: vertical;
}

.services-modal-help {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.services-field-full {
    grid-column: 1 / -1;
}

.services-switch-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.services-switch-row input {
    width: 18px;
    height: 18px;
}

.services-button-secondary {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.services-button-secondary:hover {
    background: #f8fafc;
}

.services-toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1500;
}

.services-toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    font-size: 14px;
    line-height: 1.5;
}

.services-toast-success {
    background: #166534;
}

.services-toast-error {
    background: #b91c1c;
}

.services-toast-info {
    background: #1d4ed8;
}

@media (max-width: 900px) {
    .services-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .services-ops-grid {
        grid-template-columns: 1fr;
    }

    .services-table-header {
        flex-direction: column;
    }

    .services-generated-at {
        white-space: normal;
    }

    .services-modal {
        padding: 16px;
    }

    .services-modal-header,
    .services-modal-body,
    .services-modal-footer {
        padding: 18px;
    }

    .services-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}
