@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ec-green: #1F6FF5;
    --ec-green-dark: #1559CF;
    --ec-green-soft: #E7F0FE;

    --ec-bg: #ffffff;
    --ec-panel-bg: #F8FAFC;
    --ec-card: #ffffff;
    --ec-card-head: #F3F6F8;
    --ec-border: #E4EAF0;

    --ec-text: #111827;
    --ec-muted: #667085;
    --ec-soft-text: #94A3B8;

    --ec-red: #E5484D;
    --ec-red-soft: #FFF1F2;

    --ec-yellow: #D99A00;
    --ec-yellow-soft: #FFF8E6;

    --ec-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
    --ec-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.05);

    --ec-radius: 18px;
    --ec-sidebar-width: 280px;
}

html[data-theme="dark"] {
    --ec-bg: #0B1220;
    --ec-panel-bg: #111827;
    --ec-card: #0F172A;
    --ec-card-head: #111C2F;
    --ec-border: #243044;

    --ec-text: #F8FAFC;
    --ec-muted: #B7C2D1;
    --ec-soft-text: #7E8AA0;

    --ec-green-soft: rgba(31, 111, 245, 0.12);
    --ec-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    --ec-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter var", sans-serif;
    color: var(--ec-text);
    background: var(--ec-bg);
}

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

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

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* ==================================================
   Panel shell
================================================== */

.ec-panel-shell {
    min-height: 100vh;
    background: var(--ec-bg);
}

.ec-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ec-sidebar-width);
    height: 100vh;
    max-height: 100vh;
    border-right: 1px solid var(--ec-border);
    background: var(--ec-card);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 40;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.ec-sidebar::-webkit-scrollbar {
    width: 8px;
}

.ec-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.ec-sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.32);
    border-radius: 999px;
}

.ec-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

.ec-sidebar-top {
    flex: 0 0 auto;
}

.ec-sidebar-bottom {
    flex: 0 0 auto;
    display: grid;
    gap: 10px;
    padding-top: 18px;
}

/* ==================================================
   Brand logo
================================================== */

.ec-brand,
.panel-brand,
.admin-brand,
.auth-brand {
    width: 178px !important;
    height: 50px !important;
    display: inline-block !important;
    background-image: url("/assets/img/easyconfig-logo.svg") !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: 178px auto !important;
    overflow: hidden !important;
    text-indent: -9999px !important;
    white-space: nowrap !important;
    margin-bottom: 34px;
}

.ec-brand .ec-brand-mark,
.ec-brand .brand-mark,
.ec-brand span,
.ec-brand-text,
.panel-brand span,
.admin-brand span,
.auth-brand span,
.panel-brand-mark,
.admin-brand-mark,
.auth-brand-mark {
    display: none !important;
}

/* ==================================================
   Sidebar navigation
================================================== */

.ec-nav,
.ec-sidebar-section {
    display: grid;
    gap: 7px;
}

.ec-nav a,
.ec-sidebar-section a,
.ec-sidebar-button {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 13px;
    color: var(--ec-muted);
    font-weight: 700;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
}

.ec-nav a span,
.ec-sidebar-section a span,
.ec-sidebar-button span {
    width: 22px;
    text-align: center;
    color: var(--ec-soft-text);
}

.ec-nav a:hover,
.ec-sidebar-section a:hover,
.ec-sidebar-button:hover,
.ec-nav a.is-active {
    background: var(--ec-green-soft);
    color: var(--ec-green-dark);
}

.ec-sidebar-section {
    border-top: 1px solid var(--ec-border);
    margin-top: 24px;
    padding-top: 18px;
}

.ec-sidebar-section p {
    margin: 0 0 6px;
    color: var(--ec-soft-text);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
}

.ec-sidebar-button {
    border: 1px solid var(--ec-border);
    background: var(--ec-bg);
    justify-content: flex-start;
}

