:root {
    --bg: #f1f5f9;
    --bg-strong: #e2e8f0;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --line: rgba(148, 163, 184, 0.22);
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #2563eb;
    --danger: #b91c1c;
    --shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.1), transparent 22%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

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

img {
    display: block;
    max-width: 100%;
}

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

[hidden] {
    display: none !important;
}

.page-shell {
    width: min(1680px, calc(100% - 24px));
    margin: 0 auto;
    padding: 12px 0 20px;
}

.app-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.app-sidebar {
    position: sticky;
    top: 12px;
    min-height: calc(100vh - 24px);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: var(--shadow);
    padding: 18px 16px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 18px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 800;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.18);
}

.sidebar-group {
    display: grid;
    gap: 8px;
}

.sidebar-metrics-group {
    align-content: start;
}

#profile-nav-list {
    display: grid;
    gap: 8px;
}

.sidebar-group-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 0 6px;
}

.profile-nav-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.profile-nav-item:hover {
    background: rgba(241, 245, 249, 0.9);
    color: var(--text);
}

.profile-nav-item.is-active {
    background: rgba(240, 249, 255, 0.95);
    color: #1d4ed8;
    border-color: rgba(147, 197, 253, 0.7);
}

.profile-add-button {
    width: 100%;
    border: 1px dashed rgba(148, 163, 184, 0.8);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.94);
    color: var(--muted);
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.profile-add-button:hover {
    background: white;
    color: var(--accent);
    border-color: rgba(96, 165, 250, 0.75);
}

.sidebar-foot {
    border-top: 1px solid rgba(203, 213, 225, 0.8);
    padding-top: 14px;
}

.sidebar-settings-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
}

.sidebar-action-button {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.96);
    color: var(--text);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-action-button:hover {
    background: white;
    border-color: rgba(96, 165, 250, 0.62);
    transform: translateY(-1px);
}

.sidebar-action-button i {
    width: 18px;
    color: var(--accent);
}

.sidebar-backup-form {
    display: grid;
    gap: 8px;
}

.metrics-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
}

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

.metric-item {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border-radius: 14px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.92);
}

.metric-value {
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.metric-label,
.metric-highlight-label,
.metric-foot {
    font-size: 0.76rem;
    color: var(--muted);
}

.metric-highlight {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(236, 253, 245, 0.9));
    border: 1px solid rgba(147, 197, 253, 0.45);
}

.metric-highlight strong {
    font-size: 0.94rem;
    line-height: 1.25;
}

.metric-highlight span {
    font-size: 0.82rem;
    color: var(--muted);
}

.metric-foot {
    padding: 0 2px;
}

.overlay-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.overlay-stat-card {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
}

.overlay-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.overlay-stat-label {
    font-size: 0.82rem;
    color: var(--muted);
}

.overlay-section {
    display: grid;
    gap: 10px;
}

.overlay-section + .overlay-section {
    margin-top: 14px;
}

.overlay-section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.overlay-section-head h3 {
    margin: 0;
    font-size: 1rem;
}

.overlay-section-head span {
    color: var(--muted);
    font-size: 0.82rem;
}

.overlay-list {
    display: grid;
    gap: 8px;
}

.overlay-list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(203, 213, 225, 0.76);
}

.overlay-list-item strong {
    font-size: 0.95rem;
}

.overlay-list-item span {
    color: var(--muted);
    font-size: 0.84rem;
}

.backup-overlay-actions,
.backup-overlay-form {
    display: grid;
    gap: 10px;
}

.sidebar-foot p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.hero,
.toolbar,
.tool-detail-card,
.admin-panel,
.empty-state,
.quick-panel,
.list-shell,
.results-head {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero {
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

.hero-launchpad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.hero-copy-shell {
    max-width: 1080px;
}

.hero-actions,
.hero-stats,
.detail-header,
.card-topline,
.tag-row,
.tag-list,
.card-actions,
.form-actions,
.admin-actions,
.list-actions,
.mini-actions,
.chip-group,
.section-head,
.search-row,
.hero-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-stats span,
.section-hint {
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--muted);
    font-size: 0.82rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--accent);
    font-weight: 700;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(1.55rem, 2.2vw, 2.45rem);
    line-height: 1.02;
    margin-bottom: 6px;
}

h2 {
    margin-bottom: 4px;
}

.hero-copy,
.panel-copy,
.embed-note,
.admin-list-item p,
.card-body p,
.mini-tool-card p,
.list-item p {
    color: var(--muted);
    line-height: 1.55;
}

