* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
}

code {
    font-family: Consolas, "Courier New", monospace;
}

.shell {
    width: min(1440px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 18px 0 26px;
}

.topbar,
.panel,
.login-card,
.stat-card,
.notice {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    margin-bottom: 14px;
}

.topbar-home {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.topbar-logo {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border: 1px solid rgba(96, 165, 250, 0.65);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 15px;
    font-weight: 900;
}

.topbar-logo img {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: contain;
    display: block;
}

.topbar-copy {
    min-width: 0;
}

.topbar-home,
.topbar-home *,
.topbar-home:hover,
.topbar-home:hover *,
.topbar-home:focus-visible,
.topbar-home:focus-visible * {
    color: inherit;
    text-decoration: none;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: 25px;
    line-height: 1.1;
}

h2 {
    font-size: 21px;
}

.subtitle {
    margin: 3px 0 0;
    color: #64748b;
    line-height: 1.25;
    font-size: 12px;
}

.login-card {
    width: min(100%, 460px);
    margin: 32px auto 0;
    padding: 18px;
    display: grid;
    gap: 12px;
}

.stack {
    display: grid;
    gap: 10px;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    display: grid;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    padding: 9px 11px;
    font-size: 13px;
    background: #fff;
    color: #0f172a;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 44px;
}

.password-field input::-ms-reveal,
.password-field input::-ms-clear {
    display: none;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #eff6ff;
    color: #2563eb;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.24);
    outline-offset: 2px;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .icon-hide,
.password-toggle.is-visible .icon-show {
    display: none;
}

.password-toggle.is-visible .icon-hide {
    display: block;
}

input[readonly] {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.16);
    border-color: #60a5fa;
}

.btn {
    min-height: 38px;
    border: none;
    border-radius: 12px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
}

.btn.ghost,
.btn.small {
    background: #fff;
    color: #334155;
    border: 1px solid rgba(203, 213, 225, 0.95);
}

.btn.small {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.icon-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 17px;
}

.application-workspace .customer-list-panel .customer-toolbar .icon-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    font-size: 15px;
}

.btn.danger {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid rgba(244, 114, 182, 0.25);
}

.notice {
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    transition: opacity 0.28s ease, transform 0.28s ease, margin 0.28s ease, padding 0.28s ease, max-height 0.28s ease;
    max-height: 120px;
    overflow: hidden;
}

.notice.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
    pointer-events: none;
}

.notice.success {
    color: #047857;
}

.notice.error {
    color: #b91c1c;
}

.error-text {
    margin: 0;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
}

.helper-text {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.settings-help-text {
    margin-top: -2px;
}

.section-helper-text {
    margin: 0 0 12px;
}

.login-form-actions {
    align-items: center;
    justify-content: center;
}

.forgot-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    align-self: center;
    justify-self: center;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-link:hover,
.forgot-link:focus-visible {
    text-decoration: underline;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.panel-tab-nav {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-tab-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.45);
    font-size: 18px;
    line-height: 1;
}

.logout-btn:hover,
.logout-btn:focus-visible {
    background: #ffe4e6;
    border-color: rgba(225, 29, 72, 0.7);
    outline: 2px solid rgba(244, 63, 94, 0.16);
}

.tab-link {
    min-height: 34px;
    border-radius: 999px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.tab-link.is-active {
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.92);
    border-color: rgba(96, 165, 250, 0.9);
}

.customer-summary-row,
.stats-grid,
.content-grid {
    display: grid;
    gap: 12px;
}

.customer-summary-row {
    grid-template-columns: 1fr;
    align-items: center;
    margin-bottom: 14px;
}

.stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
}

.stat-card {
    min-height: 72px;
    padding: 10px 14px;
    display: grid;
    gap: 4px;
    align-content: center;
    color: inherit;
    text-decoration: none;
}

.stat-card strong {
    font-size: 21px;
}

.stat-card span {
    font-size: 12px;
    color: #64748b;
}

.content-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
}

.content-grid.has-form-hidden {
    grid-template-columns: minmax(0, 1fr);
}

.customer-workspace {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.application-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
}

.customer-list {
    display: grid;
    gap: 6px;
}