.ec-sidebar-button kbd,
.ec-sidebar-button em {
    margin-left: auto;
    font-style: normal;
    color: var(--ec-soft-text);
    font-size: 0.76rem;
    border: 1px solid var(--ec-border);
    border-radius: 7px;
    padding: 2px 6px;
}

.ec-server-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--ec-border);
    background: var(--ec-panel-bg);
    border-radius: 15px;
}

.ec-server-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--ec-green);
    box-shadow: 0 0 0 5px var(--ec-green-soft);
}

.ec-server-card strong {
    display: block;
    font-size: 0.86rem;
}

.ec-server-card small {
    display: block;
    color: var(--ec-muted);
    font-weight: 700;
}

.ec-update-btn {
    min-height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--ec-green);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(31, 111, 245, 0.22);
}

/* ==================================================
   Main area
================================================== */

.ec-main {
    margin-left: var(--ec-sidebar-width);
    min-height: 100vh;
    background: var(--ec-bg);
}

.ec-main-inner {
    width: min(100%, 1220px);
    margin: 0 auto;
    padding: 36px 36px 56px;
}

.ec-topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.ec-kicker {
    margin: 0 0 4px;
    color: var(--ec-green-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ec-topbar h1 {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.ec-topbar p {
    margin: 8px 0 0;
    color: var(--ec-muted);
}

.ec-topbar-actions,
.page-actions,
.panel-actions,
.header-actions,
.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

/* ==================================================
   Buttons
================================================== */

.ec-btn,
.ec-icon-btn,
.btn {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    background: transparent;
}

.ec-btn-primary,
.btn-primary {
    background: var(--ec-green);
    color: #ffffff;
    border-color: var(--ec-green);
    box-shadow: 0 12px 24px rgba(31, 111, 245, 0.20);
}

.ec-btn-primary:hover,
.btn-primary:hover {
    background: var(--ec-green-dark);
    border-color: var(--ec-green-dark);
}

.ec-btn-soft,
.ec-icon-btn,
.btn-outline,
.btn-soft {
    background: var(--ec-card);
    color: var(--ec-text);
    border-color: var(--ec-border);
}

.ec-btn-soft:hover,
.ec-icon-btn:hover,
.btn-outline:hover,
.btn-soft:hover {
    border-color: rgba(31, 111, 245, 0.24);
    background: var(--ec-green-soft);
    color: var(--ec-green-dark);
}

.ec-btn-danger,
.btn-danger {
    background: var(--ec-red-soft);
    color: var(--ec-red);
    border-color: #FFD5D8;
}

.ec-btn-danger:hover,
.btn-danger:hover {
    border-color: rgba(229, 72, 77, 0.35);
}

.ec-btn-sm,
.btn-sm {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: 0.82rem;
}

.ec-icon-btn {
    min-width: 48px;
}

/* ==================================================
   Cards
================================================== */

.ec-card,
.card {
    background: var(--ec-card);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow-soft);
    overflow: hidden;
}

.ec-card-title {
    min-height: 54px;
    padding: 15px 18px;
    background: var(--ec-card-head);
    border-bottom: 1px solid var(--ec-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ec-card-title span {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.ec-card-title small {
    color: var(--ec-muted);
    font-weight: 700;
}

.ec-card-body {
    padding: 18px;
}

/* ==================================================
   Resource cards and charts
================================================== */

.ec-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.ec-resource-card .ec-card-body {
    padding: 16px;
}

.ec-resource-value {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 5px 0 10px;
}

.ec-resource-value strong {
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.ec-resource-value span {
    color: var(--ec-muted);
    font-weight: 800;
    font-size: 0.8rem;
}

.ec-mini-chart {
    width: 100%;
    height: 42px;
}

.ec-mini-chart polyline {
    fill: none;
    stroke: var(--ec-green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ec-mini-chart path {
    fill: rgba(31, 111, 245, 0.10);
}

/* ==================================================
   Dashboard project cards
================================================== */

.ec-layout-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.ec-button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ec-button-group button {
    min-height: 36px;
    border: 1px solid var(--ec-border);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--ec-card);
    color: var(--ec-muted);
    font-weight: 800;
}

.ec-button-group button.is-active {
    color: var(--ec-green-dark);
    background: var(--ec-green-soft);
    border-color: rgba(31, 111, 245, 0.22);
}

.ec-project-section {
    display: grid;
    gap: 18px;
}

.ec-project-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    background: var(--ec-card-head);
    border-bottom: 1px solid var(--ec-border);
}

.ec-project-title {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ec-project-color {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--project-color, var(--ec-green));
    box-shadow: 0 0 0 5px rgba(31, 111, 245, 0.08);
}

.ec-project-title strong {
    display: block;
}

.ec-project-title small {
    display: block;
    color: var(--ec-muted);
    font-weight: 700;
    margin-top: 2px;
}

.ec-services-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ec-service-card {
    border: 1px solid var(--ec-border);
    background: var(--ec-card);
    border-radius: 16px;
    padding: 15px;
    transition: 0.2s;
}

.ec-service-card:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 111, 245, 0.28);
    box-shadow: var(--ec-shadow-soft);
}

.ec-service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ec-service-card h3 {
    margin: 0;
    font-size: 0.98rem;
}

.ec-service-card p {
    margin: 5px 0 14px;
    color: var(--ec-muted);
    font-size: 0.86rem;
}

.ec-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ec-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--ec-soft-text);
    margin-top: 7px;
}

.ec-status-dot.success {
    background: #00A66A;
    box-shadow: 0 0 0 5px #E9FBF4;
}

.ec-status-dot.danger {
    background: var(--ec-red);
    box-shadow: 0 0 0 5px var(--ec-red-soft);
}

.ec-status-dot.warning {
    background: var(--ec-yellow);
    box-shadow: 0 0 0 5px var(--ec-yellow-soft);
}

.ec-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    background: var(--ec-card-head);
    color: var(--ec-muted);
}

.ec-badge.success {
    background: #E9FBF4;
    color: #008F5C;
}

.ec-badge.danger {
    background: var(--ec-red-soft);
    color: var(--ec-red);
}

.ec-badge.warning {
    background: var(--ec-yellow-soft);
    color: var(--ec-yellow);
}

.ec-create-card {
    min-height: 180px;
    border: 2px dashed var(--ec-border);
    border-radius: var(--ec-radius);
    display: grid;
    place-items: center;
    text-align: center;
    background: var(--ec-panel-bg);
    color: var(--ec-muted);
    padding: 28px;
}

.ec-create-card strong {
    display: block;
    color: var(--ec-text);
    font-size: 1.08rem;
    margin-bottom: 6px;
}

.ec-create-card span {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--ec-green);
    color: #ffffff;
    margin: 0 auto 14px;
    font-size: 1.4rem;
    font-weight: 900;
}