.toolbar,
.detail-header,
.quick-panel,
.results-head,
.list-shell {
    margin-top: 10px;
}

.deck-surface {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 28px;
    background: rgba(226, 232, 240, 0.48);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.toolbar {
    border-radius: 22px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.toolbar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.toolbar-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.search-stack {
    display: grid;
    gap: 8px;
}

.search-field {
    flex: 1 1 320px;
}

.search-field-large input {
    min-height: 42px;
    font-size: 0.95rem;
}

.search-row {
    align-items: stretch;
}

.search-row .button {
    min-width: 108px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.filter-grid label,
.admin-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.filter-grid label {
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(203, 213, 225, 0.7);
}

.filter-grid label span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(199, 92, 45, 0.22);
    border-color: var(--brand);
}

.button,
.icon-button,
.favorite-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    background: var(--brand);
    color: #fff9f4;
    transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.button:hover,
.icon-button:hover,
.favorite-badge:hover {
    transform: translateY(-1px);
}

.button-secondary,
.icon-button {
    background: rgba(248, 250, 252, 0.9);
    color: var(--text);
    border: 1px solid rgba(203, 213, 225, 0.85);
}

.button-danger {
    background: var(--danger);
}

.favorite-badge,
.icon-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    font-size: 0.95rem;
}

.favorite-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(248, 250, 252, 0.94);
    color: var(--brand-dark);
}

.favorite-badge.is-active,
.icon-button.is-active {
    background: var(--brand);
    color: #fff9f4;
}

.tag-pill,
.tag,
.status-badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.tag-pill,
.tag {
    background: rgba(239, 246, 255, 0.9);
    color: #1d4ed8;
}

.tag-pill.is-active {
    background: var(--accent);
    color: white;
}

.chip-group {
    margin-top: 8px;
}

.chip-group-soft .tag-pill {
    background: rgba(255, 255, 255, 0.72);
}

.status-badge {
    background: rgba(248, 250, 252, 0.95);
    color: var(--text);
}

.badge-active {
    background: rgba(35, 107, 93, 0.12);
    color: var(--accent);
}

.badge-beta {
    background: rgba(199, 92, 45, 0.12);
    color: var(--brand-dark);
}

.badge-muted {
    background: rgba(100, 91, 82, 0.12);
    color: var(--muted);
}

.badge-accent {
    background: rgba(44, 91, 141, 0.12);
    color: #2c5b8d;
}

.badge-neutral {
    background: rgba(31, 28, 24, 0.08);
    color: var(--text);
}

.launchpad-main {
    display: grid;
    gap: 10px;
}

.shortcut-deck-panel {
    background: rgba(226, 232, 240, 0.55);
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 28px;
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.shortcut-deck-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.shortcut-deck-actions {
    display: flex;
    gap: 8px;
}

.deck-icon-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.deck-icon-button:hover {
    background: white;
    color: var(--accent);
    transform: translateY(-1px);
}

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

.shortcut-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: visible;
    border: 0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    isolation: isolate;
}

.shortcut-slot:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.shortcut-slot.is-drop-target {
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.shortcut-slot.is-dragging {
    opacity: 0.45;
}

.shortcut-slot:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
}

.shortcut-slot-empty {
    background: rgba(241, 245, 249, 0.72);
    border-style: dashed;
    border: 2px dashed rgba(203, 213, 225, 0.95);
    color: #94a3b8;
    font-size: 1.15rem;
    display: grid;
    place-items: center;
}

.shortcut-slot-empty:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
}

.shortcut-slot-filled {
    background: transparent;
    box-shadow: none;
}

.shortcut-slot-surface {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 2px solid rgba(203, 213, 225, 0.95);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.shortcut-slot-image,
.shortcut-slot-fallback {
    width: 100%;
    height: 100%;
}

.shortcut-slot-image {
    object-fit: cover;
}

.shortcut-slot-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 118, 110, 0.16));
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
}

.shortcut-slot-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.82));
}

.shortcut-slot-label {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 1;
    color: white;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 1px 4px rgba(15, 23, 42, 0.45);
}

.shortcut-slot-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    z-index: 10;
    width: min(320px, 26vw);
    aspect-ratio: 16 / 9;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px) scale(0.96);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.shortcut-slot-tooltip-panel {
    width: 100%;
    height: 100%;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.96)),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 42%);
    color: white;
    box-shadow: 0 24px 46px rgba(15, 23, 42, 0.34);
}

