/* ── Reset & Base ────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-section-bg: #fafafa;
    --color-label: #9ca3af;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────── */

.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: 16px 0 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.header__subtitle {
    font-size: 13px;
    color: var(--color-label);
    margin-top: 1px;
}

.header__link {
    font-size: 14px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.header__link:hover {
    color: var(--color-primary);
}

/* ── Nav ──────────────────────────────────────────── */

.nav {
    display: flex;
    gap: 2px;
    margin-top: 14px;
}

.nav__item {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nav__item:hover {
    color: var(--color-text);
}

.nav__item--active {
    color: var(--color-text);
    font-weight: 600;
    border-bottom-color: var(--color-text);
}

/* ── Main ───────────────────────────────────────────── */

.main {
    padding: 24px 0 48px;
}

/* ── Profile Card ───────────────────────────────────── */

.profile {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}

/* ── Card Header (address, bank) ─────────────────── */

.card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px;
    border-bottom: 1px solid var(--color-border-light);
}

.card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.card__header-text {
    min-width: 0;
}

.card__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.card__subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.card__body .section {
    border-bottom: none;
}

/* ── Map Link ──────────────────────────────────────── */

.map-link {
    display: inline-block;
    margin: 8px 0 4px;
    padding: 4px 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}

.map-link:hover {
    text-decoration: underline;
}

.data-row__link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.data-row__link:hover {
    text-decoration: underline;
}

/* Cover + Avatar */
.profile__cover {
    height: 100px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 60%, #60a5fa 100%);
    position: relative;
}

.profile__cover--f {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 60%, #f472b6 100%);
}

.profile__avatar {
    position: absolute;
    bottom: -36px;
    left: 32px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-surface);
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-secondary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.profile__avatar--m { background: #dbeafe; color: #1e40af; }
.profile__avatar--f { background: #fce7f3; color: #9d174d; }

/* Identity bar */
.profile__identity {
    padding: 48px 32px 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.profile__name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.profile__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.profile__badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
}

.profile__badge--m { background: #dbeafe; color: #1e40af; }
.profile__badge--f { background: #fce7f3; color: #9d174d; }

/* Body grid */
.profile__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .profile__body {
        grid-template-columns: 1fr;
    }
}

/* ── Section ────────────────────────────────────────── */

.section {
    padding: 20px 32px 24px;
    border-bottom: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
}

.section:nth-child(even) {
    border-right: none;
}

@media (max-width: 640px) {
    .section {
        border-right: none;
    }
}

.section--full {
    grid-column: 1 / -1;
    border-right: none;
}

.section__divider {
    border-top: 1px solid var(--color-border-light);
    margin: 16px 0;
}

.section__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-label);
    margin-bottom: 12px;
}

/* ── Data Row ───────────────────────────────────────── */

.data-row {
    display: flex;
    align-items: baseline;
    padding: 4px 0;
    font-size: 14px;
    gap: 10px;
}

.data-row__label {
    color: var(--color-label);
    flex-shrink: 0;
    min-width: 110px;
    font-size: 13px;
}

.data-row__value {
    font-weight: 500;
    word-break: break-word;
    flex: 1;
    min-width: 0;
    color: var(--color-text);
}

/* ── Profile Footer (address, bank) ─────────────── */

.profile__footer {
    border-top: 1px solid var(--color-border-light);
}

/* ── Strip Section ─────────────────────────────────── */

.strip {
    padding: 20px 32px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.strip:last-child {
    border-bottom: none;
}

.strip__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.strip__header .strip__title {
    margin-bottom: 0;
}

.strip__map-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}

.strip__map-link:hover {
    text-decoration: underline;
}

.strip__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-label);
    margin-bottom: 12px;
}

.strip__subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 16px 0 6px;
}

.strip__subtitle:first-of-type {
    margin-top: 0;
}

.strip__subtitle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--color-label);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.strip__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

/* ── Chip ─────────────────────────────────────────── */

.chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 14px;
    padding: 3px 0;
}

.chip__label {
    color: var(--color-label);
    font-size: 13px;
}

.chip__value {
    font-weight: 500;
    color: var(--color-text);
}


/* ── Toolbar (below card) ───────────────────────────── */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.toolbar__seed {
    font-size: 12px;
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
    color: var(--color-label);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.toolbar__seed:hover {
    background: var(--color-border-light);
    color: var(--color-text-secondary);
}

/* ── Buttons ────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn__icon {
    width: 14px;
    height: 14px;
}

.btn--primary {
    background: var(--color-text);
    color: #ffffff;
}

.btn--primary:hover {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn--primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* ── Loading ────────────────────────────────────────── */

.profile__loading {
    text-align: center;
    padding: 64px 0;
    color: var(--color-label);
    font-size: 14px;
}

/* ── Error ──────────────────────────────────────────── */

.error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    font-size: 14px;
}

/* ── Copy Button ────────────────────────────────────── */

.data-row__copy {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--color-label);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.data-row:hover .data-row__copy {
    opacity: 1;
}

.chip:hover .data-row__copy {
    opacity: 1;
}

.data-row__copy:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.data-row__copy--ok {
    opacity: 1;
    color: #16a34a;
}

.data-row__copy svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