/* ==================================================
   Action history
================================================== */

.ec-action-list {
    display: grid;
    gap: 12px;
}

.ec-action-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--ec-border);
    border-radius: 16px;
    background: var(--ec-card);
}

.ec-action-row.success {
    border-color: rgba(0, 166, 106, 0.18);
    background: linear-gradient(90deg, rgba(0, 166, 106, 0.08), transparent 38%), var(--ec-card);
}

.ec-action-row.danger {
    border-color: rgba(229, 72, 77, 0.22);
    background: linear-gradient(90deg, rgba(229, 72, 77, 0.08), transparent 38%), var(--ec-card);
}

.ec-action-row.warning {
    border-color: rgba(217, 154, 0, 0.24);
    background: linear-gradient(90deg, rgba(217, 154, 0, 0.10), transparent 38%), var(--ec-card);
}

.ec-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--ec-card-head);
    font-weight: 900;
}

.ec-action-row.success .ec-action-icon {
    background: #E9FBF4;
    color: #008F5C;
}

.ec-action-row.danger .ec-action-icon {
    background: var(--ec-red-soft);
    color: var(--ec-red);
}

.ec-action-row.warning .ec-action-icon {
    background: var(--ec-yellow-soft);
    color: var(--ec-yellow);
}

.ec-action-content strong {
    display: block;
}