.shortcut-slot-tooltip strong {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.92);
}

.shortcut-slot-tooltip span {
    font-size: 0.83rem;
    line-height: 1.45;
}

.shortcut-slot-filled:hover .shortcut-slot-tooltip,
.shortcut-slot-filled:focus-visible .shortcut-slot-tooltip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.shortcut-slot-filled:hover .shortcut-slot-label,
.shortcut-slot-filled:focus-visible .shortcut-slot-label {
    opacity: 0;
}

.shortcut-slot-filled:hover,
.shortcut-slot-filled:focus-visible {
    z-index: 12;
}

.shortcut-slot-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.shortcut-slot-remove:hover {
    color: #b91c1c;
}

.quick-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.quick-panel,
.results-head,
.list-shell {
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.quick-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    min-height: 104px;
}

.section-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.quick-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    align-items: stretch;
    min-height: 72px;
}

.mini-tool-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 18px;
    padding: 10px 11px;
    min-height: 100%;
}

[data-launch-card] {
    cursor: pointer;
}

[data-launch-card]:hover {
    transform: translateY(-1px);
}

.mini-tool-card h3 {
    margin-bottom: 4px;
    font-size: 0.9rem;
    line-height: 1.12;
}

.mini-meta {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
}

.mini-tool-card p {
    margin-bottom: 6px;
    font-size: 0.76rem;
    line-height: 1.28;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    padding: 8px 6px 0;
    box-shadow: none;
    border: 0;
    background: transparent;
}

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

.card-grid-launchpad {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.tool-card {
    min-height: 100%;
}

.card-link {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    min-height: 100%;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card-link-static {
    position: relative;
}

.tool-card:hover .card-link {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.7);
}

.card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 118, 110, 0.14));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.card-media img,
.detail-logo,
.list-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-fallback,
.detail-logo-fallback,
.list-logo-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.card-body {
    display: grid;
    gap: 6px;
    padding: 9px;
}

.card-title-row,
.list-title-row,
.detail-title-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.card-topline {
    justify-content: space-between;
    align-items: flex-start;
}

.card-title-row h2,
.list-title-row h3 {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.16;
}

.tool-card-launchpad .card-body p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}

.empty-inline {
    display: flex;
    align-items: center;
    min-height: 72px;
    margin: 0;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.55;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.82);
}

.shortcut-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.shortcut-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}

.shortcut-modal-dialog {
    position: relative;
    width: min(980px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.shortcut-auth-dialog {
    width: min(560px, calc(100% - 32px));
}

.shortcut-info-dialog {
    width: min(760px, calc(100% - 32px));
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 18px;
}

.shortcut-auth-form {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
}

.shortcut-auth-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.shortcut-auth-message {
    min-height: 22px;
    margin: 0;
    font-size: 0.84rem;
    color: var(--danger);
}

.shortcut-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 10px;
}

.shortcut-modal-search {
    padding: 0 18px 16px;
}

.shortcut-picker-list {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
    overflow: auto;
}

.shortcut-info-dialog .overlay-section,
.shortcut-info-dialog .overlay-stats-grid {
    padding: 0 18px;
}

.shortcut-picker-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.94);
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.shortcut-picker-item:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.shortcut-picker-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    object-fit: cover;
}

.shortcut-picker-logo-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 118, 110, 0.16));
    color: #0f172a;
    font-weight: 800;
}

.shortcut-picker-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.shortcut-picker-copy strong {
    font-size: 0.96rem;
}

.shortcut-picker-copy span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.list-shell {
    display: grid;
    gap: 8px;
}

.list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    background: rgba(255, 255, 255, 0.92);
}

.list-identity {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.list-logo-shell {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 118, 110, 0.14));
}

.tool-detail-card {
    margin-top: 24px;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 20px;
}

.tool-detail-meta,
.tool-frame-shell {
    background: rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    padding: 20px;
}

.detail-identity {
    display: flex;
    gap: 16px;
    align-items: center;
}

.detail-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
}

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

.detail-meta-card {
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 28, 24, 0.08);
}

.detail-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.tool-frame-shell iframe {
    width: 100%;
    min-height: 72vh;
    border: 0;
    border-radius: 18px;
    background: white;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 480px) 1fr;
    gap: 20px;
}

.admin-shell .detail-header {
    margin-bottom: 20px;
    justify-content: space-between;
}

.admin-panel {
    border-radius: var(--radius-lg);
    padding: 24px;
}

.admin-list-shell {
    display: grid;
    gap: 18px;
}

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