.customer-group-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.customer-group-tab {
    min-height: 34px;
    padding: 7px 8px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.customer-group-tab strong {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 11px;
}

.customer-group-tab.is-active {
    border-color: rgba(96, 165, 250, 0.95);
    background: #dbeafe;
    color: #1d4ed8;
}

.customer-group-tab.is-active strong {
    background: #2563eb;
    color: #fff;
}

.customer-list-item {
    position: relative;
    display: block;
    padding: 10px 11px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.customer-list-item:hover,
.customer-list-item:focus-visible,
.customer-list-item.is-active {
    border-color: rgba(96, 165, 250, 0.9);
    background: rgba(219, 234, 254, 0.92);
    transform: translateY(-1px);
}

.customer-list-item.is-disconnected,
.customer-list-item.is-disconnected:hover,
.customer-list-item.is-disconnected:focus-visible,
.customer-list-item.is-disconnected.is-active {
    border-color: rgba(239, 68, 68, 0.95);
    background: rgba(254, 226, 226, 0.96);
}

.customer-list-item.is-disconnected .customer-list-link,
.customer-list-item.is-disconnected .customer-list-date,
.customer-list-item.is-disconnected strong {
    color: #b91c1c;
}

.customer-list-item strong {
    font-size: 13px;
    line-height: 1.3;
}

.customer-list-link {
    display: grid;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.customer-list-link span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.customer-list-link .customer-list-domain {
    overflow: hidden;
    color: #2563eb;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-delete-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    margin-right: auto;
}

.customer-delete-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.application-version-menu summary {
    display: grid;
    gap: 4px;
    cursor: pointer;
    list-style: none;
}

.application-version-menu summary span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.application-version-menu summary .application-list-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.application-version-menu summary::-webkit-details-marker {
    display: none;
}

.application-version-list {
    display: grid;
    gap: 6px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid rgba(147, 197, 253, 0.55);
}

.application-list .application-version-list {
    display: none;
}

.application-side-menu {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(147, 197, 253, 0.55);
}

.application-side-menu-head {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
}

.application-side-menu-head span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.application-side-version-list {
    display: grid;
    gap: 7px;
}

.application-version-editor {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.application-version-tab-menu {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    position: sticky;
    top: 14px;
}

.application-version-edit-form {
    min-width: 0;
}

.application-delete-hidden-form {
    display: none;
}

.application-profile-form {
    gap: 10px;
}

.application-profile-form .form-actions {
    justify-content: flex-end;
}

.application-delete-icon-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    margin-right: auto;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.rich-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rich-editor-tool {
    width: 38px;
    min-width: 38px;
    height: 36px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    background: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.rich-editor-tool.is-italic {
    font-style: italic;
}

.rich-editor-tool:hover,
.rich-editor-tool:focus-visible,
.rich-editor-tool.is-active {
    border-color: rgba(96, 165, 250, 0.95);
    background: rgba(219, 234, 254, 0.92);
    outline: 2px solid rgba(37, 99, 235, 0.14);
}

.rich-editor-surface {
    min-height: 320px;
    max-height: 520px;
    overflow: auto;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 14px;
    padding: 14px;
    color: #0f172a;
    background: #fff;
    line-height: 1.55;
    outline: none;
}

.rich-editor-surface:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.rich-editor-surface p {
    margin: 0 0 10px;
}

.rich-editor-surface p:last-child,
.rich-editor-surface ul:last-child,
.rich-editor-surface ol:last-child {
    margin-bottom: 0;
}

.rich-editor-surface ul,
.rich-editor-surface ol {
    margin: 0 0 10px;
    padding-left: 22px;
}

.danger-btn {
    color: #e11d48;
    border-color: rgba(244, 63, 94, 0.35);
    background: #fff1f2;
}

.danger-btn:hover,
.danger-btn:focus-visible {
    color: #be123c;
    border-color: rgba(244, 63, 94, 0.65);
    background: #ffe4e6;
}

.danger-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.delete-icon-btn,
.btn.delete-icon-btn,
.btn.ghost.delete-icon-btn,
.application-form-icon-action.delete-icon-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-color: rgba(244, 63, 94, 0.45);
    color: #e11d48 !important;
    background: #fff1f2;
    font-size: 18px;
    line-height: 1;
}

.delete-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.delete-icon-btn:hover,
.delete-icon-btn:focus-visible,
.btn.delete-icon-btn:hover,
.btn.delete-icon-btn:focus-visible,
.application-form-icon-action.delete-icon-btn:hover,
.application-form-icon-action.delete-icon-btn:focus-visible {
    color: #be123c !important;
    border-color: rgba(244, 63, 94, 0.75);
    background: #ffe4e6;
    outline: 2px solid rgba(225, 29, 72, 0.16);
}

.delete-icon-btn:disabled,
.btn.delete-icon-btn:disabled,
.application-form-icon-action.delete-icon-btn:disabled {
    color: #e11d48 !important;
    border-color: rgba(244, 63, 94, 0.32);
    background: #fff1f2;
    opacity: 0.55;
    cursor: not-allowed;
}

.application-version-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.application-version-link,
.application-version-add {
    min-height: 32px;
    border-radius: 10px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(203, 213, 225, 0.8);
}

.application-version-link {
    flex: 1 1 auto;
    min-width: 0;
}

.application-version-link.is-active {
    color: #1d4ed8;
    border-color: rgba(96, 165, 250, 0.9);
    background: #eff6ff;
}

.application-version-add.is-active {
    color: #1d4ed8;
    border-color: rgba(96, 165, 250, 0.9);
    background: #eff6ff;
}

.application-version-link.is-draft {
    border-style: dashed;
    cursor: default;
}

.application-version-link small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.application-version-add {
    justify-content: center;
    color: #1d4ed8;
    background: #fff;
}

.application-panel-url-row {
    grid-template-columns: 1fr;
}

.application-panel-url-field {
    display: grid;
    gap: 6px;
    position: relative;
}

.application-panel-url-field label {
    min-width: 0;
}

.application-panel-url-dropdown {
    position: relative;
    display: block;
}

.application-panel-url-dropdown .application-panel-url-input {
    padding-right: 34px;
}

.application-panel-url-picker-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 34px;
    height: calc(100% - 2px);
    border: 0;
    border-left: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 0 11px 11px 0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
}

.application-panel-url-picker-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transform: translate(-50%, -35%);
}

.application-panel-url-picker-toggle[aria-expanded="true"]::before {
    border-top: 0;
    border-bottom: 6px solid currentColor;
    transform: translate(-50%, -55%);
}

.application-panel-url-picker {
    display: grid;
    height: 0;
    position: relative;
    z-index: 30;
}

.application-panel-url-add,
.application-panel-url-option-use,
.application-panel-url-option-remove {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}

.application-panel-url-option-use,
.application-panel-url-option-remove {
    width: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.application-panel-url-picker-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}

.application-panel-url-picker-panel[hidden] {
    display: none;
}

.application-panel-url-options {
    display: grid;
    gap: 7px;
}

.application-panel-url-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    align-items: center;
}

.application-panel-url-option-row input {
    min-height: 36px;
    font-size: 12px;
}

.application-panel-url-option-remove {
    color: #be123c;
    border-color: rgba(244, 63, 94, 0.35);
    background: #fff1f2;
}

.application-shell-form {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.7);
}