.ec-action-content span,
.ec-action-time {
    color: var(--ec-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

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

.ec-inline-form {
    margin: 0;
}

/* ==================================================
   Tabs and tables
================================================== */

.ec-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--ec-border);
    padding-bottom: 12px;
}

.ec-tabs button {
    border: 1px solid var(--ec-border);
    background: var(--ec-card);
    color: var(--ec-muted);
    border-radius: 999px;
    min-height: 38px;
    padding: 0 14px;
    font-weight: 900;
}

.ec-tabs button.is-active {
    background: var(--ec-green);
    color: #ffffff;
    border-color: var(--ec-green);
}

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

.ec-table th,
.ec-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ec-border);
}

.ec-table th {
    color: var(--ec-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--ec-card-head);
}

.ec-table td {
    font-weight: 700;
}

.ec-table small {
    display: block;
    color: var(--ec-muted);
    font-weight: 700;
    margin-top: 2px;
}

/* ==================================================
   Forms
================================================== */

.ec-form-grid {
    display: grid;
    gap: 16px;
}

.ec-form-row,
.form-row {
    display: grid;
    gap: 7px;
}

.ec-form-row label,
.form-row label {
    font-weight: 900;
}

.ec-form-row input,
.ec-form-row select,
.ec-form-row textarea,
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--ec-border);
    background: var(--ec-panel-bg);
    color: var(--ec-text);
    min-height: 44px;
    border-radius: 13px;
    padding: 10px 12px;
    outline: none;
}

.ec-form-row input:focus,
.ec-form-row select:focus,
.ec-form-row textarea:focus,
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--ec-green);
    box-shadow: 0 0 0 4px rgba(31, 111, 245, 0.12);
}

.ec-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ec-checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 100%;
    font-weight: 900;
}

.ec-checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: var(--ec-green);
}

.ec-info-box {
    border: 1px solid rgba(31, 111, 245, 0.22);
    background: var(--ec-green-soft);
    color: var(--ec-green-dark);
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 800;
    line-height: 1.45;
}

.ec-alert {
    margin-bottom: 16px;
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 800;
}

.ec-alert-success {
    border: 1px solid rgba(31, 111, 245, 0.22);
    background: rgba(31, 111, 245, 0.10);
    color: var(--ec-green-dark);
}

.ec-alert-error {
    border: 1px solid rgba(229, 72, 77, 0.22);
    background: var(--ec-red-soft);
    color: var(--ec-red);
}

.ec-alert-warning {
    border: 1px solid rgba(217, 154, 0, 0.24);
    background: var(--ec-yellow-soft);
    color: var(--ec-yellow);
}

.ec-empty-state {
    border: 1px dashed var(--ec-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    background: var(--ec-panel-bg);
    color: var(--ec-muted);
}

.ec-empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ec-text);
    font-size: 1rem;
}

/* ==================================================
   Domains page
================================================== */

.ec-domain-form-card {
    margin-bottom: 18px;
}

.ec-domain-routes-card {
    margin-top: 0;
}

.ec-domain-route-list {
    display: grid;
    gap: 12px;
}

.ec-domain-route-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 0.95fr) 190px;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--ec-border);
    border-radius: 16px;
    background: var(--ec-card);
    min-width: 0;
}

.ec-domain-route-main,
.ec-domain-route-target {
    min-width: 0;
}

.ec-domain-route-url {
    display: block;
    max-width: 100%;
    color: var(--ec-text);
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ec-domain-route-meta {
    display: block;
    margin-top: 4px;
    color: var(--ec-muted);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ec-domain-route-arrow {
    color: var(--ec-soft-text);
    font-weight: 900;
    text-align: center;
}

.ec-domain-route-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 190px;
    min-width: 190px;
    justify-self: end;
}

.ec-domain-route-actions form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ec-domain-route-actions .ec-btn,
.ec-domain-route-actions button.ec-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Old domain class compatibility */
.ec-domain-row {
    display: grid;
    grid-template-columns: 1fr 32px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--ec-border);
    border-radius: 16px;
    background: var(--ec-card);
    margin-bottom: 12px;
}