.admin-list-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-create-button {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.launchpad-flash {
    margin-bottom: 14px;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.admin-modal-dialog {
    width: min(860px, calc(100vw - 56px));
    max-height: calc(100vh - 56px);
    overflow: auto;
    border-radius: 30px;
}

.admin-modal-dialog .shortcut-modal-head {
    padding: 24px 28px 12px;
}

.admin-modal-dialog .panel-copy,
.admin-modal-dialog .message,
.admin-modal-dialog .admin-form {
    margin-left: 28px;
    margin-right: 28px;
}

.admin-modal-dialog .panel-copy {
    margin-bottom: 14px;
}

.admin-modal-dialog .message {
    margin-bottom: 14px;
}

.admin-form,
.admin-list {
    display: grid;
    gap: 14px;
}

.admin-modal-dialog .admin-form {
    gap: 16px;
    padding-bottom: 28px;
}

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

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

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

.owner-tags-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    gap: 12px;
    align-items: start;
}

.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}

.inline-action-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 2px 2px 0;
}

.inline-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.backup-tools-panel {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(31, 28, 24, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.backup-tools-panel h2 {
    margin-bottom: 6px;
}

.backup-tools-actions {
    display: grid;
    gap: 10px;
}

.backup-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.backup-file-field input[type="file"] {
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.98);
}

.tag-editor-shell {
    display: grid;
    gap: 8px;
    min-width: 0;
    align-content: start;
}

.tag-editor-label {
    font-size: 0.95rem;
    font-weight: 700;
}

.tag-editor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.96);
}

.tag-editor-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(147, 197, 253, 0.7);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.96);
    color: #1d4ed8;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.tag-editor-chip:hover {
    background: rgba(219, 234, 254, 0.96);
}

.tag-editor-empty {
    color: var(--muted);
    font-size: 0.85rem;
}

.tag-editor-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    order: 1;
}

.tag-editor-list {
    order: 2;
}

.tag-editor-input-shell {
    position: relative;
    min-width: 0;
}

.tag-editor-input-shell input {
    width: 100%;
}

#tag-editor-add {
    white-space: nowrap;
}

.tag-editor-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.tag-editor-suggestion {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.98);
    color: var(--ink);
    text-align: left;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.tag-editor-suggestion:hover {
    background: rgba(239, 246, 255, 0.98);
    color: #1d4ed8;
}

.image-generation-panel {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 28, 24, 0.08);
}

.image-generation-preview {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(199, 92, 45, 0.14), rgba(35, 107, 93, 0.18));
    display: grid;
    place-items: center;
}

.image-generation-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-generation-meta {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.image-generation-status {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 24px;
}

.image-placeholder {
    padding: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.image-placeholder-loading {
    display: grid;
    gap: 8px;
    place-items: center;
}

.loading-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 rgba(199, 92, 45, 0.35);
    animation: pulse 1.1s infinite;
}

.status-ok {
    color: var(--accent);
    font-weight: 700;
}

.status-error {
    color: var(--danger);
    font-weight: 700;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(199, 92, 45, 0.35);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(199, 92, 45, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(199, 92, 45, 0);
    }
}

.checkbox-row input {
    width: auto;
}

.message {
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
}

.message.success {
    background: rgba(35, 107, 93, 0.12);
    color: var(--accent);
}

.message.error {
    background: rgba(161, 59, 52, 0.12);
    color: var(--danger);
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
}

.admin-list-item h3 {
    margin-bottom: 6px;
}

.admin-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-meta-line strong {
    color: var(--ink);
}

.admin-actions {
    display: grid;
    gap: 8px;
    align-content: start;
}

.form-actions {
    padding-top: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1080px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        min-height: 0;
        grid-template-rows: auto auto auto;
    }

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

    .card-grid-launchpad {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .toolbar-head,
    .filter-grid,
    .form-columns,
    .form-columns-3,
    .form-columns-4,
    .owner-tags-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-section-grid,
    .admin-layout,
    .tool-detail-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .shortcut-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-launchpad,
    .toolbar-head,
    .list-item {
        grid-template-columns: 1fr;
    }

    .list-identity {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .list-actions {
        width: 100%;
    }

    .filter-grid,
    .form-columns,
    .form-columns-3,
    .form-columns-4,
    .owner-tags-row,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .tool-frame-shell iframe {
        min-height: 60vh;
    }

    .page-shell {
        width: min(100% - 20px, 1220px);
    }

    .shortcut-deck-head {
        align-items: flex-start;
    }
}