.application-shell-actions {
    justify-content: flex-end;
}

.customer-list-item .status-pill {
    width: fit-content;
    margin-top: 2px;
}

.customer-list-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 2px;
}

.customer-list-date {
    font-size: 11px;
    color: #64748b;
}

.customer-list-meta .status-pill {
    margin-left: auto;
}

.customer-detail-panel,
.customer-list-panel {
    min-width: 0;
}

.customer-detail-panel {
    background: #fff;
    min-height: 216px;
    align-self: stretch;
    box-sizing: border-box;
}

.customer-detail-panel--summary {
    display: block;
    padding: 14px;
}

.stats-grid--detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
}

.stats-grid--detail .stat-card {
    min-height: 96px;
    padding: 16px 18px;
}

.stats-grid--detail .stat-card strong {
    font-size: 28px;
}

.stats-grid--detail .stat-card span {
    font-size: 13px;
}

.customer-list-panel {
    padding: 14px;
}

.customer-list-panel .panel-head {
    margin-bottom: 10px;
    align-items: center;
}

.customer-list-panel .panel-head h2 {
    font-size: 16px;
}

.customer-detail-subnav {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 12px;
}

.customer-detail-subnav .settings-subnav-link {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    align-items: center;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 12px;
}

.customer-detail-form {
    gap: 12px;
}

.customer-detail-form > .form-actions {
    justify-content: flex-end;
}

.customer-description-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    grid-column: 1 / -1;
}

.customer-description-field {
    width: 100%;
    grid-column: 1 / -1;
}

.customer-description-row .customer-description-field textarea {
    width: 100%;
    min-height: 64px;
    resize: vertical;
}

#customer-app-description {
    width: 100% !important;
    min-height: 64px;
}

.customer-client-info {
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid #cbdcf4;
    border-radius: 14px;
    background: #f8fbff;
}

.customer-client-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.customer-client-info-head strong {
    color: #0f3f92;
    font-size: 14px;
}