.ec-domain-url strong {
    display: block;
}

.ec-domain-url small {
    color: var(--ec-muted);
    font-weight: 700;
}

.ec-arrow {
    color: var(--ec-soft-text);
    font-weight: 900;
    text-align: center;
}

.ec-domain-actions {
    display: flex;
    gap: 8px;
}

/* ==================================================
   Settings
================================================== */

.ec-settings-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 18px;
    align-items: start;
}

.ec-settings-sidebar {
    position: sticky;
    top: 24px;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-card);
    overflow: hidden;
    box-shadow: var(--ec-shadow-soft);
}

.ec-settings-sidebar nav {
    display: grid;
    padding: 10px;
}

.ec-settings-sidebar a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ec-muted);
    font-weight: 800;
}

.ec-settings-sidebar a:hover,
.ec-settings-sidebar a.is-active {
    background: var(--ec-green-soft);
    color: var(--ec-green-dark);
}

/* ==================================================
   Search modal
================================================== */

.ec-search-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    z-index: 100;
}

.ec-search-modal.is-open {
    display: flex;
}

.ec-search-box {
    width: min(680px, calc(100% - 30px));
    background: var(--ec-card);
    border: 1px solid var(--ec-border);
    border-radius: 22px;
    box-shadow: var(--ec-shadow);
    overflow: hidden;
}

.ec-search-head {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--ec-border);
}

.ec-search-head input {
    flex: 1;
    border: 0;
    outline: none;
    background: var(--ec-panel-bg);
    color: var(--ec-text);
    border-radius: 14px;
    padding: 14px;
}

.ec-search-head button {
    width: 44px;
    border: 1px solid var(--ec-border);
    background: var(--ec-card);
    color: var(--ec-text);
    border-radius: 14px;
    font-size: 1.2rem;
}

.ec-search-results {
    display: grid;
    padding: 10px;
}

.ec-search-results a {
    padding: 12px;
    border-radius: 12px;
    color: var(--ec-muted);
    font-weight: 800;
}

.ec-search-results a:hover {
    background: var(--ec-green-soft);
    color: var(--ec-green-dark);
}

/* ==================================================
   Utility
================================================== */

.ec-muted-line {
    color: var(--ec-muted);
    font-weight: 700;
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 1180px) {
    .ec-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .ec-services-grid,
    .ec-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-domain-route-row {
        grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    }

    .ec-domain-route-actions {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 920px) {
    :root {
        --ec-sidebar-width: 0px;
    }

    .ec-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ec-border);
    }

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

    .ec-main-inner {
        padding: 24px 18px 42px;
    }

    .ec-topbar {
        flex-direction: column;
    }

    .ec-topbar-actions,
    .page-actions,
    .panel-actions,
    .header-actions,
    .top-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ec-grid-5,
    .ec-services-grid,
    .ec-grid-3,
    .ec-settings-layout {
        grid-template-columns: 1fr;
    }

    .ec-domain-row {
        grid-template-columns: 1fr;
    }

    .ec-arrow {
        text-align: left;
    }

    .ec-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 720px) {
    .ec-domain-route-row {
        grid-template-columns: 1fr;
    }

    .ec-domain-route-arrow {
        text-align: left;
    }

    .ec-domain-route-actions {
        width: 100%;
        min-width: 0;
    }

    .ec-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ec-form-actions .ec-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .ec-topbar-actions,
    .ec-layout-actions,
    .ec-domain-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .ec-btn,
    .ec-icon-btn,
    .btn {
        width: 100%;
    }

    .ec-action-row {
        grid-template-columns: 36px 1fr;
    }

    .ec-action-time,
    .ec-inline-actions {
        grid-column: 2;
    }

    .ec-inline-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}
