:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --line: #e8e9f0;
  --line-strong: #dedfea;
  --text: #1c1d2b;
  --muted: #858898;
  --muted-dark: #636577;
  --purple: #635bff;
  --purple-dark: #5149e9;
  --purple-soft: #f0efff;
  --teal: #10a58b;
  --teal-soft: #e8f8f4;
  --orange: #e89a3d;
  --orange-soft: #fff5e8;
  --shadow: 0 10px 35px rgba(42, 44, 78, 0.05);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Manrope", "Noto Sans JP", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: 244px; flex: 0 0 244px; display: flex; flex-direction: column; padding: 30px 16px 18px; background: #fbfbfd; border-right: 1px solid var(--line); }
.brand-mark, .mobile-brand { display: flex; align-items: center; gap: 10px; color: #262536; font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.brand-icon { width: 30px; height: 30px; display: grid; place-items: center; color: white; background: var(--purple); border-radius: 9px; box-shadow: 0 5px 12px rgba(99, 91, 255, 0.25); }
.brand-icon svg { width: 19px; height: 19px; }
.primary-nav { margin-top: 61px; }
.nav-label { margin: 0 11px 13px; color: #afb0be; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 13px; height: 46px; padding: 0 13px; color: var(--muted-dark); border-radius: 11px; font-size: 13px; font-weight: 600; text-decoration: none; transition: .2s ease; }
.nav-item:hover { color: var(--text); background: #f1f1f8; }
.nav-item.active { color: var(--purple); background: var(--purple-soft); }
.nav-item-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-item-icon svg { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; }
.sync-status { display: flex; align-items: center; gap: 7px; margin: 0 5px 17px; color: #8c8e9b; font-size: 10px; }
.status-dot { width: 7px; height: 7px; background: #36c69b; border-radius: 50%; box-shadow: 0 0 0 3px #e5f8f1; }
.sync-time { margin-left: auto; color: #b0b1bd; font-family: "DM Mono", monospace; font-size: 9px; }
.profile-row { display: flex; align-items: center; gap: 9px; padding: 15px 5px 3px; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: #584cc6; background: #dedbff; border-radius: 50%; font-size: 9px; font-weight: 800; }
.profile-row strong, .profile-row span { display: block; }
.profile-row strong { color: #464757; font-size: 11px; }
.profile-row span { margin-top: 2px; color: #aaaab6; font-size: 9px; }

.main-content { min-width: 0; flex: 1; }
.topbar { height: 83px; display: flex; align-items: center; justify-content: space-between; padding: 0 55px; border-bottom: 1px solid var(--line); background: rgba(251, 251, 253, .65); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #a6a7b5; font-size: 12px; }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb strong { color: #3f4051; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.icon-button { border: 0; background: transparent; color: #9294a2; }
.icon-button svg { width: 18px; height: 18px; }
.notification-button { position: relative; display: grid; place-items: center; width: 26px; height: 30px; }
.notification-badge { position: absolute; top: 4px; right: 2px; width: 5px; height: 5px; background: var(--purple); border: 1.5px solid var(--bg); border-radius: 50%; }
.help-link { display: flex; align-items: center; gap: 8px; padding: 0; color: #858694; border: 0; background: transparent; font-size: 11px; }
.help-link span { width: 17px; height: 17px; display: grid; place-items: center; color: #737587; border: 1px solid #bfc0ca; border-radius: 50%; font-size: 11px; font-weight: 700; }
.mobile-brand { display: none; }

.page-wrap { max-width: 1278px; margin: 0 auto; padding: 46px 55px 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.eyebrow, .modal-kicker { color: var(--purple); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .14em; }
h1, h2, p { margin: 0; }
h1 { margin-top: 10px; color: #282938; font-size: 31px; line-height: 1.2; letter-spacing: -.05em; }
.page-heading p { margin-top: 9px; color: #9698a8; font-size: 12px; white-space: nowrap; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 9px; font-size: 11px; font-weight: 700; transition: .2s ease; }
.primary-button { color: white; border: 1px solid var(--purple); background: var(--purple); box-shadow: 0 5px 12px rgba(99, 91, 255, .16); }
.primary-button:hover { background: var(--purple-dark); border-color: var(--purple-dark); transform: translateY(-1px); }
.plus { font-size: 17px; font-weight: 400; line-height: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 29px; }
.single-stat-grid { grid-template-columns: minmax(260px, 380px); }
.stat-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 111px; padding: 21px 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.accent-card { background: linear-gradient(135deg, #fff 65%, #f8f7ff); border-color: #dfddff; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.purple { color: var(--purple); background: var(--purple-soft); }
.stat-icon.teal { color: var(--teal); background: var(--teal-soft); }
.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }
.stat-label { display: block; color: #999aa8; font-size: 10px; font-weight: 600; }
.stat-card strong { display: inline-block; margin-top: 4px; color: #2d2e3d; font-size: 24px; line-height: 1; letter-spacing: -.05em; }
.stat-note { display: inline-block; margin-left: 7px; color: #b0b1bd; font-size: 9px; }
.stat-trend { position: absolute; top: 22px; right: 19px; color: #4db695; font-family: "DM Mono", monospace; font-size: 10px; }
.stat-trend small { display: block; margin-top: 4px; color: #b0b1bd; font-family: "Manrope", sans-serif; font-size: 8px; text-align: right; }
.online-pill { position: absolute; top: 23px; right: 17px; display: flex; align-items: center; gap: 5px; color: #50a88e; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .04em; }
.online-pill i { width: 6px; height: 6px; background: #52c29b; border-radius: 50%; }
.online-pill.empty { display: none; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.numbers-panel { min-width: 0; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 25px 26px 17px; }
.panel-header.compact { padding: 22px 22px 17px; }
.panel-header h2 { color: #30313f; font-size: 14px; letter-spacing: -.02em; }
.panel-header p { margin-top: 5px; color: #a5a6b4; font-size: 10px; }
.panel-tools { display: flex; align-items: center; gap: 10px; }
.price-sync-note { display: inline-flex; align-items: center; gap: 5px; color: #9d9eac; font-family: "DM Mono", monospace; font-size: 8px; white-space: nowrap; }
.price-sync-note i { width: 6px; height: 6px; background: #4fbf99; border-radius: 50%; box-shadow: 0 0 0 3px #e7f8f2; }
.price-sync-note i.offline { background: #e8a047; box-shadow: 0 0 0 3px #fff3e2; }
.numbers-panel:not(.card-view) .price-sync-note { display: none; }
.view-toggle { display: flex; gap: 3px; padding: 3px; background: #f5f5f9; border-radius: 7px; }
.view-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 66px; height: 27px; padding: 0 8px; color: #9294a2; border: 0; border-radius: 5px; background: transparent; font-size: 9px; font-weight: 700; white-space: nowrap; }
.view-button.active { color: var(--purple); background: white; box-shadow: 0 2px 5px rgba(40, 40, 80, .07); }
.view-button svg { width: 14px; height: 14px; }
.number-list-header { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 0 9px; padding: 0 17px 8px; color: #b0b1bc; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .02em; }
.number-list { padding: 0 9px; }
.empty-state { grid-column: 1 / -1; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 7px; min-height: 154px; margin: 0 12px; color: #a5a6b4; text-align: center; font-size: 10px; }
.empty-state strong { color: #5d5e6e; font-size: 12px; }
.number-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; min-height: 52px; padding: 9px 17px; border-top: 1px solid #f0f0f4; outline: none; cursor: pointer; }
.number-row:first-child { border-top: 0; }
.number-list:not(.grid-view) .number-row:hover { background: #fafaff; }
.number-row.selected { background: #fafaff; border: 1px solid #e2e0ff; border-radius: 11px; }
.number-row.selected + .number-row { border-top-color: transparent; }
.number-row:focus-visible { box-shadow: 0 0 0 3px rgba(99, 91, 255, .16); }
.number-list:not(.grid-view) .number-avatar,
.number-list:not(.grid-view) .number-name > span,
.number-list:not(.grid-view) .number-plan,
.number-list:not(.grid-view) .current-label,
.number-list:not(.grid-view) .contract-since,
.number-list:not(.grid-view) .number-actions,
.number-list:not(.grid-view) .switcher { display: none; }
.number-list:not(.grid-view) .carrier-line { margin-top: 0; }
.number-list:not(.grid-view) .device-chip { padding: 0; background: transparent; }
.list-footer #clear-selection { display: none; }
.card-view #clear-selection { display: inline-flex; }
.card-view .number-list-header { display: none; }
.number-list.grid-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 18px 18px; }
.grid-view .number-row { grid-template-columns: minmax(180px, .85fr) minmax(180px, 1.25fr) minmax(145px, .9fr) minmax(170px, 1fr); grid-template-rows: auto auto; align-items: center; gap: 3px 14px; min-height: 92px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 3px 12px rgba(42, 44, 78, .035); }
.grid-view .number-row:hover { border-color: #d7d4ff; box-shadow: 0 6px 18px rgba(70, 65, 150, .07); }
.grid-view .number-row.selected { border-color: #c9c6ff; background: #fafaff; }
.grid-view .number-row.selected + .number-row { border-top-color: var(--line); }
.grid-view .number-main { grid-column: 1; grid-row: 1; align-self: end; }
.grid-view .number-carrier { grid-column: 1; grid-row: 2; padding-left: 48px; align-self: start; }
.grid-view .carrier-line { margin-top: 0; }
.grid-view .number-plan { grid-column: 2; grid-row: 1 / 3; }
.grid-view .number-current { grid-column: 3; grid-row: 1; align-self: end; }
.grid-view .contract-since { grid-column: 3; grid-row: 2; margin-top: 2px; align-self: start; }
.grid-view .number-actions { grid-column: 4; grid-row: 1 / 3; }
.grid-view .switcher { grid-column: 1 / -1; grid-row: 3; padding: 10px 0 1px 48px; margin-top: 0; }
.number-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.number-carrier { min-width: 0; }
.number-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--purple); background: var(--purple-soft); border-radius: 10px; }
.number-avatar svg { width: 18px; height: 18px; }
.number-name { min-width: 0; }
.number-name strong { display: block; overflow: hidden; color: #333442; font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.number-name > span { display: block; overflow: hidden; margin-top: 5px; color: #a5a6b3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.carrier-line { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 7px; }
.carrier-mark { width: 16px; height: 16px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--carrier-color); border-radius: 5px; font-family: "Manrope", sans-serif; font-size: 8px; font-weight: 800; line-height: 1; }
.carrier-name { overflow: hidden; color: #676877; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.carrier-link { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; margin-left: 2px; color: #9d9eac; font-size: 8px; text-decoration: none; }
.carrier-link:hover { color: var(--purple); text-decoration: underline; }
.carrier-link svg { width: 10px; height: 10px; }
.current-label { margin-bottom: 6px; color: #aaaab7; font-size: 8px; }
.device-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 9px; color: #565766; background: #f5f5f8; border-radius: 6px; font-size: 10px; font-weight: 600; }
.device-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-chip .device-mini-icon { width: 14px; height: 14px; display: grid; place-items: center; flex: 0 0 auto; color: #8c8d9b; }
.device-mini-icon svg { width: 14px; height: 14px; }
.contract-since { display: flex; align-items: center; gap: 6px; margin-top: 6px; white-space: nowrap; }
.contract-since span { color: #aaaab7; font-size: 8px; }
.contract-since strong { color: #686978; font-family: "DM Mono", "Noto Sans JP", sans-serif; font-size: 9px; font-weight: 500; }
.number-plan { min-width: 0; }
.plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 0; }
.plan-heading span { color: #aaaab7; font-size: 8px; }
.plan-edit { padding: 0; color: #9d9eac; border: 0; background: transparent; font-size: 8px; }
.plan-edit:hover { color: var(--purple); text-decoration: underline; }
.plan-name { overflow: hidden; margin-top: 4px; color: #5d5e6e; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.plan-price-row { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 5px; }
.plan-price-row strong { color: #292a3a; font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: -.04em; white-space: nowrap; }
.price-status { padding: 3px 5px; border-radius: 4px; font-size: 7px; font-weight: 700; white-space: nowrap; }
.price-status.synced { color: #3aa889; background: var(--teal-soft); }
.price-status.pending { color: #bd8538; background: var(--orange-soft); }
.price-updated { margin-top: 4px; color: #b0b1bc; font-family: "DM Mono", monospace; font-size: 7px; }
.plan-source { display: inline-flex; align-items: center; gap: 3px; margin-top: 5px; color: #9d9eac; font-size: 8px; text-decoration: none; }
.plan-source:hover { color: var(--purple); text-decoration: underline; }
.plan-source svg { width: 10px; height: 10px; }
.detail-hint { display: block; margin-top: 8px; color: #b0b1bc; font-size: 8px; }
.number-actions { display: flex; align-items: center; gap: 7px; }
.number-actions > button { flex: 1; min-width: 0; white-space: nowrap; }
.details-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 27px; padding: 0 7px; color: #777887; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; font-weight: 700; transition: .2s ease; }
.details-button:hover { color: var(--purple); border-color: #c9c6ff; background: #fcfbff; }
.details-button svg { width: 12px; height: 12px; }
.switch-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 0 10px; color: var(--purple); border: 1px solid #dedcff; border-radius: 7px; background: #fbfaff; font-size: 9px; font-weight: 700; transition: .2s ease; }
.switch-button:hover, .switch-button.active { color: white; border-color: var(--purple); background: var(--purple); }
.switch-button svg { width: 13px; height: 13px; }
.switcher { grid-column: 1 / -1; display: none; padding: 14px 0 1px 48px; margin-top: -8px; }
.number-row.expanded .switcher { display: block; }
.switcher p { margin-bottom: 9px; color: #999aa8; font-size: 9px; }
.device-options { display: flex; flex-wrap: wrap; gap: 7px; }
.device-option { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; color: #777887; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; transition: .2s ease; }
.device-option:hover { border-color: #c6c3ff; color: var(--purple); }
.device-option.active { color: var(--purple); border-color: #c9c6ff; background: var(--purple-soft); font-weight: 700; }
.device-option svg { width: 13px; height: 13px; }
.row-menu { width: 24px; height: 28px; justify-self: end; color: #b1b2be; border: 0; background: transparent; letter-spacing: 1px; }
.row-menu:hover { color: var(--purple); }
.list-footer { display: flex; align-items: center; justify-content: space-between; margin: 3px 26px 0; padding: 18px 0 21px; border-top: 1px solid #f0f0f4; color: #b0b1bc; font-size: 9px; }
.list-footer b { color: #747584; font-weight: 700; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0; color: var(--purple); border: 0; background: transparent; font-size: 9px; font-weight: 700; }
.text-button:hover { color: var(--purple-dark); }
.text-button svg { width: 13px; height: 13px; }
.side-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.device-list { padding: 0 22px 10px; }
.activity-empty { padding: 10px 22px 22px; color: #a5a6b4; font-size: 10px; }
.device-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #f1f1f4; }
.device-item:first-child { border-top: 0; }
.device-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; color: #767785; background: #f3f3f7; border-radius: 9px; }
.device-icon svg { width: 16px; height: 16px; }
.device-item-info { min-width: 0; flex: 1; }
.device-item-info strong { display: block; overflow: hidden; color: #4b4c5b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-item-info span { display: block; margin-top: 4px; color: #a8a9b5; font-size: 8px; }
.device-status { display: flex; align-items: center; gap: 4px; color: #4eae92; font-family: "DM Mono", monospace; font-size: 8px; }
.device-status.idle { color: #a5a6b4; }
.device-status i { width: 5px; height: 5px; background: #50c39a; border-radius: 50%; }
.outline-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: calc(100% - 44px); min-height: 34px; margin: 3px 22px 22px; color: #777887; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; font-weight: 700; transition: .2s ease; }
.outline-button:hover { color: var(--purple); border-color: #c9c6ff; background: #fcfbff; }
.outline-button svg { width: 13px; height: 13px; }
.activity-list { padding: 0 22px 10px; }
.activity-item { position: relative; display: flex; gap: 11px; padding: 12px 0 12px 1px; border-top: 1px solid #f1f1f4; }
.activity-item:first-child { border-top: 0; }
.activity-dot { position: relative; width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: var(--purple); }
.activity-dot::after { content: ""; position: absolute; top: 12px; left: 3px; width: 1px; height: 29px; background: #e8e7f8; }
.activity-item:last-child .activity-dot::after { display: none; }
.activity-copy { min-width: 0; }
.activity-copy p { color: #6a6b7b; font-size: 9px; line-height: 1.5; }
.activity-copy p strong { color: #414251; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; }
.activity-copy span { display: block; margin-top: 4px; color: #b1b2be; font-family: "DM Mono", monospace; font-size: 8px; }
.full-width { width: calc(100% - 44px); margin: 4px 22px 21px; padding-top: 15px; border-top: 1px solid #f1f1f4; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(26, 26, 43, .28); backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; animation: fade-in .16s ease-out; }
.modal { width: min(100%, 410px); padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 22px 80px rgba(31, 31, 63, .18); animation: slide-up .2s ease-out; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.modal h2 { margin-top: 7px; color: #282938; font-size: 21px; letter-spacing: -.04em; }
.modal-description { margin-top: 10px; color: #9293a1; font-size: 10px; line-height: 1.7; }
.modal-close { width: 28px; height: 28px; color: #9293a1; border: 0; border-radius: 7px; background: #f6f6fa; font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal form { margin-top: 22px; }
.modal label { display: block; margin-top: 16px; color: #656675; font-size: 10px; font-weight: 700; }
.modal label:first-child { margin-top: 0; }
.modal input, .modal select { width: 100%; height: 42px; margin-top: 8px; padding: 0 12px; color: #454654; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; background: white; font-size: 11px; }
.modal input:focus, .modal select:focus { border-color: #bcb9ff; box-shadow: 0 0 0 3px var(--purple-soft); }
.price-hint { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: #9d9eac; font-size: 8px; font-weight: 500; }
.price-hint svg { width: 13px; height: 13px; color: var(--teal); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.secondary-button { color: #757685; border: 1px solid var(--line); background: white; }
.secondary-button:hover { background: #f8f8fb; }
.detail-modal { width: min(100%, 470px); }
.detail-hero { display: flex; align-items: center; gap: 11px; margin-top: 23px; padding: 15px; border: 1px solid #ecebfa; border-radius: 11px; background: #fbfaff; }
.detail-number-icon { width: 37px; height: 37px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 10px; }
.detail-number-icon svg { width: 19px; height: 19px; }
.detail-hero div:nth-child(2) { min-width: 0; flex: 1; }
.detail-hero span, .detail-hero strong { display: block; }
.detail-hero span:first-child { overflow: hidden; color: #686978; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero strong { margin-top: 4px; color: #3f4050; font-size: 11px; }
.detail-active { display: inline-flex !important; align-items: center; gap: 5px; color: #48a98b !important; font-family: "DM Mono", monospace; font-size: 8px !important; white-space: nowrap; }
.detail-active i { width: 6px; height: 6px; background: #50c39a; border-radius: 50%; }
.detail-price-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 16px; border-radius: 11px; background: #f6f6fb; }
.detail-price-card span:first-child { display: block; color: #9b9ca9; font-size: 9px; }
.detail-price-card strong { display: block; margin-top: 5px; color: #282938; font-family: "DM Mono", monospace; font-size: 20px; font-weight: 500; letter-spacing: -.05em; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.detail-item { min-width: 0; padding: 13px; background: white; }
.detail-item:last-child { grid-column: 1 / -1; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: #a3a4b0; font-size: 8px; }
.detail-item strong { overflow: hidden; margin-top: 5px; color: #565766; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-switch { margin-top: 17px; }
.detail-switch > span { display: block; margin-bottom: 9px; color: #777887; font-size: 10px; font-weight: 700; }
.detail-note { margin-top: 12px; color: #9d9eac; font-size: 9px; line-height: 1.65; }
.toast { position: fixed; z-index: 20; right: 25px; bottom: 25px; display: flex; align-items: center; gap: 9px; min-width: 190px; padding: 12px 15px; color: #4c4d5d; border: 1px solid #d7f1e8; border-radius: 10px; background: white; box-shadow: 0 12px 30px rgba(41, 46, 71, .13); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon { width: 19px; height: 19px; display: grid; place-items: center; color: #129b79; background: var(--teal-soft); border-radius: 50%; font-size: 11px; font-weight: 800; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1160px) {
  .grid-view .number-row { grid-template-columns: minmax(180px, .9fr) minmax(170px, 1.15fr) minmax(0, .95fr); }
  .grid-view .number-actions { grid-column: 1 / -1; grid-row: 3; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #f0f0f4; }
  .grid-view .number-actions > button { flex: 0 1 125px; }
  .grid-view .switcher { grid-row: 4; padding-top: 5px; }
}
@media (max-width: 1050px) {
  .topbar { padding: 0 30px; }
  .page-wrap { padding-right: 30px; padding-left: 30px; }
  .number-row, .number-list-header { gap: 10px; }
}
@media (max-width: 1000px) {
  .sidebar { display: none; }
  .topbar { height: 67px; padding: 0 20px; }
  .mobile-brand { display: flex; font-size: 14px; }
  .mobile-brand .brand-icon { width: 26px; height: 26px; border-radius: 8px; }
  .mobile-brand .brand-icon svg { width: 17px; height: 17px; }
  .breadcrumb, .help-link { display: none; }
  .page-wrap { padding: 31px 20px 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 27px; }
  .page-heading .primary-button { align-self: stretch; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { min-height: 93px; }
  .number-row, .number-list-header { gap: 10px; }
  .switcher { grid-column: 1 / -1; padding-left: 0; }
}
@media (max-width: 700px) {
  .number-list-header { display: none; }
  .number-row { gap: 8px; }
  .number-list.grid-view { padding: 0 12px 14px; }
  .grid-view .number-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding: 15px; }
  .grid-view .number-main { grid-column: 1; grid-row: 1; align-self: start; }
  .grid-view .number-avatar { display: none; }
  .grid-view .number-carrier { grid-column: 1; grid-row: 2; padding-left: 0; align-self: start; }
  .grid-view .number-plan { grid-column: 2; grid-row: 1 / 3; align-self: start; padding-left: 12px; border-left: 1px solid #f0f0f4; }
  .grid-view .plan-name, .grid-view .plan-price-row strong { overflow-wrap: anywhere; white-space: normal; }
  .grid-view .plan-price-row { flex-wrap: wrap; }
  .grid-view .number-current { grid-column: 1; grid-row: 3; }
  .grid-view .contract-since { grid-column: 2; grid-row: 3; display: flex; align-items: flex-start; flex-direction: column; gap: 6px; }
  .grid-view .number-actions { grid-column: 1 / -1; grid-row: 4; }
  .grid-view .number-actions > button { flex: 1; }
  .grid-view .switcher { grid-row: 5; padding-left: 0; }
  .side-column { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  h1 { font-size: 28px; }
  .page-heading p { line-height: 1.6; }
  .panel-header { padding-right: 18px; padding-left: 18px; }
  .panel-tools { align-items: flex-end; flex-direction: column-reverse; gap: 6px; }
  .price-sync-note { font-size: 7px; }
  .number-list { padding-right: 5px; padding-left: 5px; }
  .number-row { padding: 9px 11px; }
  .number-list:not(.grid-view) .number-name strong { font-size: 11px; }
  .number-list:not(.grid-view) .device-chip { font-size: 9px; }
  .number-list:not(.grid-view) .carrier-link { margin-left: 0; font-size: 0; }
  .number-list:not(.grid-view) .carrier-link svg { width: 12px; height: 12px; }
  .grid-view .number-name strong { font-size: 11px; }
  .grid-view .carrier-link { margin-left: 0; font-size: 0; }
  .grid-view .carrier-link svg { width: 12px; height: 12px; }
  .number-actions { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .list-footer { margin-right: 18px; margin-left: 18px; }
  .modal { padding: 22px; }
  .toast { right: 15px; bottom: 15px; left: 15px; justify-content: center; }
}