.customer-client-info-head span {
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.customer-client-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.customer-client-info-grid div {
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.customer-client-info-grid dt {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.customer-client-info-grid dd {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    word-break: break-word;
}

.customer-client-info-grid code {
    font-family: inherit;
    font-size: 12px;
}

.customer-client-user-agent {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    background: #eef5ff;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.application-update-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #cbdcf4;
    border-radius: 14px;
    background: #f8fbff;
}

.application-update-box > div {
    display: grid;
    gap: 4px;
}

.application-update-box strong {
    color: #0f3f92;
    font-size: 14px;
}

.application-update-box span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.application-package-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.application-package-file-row input[type="file"] {
    flex: 1;
    min-width: 0;
}

.application-update-box > div.application-package-loaded-row {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.application-package-loaded-row .helper-text {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.application-package-remove {
    width: auto;
    min-width: 34px;
    min-height: 24px;
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 8px;
    background: #fff1f2;
    color: #be123c;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.application-package-remove:hover,
.application-package-remove:focus-visible {
    outline: 2px solid rgba(244, 63, 94, 0.16);
}

.customer-detail-form label:has(#customer-app-catalog-select),
.customer-detail-form label:has(#customer-app-version),
.customer-detail-form label:has(input[name="installation_key"]) {
    display: none;
}

.customer-detail-form .split:has(#customer-app-catalog-select-sales),
.customer-detail-form .split:has(#customer-plan-name),
.customer-detail-form .split:has(input[name="starts_at"]),
.customer-detail-form .split:has(select[name="status"]),
.customer-detail-form label:has(#customer-app-description-sales) {
    display: none;
}

.customer-detail-form .split:has(#customer-app-catalog-select-sales) + .helper-text {
    display: none;
}

.customer-note-list {
    display: grid;
    gap: 10px;
}

.customer-note-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.9);
}

.customer-note-card strong {
    font-size: 12px;
    color: #1d4ed8;
}

.customer-note-card p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.customer-sale-list {
    display: grid;
    gap: 10px;
}

.customer-sale-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
}

.customer-sale-card p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.customer-sale-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.customer-sale-grid span {
    font-size: 12px;
    color: #475569;
}

.customer-note-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.customer-note-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn.tiny {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
    border-radius: 10px;
}

.customer-form-panel.is-hidden {
    display: none;
}

.secondary-grid {
    margin-top: 12px;
}

.settings-grid {
    margin-bottom: 12px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.settings-sidebar {
    width: 240px;
    max-width: 100%;
    position: sticky;
    top: 18px;
    align-self: start;
}

.settings-content {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.settings-subnav {
    display: grid;
    gap: 8px;
}

.settings-subnav.customer-detail-subnav {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
}

.settings-subnav-link {
    display: flex;
    width: 100%;
    border-radius: 14px;
    padding: 11px 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.95);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.settings-subnav-link:hover,
.settings-subnav-link:focus-visible,
.settings-subnav-link.is-active {
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.92);
    border-color: rgba(96, 165, 250, 0.9);
    transform: translateY(-1px);
}

.application-detail-tabs {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.application-detail-tabs .settings-subnav-link {
    width: auto;
    min-width: 112px;
    min-height: 38px;
    padding: 9px 16px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 900px) {
    .application-version-editor {
        grid-template-columns: 1fr;
    }

    .application-version-tab-menu {
        position: static;
    }
}

.settings-about-text {
    margin: 0 0 12px;
}

.toggle-field {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    background: #f8fafc;
}

.toggle-field input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.panel {
    padding: 16px;
}

.panel-spaced {
    margin-top: 0;
}

.membership-settings-grid {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    margin-bottom: 18px;
}

.portal-logo-form {
    width: fit-content;
    margin: 0;
    display: block;
}

.portal-logo-form .topbar-logo {
    width: 112px;
    min-width: 112px;
    height: 112px;
    border-radius: 16px;
}

.portal-logo-form .topbar-logo img {
    border-radius: 15px;
}

.portal-logo-trigger {
    border: 0;
    padding: 0;
    border-radius: 16px;
    display: inline-flex;
    background: transparent;
    cursor: pointer;
}

.portal-logo-trigger:hover .topbar-logo,
.portal-logo-trigger:focus-visible .topbar-logo {
    border-color: rgba(37, 99, 235, 0.95);
    outline: 2px solid rgba(37, 99, 235, 0.16);
}

.portal-logo-file,
.portal-logo-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.password-change-form {
    margin-top: 14px;
}

.password-change-form > .btn {
    justify-self: end;
    width: auto;
    min-width: 180px;
}

.membership-login-form .helper-text {
    margin-bottom: 0;
    margin-left: -150px;
}

#sifre .panel-spaced > .btn {
    justify-self: end;
    min-width: 180px;
}

#hakkimda .form-actions {
    justify-content: flex-end;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-head .eyebrow {
    margin-bottom: 0;
    font-size: 14px;
    letter-spacing: 0.03em;
}

.customer-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-search-form input {
    width: min(280px, 100%);
}

.customer-search-form--nav {
    flex-wrap: nowrap;
    width: 100%;
    justify-self: stretch;
}

.customer-search-form--nav input {
    flex: 1 1 320px;
    width: auto;
    min-width: 220px;
}

.customer-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(8px);
}

.customer-modal {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.delete-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
}

.delete-confirm-backdrop[hidden] {
    display: none;
}

.delete-confirm-modal {
    width: min(420px, 100%);
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(244, 114, 182, 0.32);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.delete-confirm-modal strong {
    font-size: 16px;
    color: #0f172a;
}

.delete-confirm-modal p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sale-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.field-span-all {
    grid-column: 1 / -1;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.info-card {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
    display: grid;
    gap: 4px;
}

.info-card strong {
    font-size: 12px;
    color: #0f172a;
}

.info-card span {
    font-size: 12px;
    color: #64748b;
    word-break: break-word;
}

.table-wrap {
    overflow: auto;
}

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

th,
td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    text-align: left;
    vertical-align: top;
    font-size: 12px;
}

td strong {
    display: block;
    margin-bottom: 4px;
}

td span {
    color: #64748b;
}

.empty-cell {
    color: #64748b;
    text-align: center;
    padding: 22px 14px;
}

.row-actions {
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 800;
}

.status-pill.is-active {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.status-pill.is-trial {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.status-pill.is-passive,
.status-pill.is-expired,
.status-pill.is-disconnected {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.status-pill.is-pending,
.status-pill.is-scheduled {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.application-form-actions {
    align-items: center;
    justify-content: flex-end;
}

.application-form-icon-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}

.application-form-icon-action {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    background: #fff;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.application-form-icon-danger {
    color: #be123c;
    border-color: rgba(244, 63, 94, 0.35);
    background: #fff1f2;
}

.application-form-icon-action:disabled {
    color: #94a3b8;
    border-color: rgba(203, 213, 225, 0.65);
    background: #f8fafc;
    cursor: not-allowed;
}

.application-form-icon-action.delete-icon-btn:disabled {
    color: #e11d48 !important;
    border-color: rgba(244, 63, 94, 0.32);
    background: #fff1f2;
}

.application-form-icon-action:hover,
.application-form-icon-action:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.16);
}

.customer-sale-form-actions {
    justify-content: flex-end;
    width: 100%;
}

.customer-modal .customer-sale-form-actions {
    justify-content: flex-end;
}

.api-card-list {
    display: grid;
    gap: 10px;
}

.api-card {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
}

.api-card strong,
.api-card code {
    display: block;
}

.api-card code {
    margin-top: 6px;
    font-size: 12px;
    word-break: break-all;
}

.api-card p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.4;
    font-size: 12px;
}

@media (max-width: 860px) {
    .customer-summary-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-self: stretch;
        width: 100%;
    }

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

    .customer-workspace {
        grid-template-columns: 1fr;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        width: 100%;
        position: static;
    }

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

    .customer-toolbar,
    .customer-search-form {
        width: 100%;
    }

    .customer-toolbar {
        justify-content: flex-start;
    }

    .customer-search-form input,
    .customer-search-form .btn,
    .customer-toolbar > .btn,
    .logout-form {
        width: 100%;
    }

    .logout-btn {
        width: 40px;
        min-width: 40px;
    }

    .panel-tab-nav {
        justify-content: flex-start;
    }

    .settings-subnav.customer-detail-subnav {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .customer-detail-subnav .settings-subnav-link {
        width: 100%;
    }

    .customer-modal-backdrop {
        padding: 12px;
        align-items: stretch;
    }

    .customer-modal {
        width: min(100%, calc(100vw - 12px));
        max-height: calc(100vh - 24px);
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(100vw - 20px, 100%);
        padding-top: 12px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .membership-settings-grid {
        grid-template-columns: 1fr;
    }

    .membership-login-form .helper-text {
        margin-left: 0;
    }

    .split,
    .customer-description-row,
    .customer-client-info-grid,
    .customer-summary-row,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tab-nav {
        gap: 8px;
    }

    .topbar-actions .tab-link {
        width: 100%;
    }
}
