.profile-page { min-height: 100vh; padding-top: 72px; background: #f8fafc; color: #172033; }
.profile-shell { max-width: 1120px; margin: 32px auto; padding: 0 24px; display: grid; grid-template-columns: 230px 1fr; gap: 24px; }
.profile-nav, .profile-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 8px 28px rgba(15,23,42,.05); }
.profile-nav { padding: 12px; align-self: start; display: grid; gap: 4px; }
.profile-nav a { padding: 11px 13px; border-radius: 9px; color: #475569; text-decoration: none; font-weight: 600; }
.profile-nav a:hover, .profile-nav a.active { color: #1d4ed8; background: #eff6ff; }
.profile-content { display: grid; gap: 20px; }
.profile-card { padding: 24px; }
.profile-card h1, .profile-card h2 { margin-top: 0; }
.profile-data { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.profile-field { padding: 14px; border-radius: 10px; background: #f8fafc; }
.profile-field span { display: block; color: #64748b; font-size: 13px; margin-bottom: 5px; }
.tariff-card { display: grid; gap: 18px; }
.tariff-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.profile-eyebrow { display: block; color: #64748b; font-size: 13px; margin-bottom: 2px; }
.tariff-heading h2 { margin: 0; font-size: 22px; }
.tariff-status { padding: 5px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tariff-status.is-active { background: #ecfdf5; color: #047857; }
.tariff-status.is-warning { background: #fff7ed; color: #c2410c; }
.tariff-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tariff-details > div { padding: 12px 14px; border-radius: 10px; background: #f8fafc; }
.tariff-details span, .tariff-features > span { display: block; color: #64748b; font-size: 12px; margin-bottom: 4px; }
.tariff-details strong { font-size: 14px; }
.tariff-feature-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tariff-feature { padding: 5px 9px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 600; }
.tariff-feature-placeholder { color: #64748b; font-size: 13px; }
.tariff-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.tariff-actions .btn { width: fit-content; }
.tariff-payment-error { color: #b91c1c; font-size: 13px; }
.profile-form { max-width: 520px; display: grid; gap: 14px; }
.profile-form label { display: grid; gap: 6px; font-weight: 600; }
.profile-form input { padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; }
.profile-notice { padding: 12px; border-radius: 9px; display: none; }
.profile-notice.success { display: block; background: #ecfdf5; color: #166534; }
.profile-notice.error { display: block; background: #fef2f2; color: #991b1b; }
.api-key-secret { padding: 14px; background: #fff7ed; border: 1px solid #fdba74; border-radius: 10px; margin-top: 16px; }
.api-key-secret code, .api-code { display: block; padding: 12px; background: #0f172a; color: #e2e8f0; border-radius: 9px; overflow-x: auto; white-space: pre; }
.api-key-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.scope-list { display: flex; flex-wrap: wrap; gap: 12px; }
.scope-list label { font-weight: 500; }
.api-docs h3 { margin-top: 28px; }

/* API keys page */
.api-page-content { gap: 16px; }
.api-page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 2px 2px 4px; }
.api-page-header h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.api-page-header p { margin: 6px 0 0; color: #64748b; }
.api-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.api-section-heading h2 { margin: 0; font-size: 20px; }
.api-section-heading p { margin: 5px 0 0; color: #64748b; font-size: 14px; }
.api-plan-badge, .api-step-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 700; }
.api-key-card, .api-keys-card, .api-docs { padding: 20px 22px; }
.api-key-form { max-width: none; gap: 16px; }
.field-hint { color: #64748b; font-size: 12px; font-weight: 400; line-height: 1.4; }
.scope-fieldset { margin: 0; padding: 0; border: 0; }
.scope-fieldset legend { padding: 0; font-weight: 700; }
.scope-fieldset > .field-hint { display: block; margin: 3px 0 10px; }
.scope-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scope-list label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; cursor: pointer; }
.scope-list label:has(input:checked) { border-color: #93c5fd; background: #eff6ff; }
.scope-list input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: #2563eb; }
.scope-list span, .scope-list small { display: block; min-width: 0; }
.scope-list strong { display: block; color: #334155; font-size: 13px; line-height: 1.3; }
.scope-list small { margin-top: 2px; color: #64748b; font-size: 11px; font-weight: 400; line-height: 1.35; }
.api-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 2px; }
.api-security-hint { margin: 0; color: #92400e; font-size: 12px; }
.api-form-footer .btn { flex: 0 0 auto; }
.api-keys-card h2 { margin: 0 0 12px; font-size: 20px; }
.api-key-row { align-items: center; padding: 11px 0; }
.api-key-row:last-child { padding-bottom: 0; border-bottom: 0; }
.api-key-main { min-width: 0; }
.api-key-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.api-key-prefix { display: inline-block; margin-top: 4px; color: #475569; font-size: 12px; }
.api-key-scopes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.api-key-scope { padding: 3px 6px; border-radius: 5px; background: #f1f5f9; color: #64748b; font-size: 10px; }
.api-key-status { padding: 3px 7px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 10px; font-weight: 700; }
.api-key-status.revoked { background: #f1f5f9; color: #64748b; }
.api-empty { margin: 0; padding: 16px; border: 1px dashed #cbd5e1; border-radius: 9px; color: #64748b; text-align: center; font-size: 13px; }
.api-key-secret { margin-top: 18px; padding: 13px; }
.api-key-secret p { margin: 0 0 9px; color: #9a3412; font-size: 13px; }
.api-secret-row { display: flex; gap: 8px; }
.api-key-secret code { flex: 1 1 auto; min-width: 0; padding: 10px; }
.api-key-secret .btn { flex: 0 0 auto; }
.api-docs h3 { margin: 0; font-size: 15px; }
.api-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.api-steps li { display: flex; gap: 9px; padding: 10px; border-radius: 9px; background: #f8fafc; }
.api-steps li > span { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 800; }
.api-steps strong, .api-steps small { display: block; }
.api-steps strong { color: #334155; font-size: 12px; }
.api-steps small { margin-top: 2px; color: #64748b; font-size: 10px; line-height: 1.35; }
.api-example-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.api-example-heading span { color: #64748b; font-size: 11px; font-weight: 700; }
.api-code { margin: 0; font-size: 12px; line-height: 1.55; }
.api-callout { margin: 9px 0 16px; padding: 9px 11px; border-left: 3px solid #60a5fa; background: #eff6ff; color: #475569; font-size: 12px; }
.api-details { margin: 0 0 18px; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; }
.api-details summary { padding: 10px 12px; color: #334155; font-size: 13px; font-weight: 700; cursor: pointer; }
.api-details[open] summary { border-bottom: 1px solid #e2e8f0; }
.api-details .api-code { border-radius: 0; }
.api-endpoints h3 { margin-bottom: 9px; }
.api-endpoint-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.api-endpoint-list > div { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.api-endpoint-list > div > code { flex: 0 0 auto; padding: 3px 5px; border-radius: 4px; background: #dcfce7; color: #15803d; font-size: 9px; font-weight: 800; }
.api-endpoint-list span, .api-endpoint-list strong, .api-endpoint-list small { display: block; min-width: 0; }
.api-endpoint-list strong { overflow: hidden; color: #334155; font-family: monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.api-endpoint-list small { margin-top: 1px; color: #64748b; font-size: 10px; }
@media (max-width: 760px) { .profile-shell { grid-template-columns: 1fr; margin-top: 20px; } .profile-nav { grid-template-columns: 1fr 1fr; } .profile-data, .tariff-details { grid-template-columns: 1fr; } .header .subscription-badge { display: none; } .header-right { gap: 8px; } .header .user-info { display: none; } }
@media (max-width: 760px) { .profile-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .api-steps, .api-endpoint-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .api-page-header { align-items: flex-start; } .api-page-header .btn { display: none; } .scope-list { grid-template-columns: 1fr; } .api-form-footer, .api-secret-row { align-items: stretch; flex-direction: column; } .api-form-footer .btn { width: 100%; } }
@media (max-width: 460px) { .profile-shell { padding: 0 14px; } .profile-card { padding: 18px; } .tariff-heading { align-items: flex-start; } .header .btn-primary { display: none; } .api-plan-badge { display: none; } }
