/* ===== CSS Variables (matching GrammarIndex.Web) ===== */
:root {
    --primary: #1B5E9E;
    --primary-dark: #14486F;
    --primary-light: #2980C4;
    --bg: #F5F6FA;
    --bg-card: #FFFFFF;
    --text: #2C3E50;
    --text-muted: #6C7A89;
    --border: #E0E4EB;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --success: #27AE60;
    --danger: #E74C3C;
    --warning: #F39C12;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content { flex: 1; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-narrow { max-width: 800px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-white {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.btn-white:hover { background: var(--bg); border-color: var(--bg); }

.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== Header / Navigation ===== */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    text-decoration: none;
}
.nav-link:hover { color: var(--primary); background: var(--bg); text-decoration: none; }

.nav-link-cta {
    background: var(--primary);
    color: #fff !important;
    margin-left: 8px;
}
.nav-link-cta:hover { background: var(--primary-dark); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.mobile-nav .nav-link { padding: 12px 0; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0 100px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

/* App.razor's <FocusOnNavigate Selector="h1"> programmatically focuses the
   page's first <h1> on load (accessibility: moves focus on SPA navigation for
   screen-reader/keyboard users). That left a visible focus ring around the hero
   title until the user moved focus. Suppress the ring for this NON-keyboard
   focus only — genuine keyboard focus (:focus-visible) still shows it. */
h1:focus:not(:focus-visible) {
    outline: none;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; }

/* App Showcase */
.hero-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 380px;
}

/* Defensive — every screenshot inside the hero showcase is bounded by
   its wrapper, so a high-resolution PNG dropped in by mistake can't
   blow up the layout if its specific class style fails to load. */
.hero-showcase img { max-width: 100%; height: auto; display: block; }

.showcase-web {
    background: #fff;
    border-radius: 12px;
    padding: 8px 8px 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
}
.showcase-web img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px 8px 0 0;
}

.showcase-mobile {
    position: absolute;
    right: -20px;
    bottom: -24px;
    width: 150px;
    background: #fff;
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.showcase-mobile img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.showcase-desktop {
    position: absolute;
    left: -20px;
    bottom: -16px;
    width: 240px;
    background: #fff;
    border-radius: 8px;
    padding: 6px 6px 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.showcase-desktop img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px 4px 0 0;
}

/* Store badges row — spans both hero grid columns so it sits below the
   device-mockup cluster (whose phone/desktop are absolutely positioned).
   margin-top clears the mockups that overflow the showcase's bottom edge. */
.hero-stores-row {
    grid-column: 1 / -1;
    margin-top: 56px;
    text-align: center;
}
.hero-stores-row-label {
    margin: 0 0 14px;
    font-weight: 600;
    opacity: 0.9;
}
.hero-stores-row .store-badges { justify-content: center; }

/* ===== Page Hero (sub-pages) ===== */
.page-hero {
    background: var(--primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.page-hero .hero-subtitle { font-size: 18px; opacity: 0.9; }

/* ===== Sections ===== */
.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 48px;
}

.content-section { padding: 80px 0; }

/* ===== Features ===== */
.features { padding: 80px 0; background: var(--bg-card); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s, transform 0.3s;
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; margin-bottom: 12px; }
.feature-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* ===== Audience ===== */
.audience { padding: 80px 0; }

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.audience-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.audience-card h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 12px;
}
.audience-card p { color: var(--text-muted); line-height: 1.7; }

/* ===== CTA ===== */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.cta h2 { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.cta p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; }

/* ===== Pricing ===== */
.pricing-hero { padding: 60px 0; text-align: center; }
.pricing-tiers { padding: 0 0 80px; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.pricing-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.pricing-section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin: 24px 0 8px;
}
.pricing-section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pricing-callout {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    margin: 24px 0 32px;
    color: var(--text);
}
.pricing-callout strong { color: var(--primary); }

.pricing-notes {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-top: 16px;
}
.pricing-notes h4 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.pricing-notes ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
.pricing-notes li { padding: 4px 0; font-size: 14px; }

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.3s, transform 0.3s;
}
.pricing-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.pricing-card-featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-hover);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
}

.pricing-header { text-align: center; margin-bottom: 24px; }
.pricing-header h3 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }

.pricing-price { margin-bottom: 8px; }
.price-amount { font-size: 48px; font-weight: 800; color: var(--text); }
.price-period { font-size: 15px; color: var(--text-muted); }

.pricing-desc { color: var(--text-muted); font-size: 14px; }

.pricing-features {
    list-style: none;
    margin: 0 0 32px;
    flex: 1;
}
.pricing-features li {
    padding: 8px 0;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: "✓ "; color: var(--success); font-weight: bold; }

/* Institution */
.institution-section { margin-top: 24px; }

.pricing-card-wide {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.institution-config { margin: 32px 0; text-align: left; }

.slider-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.slider-row label { font-weight: 600; min-width: 140px; }

.slider-control { display: flex; align-items: center; gap: 16px; flex: 1; }

.seat-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}
.seat-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}
.seat-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.seat-count {
    font-weight: 700;
    font-size: 18px;
    min-width: 90px;
    text-align: right;
}

.institution-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius);
}
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 700; }

.summary-total {
    grid-column: 1 / -1;
    background: var(--primary);
    color: #fff;
}
.summary-total .summary-label { color: rgba(255,255,255,0.9); }
.summary-total .summary-value { font-size: 24px; }

.pricing-features-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
    margin-bottom: 24px;
}
.pricing-features-horizontal li { border-bottom: none; padding: 4px 0; }

/* ===== Login ===== */
.login-section { padding: 80px 0; }

.login-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 48px 40px;
    box-shadow: var(--shadow);
}
.login-card h1 { font-size: 28px; text-align: center; margin-bottom: 8px; }
.login-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}
.login-footer p { margin-bottom: 8px; }

/* ===== Checkout Success ===== */
.checkout-success { padding: 80px 0; }

.success-card, .error-card, .loading-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 32px;
    margin-bottom: 24px;
}

.license-keys { margin: 32px 0; text-align: left; }
.license-keys h3 { margin-bottom: 8px; }
.license-instructions { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

.license-key-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.license-key-display code {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
}

.next-steps { text-align: left; margin: 32px 0; }
.next-steps h3 { margin-bottom: 12px; }
.next-steps ol { padding-left: 24px; }
.next-steps li { margin-bottom: 8px; line-height: 1.6; }

.success-actions { display: flex; gap: 16px; justify-content: center; margin-top: 32px; }

/* ===== Contact ===== */
.contact-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

.contact-info {
    margin-top: 40px;
    text-align: center;
    color: var(--text-muted);
}
.contact-info h3 { color: var(--text); margin-bottom: 8px; }

.success-message { text-align: center; padding: 40px 0; }

/* ===== FAQ ===== */
.faq-list { margin-bottom: 48px; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--bg-card);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}
.faq-question:hover { color: var(--primary); }

.faq-toggle {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-cta {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.faq-cta h3 { margin-bottom: 8px; }
.faq-cta p { color: var(--text-muted); margin-bottom: 20px; }

/* ===== Legal Content ===== */
.legal-content h2 { font-size: 22px; margin: 32px 0 12px; }
.legal-content h3 { font-size: 18px; margin: 24px 0 8px; }
.legal-content p { margin-bottom: 16px; line-height: 1.8; color: var(--text-muted); }
.legal-content ul { margin: 0 0 16px 24px; }
.legal-content li { margin-bottom: 8px; line-height: 1.7; color: var(--text-muted); }

/* ===== Alerts ===== */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 14px;
}
.alert-error {
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.w-100 { width: 100%; }

/* ===== Footer ===== */
.site-footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: #fff; }
.footer-tagline { font-size: 14px; opacity: 0.7; }

.footer-links h4 {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 4px 0;
    text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

/* ===== Blazor Error UI ===== */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px;
    background: var(--danger);
    color: #fff;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-showcase { margin-top: 40px; }
    .showcase-web { max-width: 420px; }
    .showcase-mobile { width: 120px; right: -10px; bottom: -16px; }
    .showcase-desktop { width: 200px; left: -10px; bottom: -10px; }
    .hero-title { font-size: 36px; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 48px; }
    .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .institution-summary { grid-template-columns: 1fr; }
    .slider-row { flex-direction: column; align-items: stretch; }
    .slider-row label { min-width: auto; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .mobile-nav { display: flex; }
    .pricing-grid-4 { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 48px; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 60px 0; }
    .hero-title { font-size: 28px; }
    .showcase-web { max-width: 340px; }
    .showcase-mobile { width: 100px; right: -6px; bottom: -12px; border-radius: 14px; padding: 4px; }
    .showcase-mobile img { border-radius: 12px; }
    .showcase-desktop { width: 160px; left: -6px; bottom: -8px; border-radius: 6px; padding: 4px 4px 0; }
    .section-title { font-size: 28px; }
    .features, .audience, .cta, .content-section { padding: 60px 0; }
    .login-card, .success-card, .contact-card { padding: 32px 24px; }
}

/* ── My Devices page ────────────────────────────────────────────────
   Self-service device management — multi-step form (identity → code →
   list). Plain reusable cards, no DevExpress controls. */

.md-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.md-card h2 { margin: 0 0 8px 0; font-size: 20px; color: var(--text); }

.md-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.md-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.md-form input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
}
.md-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, .15);
}
.md-code-input {
    font-size: 24px !important;
    letter-spacing: 12px;
    text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
}

.md-form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.md-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    border-left: 4px solid #DC2626;
}

.md-success-banner {
    background: #DCFCE7;
    color: #15803D;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin: 16px 0;
    border-left: 4px solid #16A34A;
}

.md-help {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.md-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.md-summary h2 { margin: 0 0 4px 0; font-size: 22px; }

.md-seat-pill {
    background: var(--primary-light);
    color: #fff;
    padding: 12px 18px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
}
.md-seat-pill.seat-full { background: #DC2626; }
.md-seat-pill-num { font-size: 18px; font-weight: 700; }
.md-seat-pill-label { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }

.md-device-list { display: flex; flex-direction: column; gap: 12px; }

.md-device-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.md-device-info { flex: 1 1 auto; min-width: 200px; }

.md-device-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 6px;
}
.md-platform-icon { font-size: 20px; }

.md-device-meta { font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.md-device-meta code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.md-device-actions { flex: 0 0 auto; }

.md-empty { text-align: center; padding: 48px 32px; }

.md-footnote {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.md-footnote h3 { font-size: 16px; margin: 0 0 8px 0; color: var(--text); }

.btn-danger {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: 0;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    background: #DC2626;
    color: #fff;
}
.btn-danger:hover { background: #B91C1C; color: #fff; text-decoration: none; }
.btn-danger:disabled { opacity: .55; cursor: default; }

.btn-secondary {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}
.btn-secondary:hover { background: var(--border); color: var(--text); text-decoration: none; }
.btn-secondary:disabled { opacity: .55; cursor: default; }

.muted { color: var(--text-muted); }
.small { font-size: 12px; }

/* ---- /account licence cards ---- */
.account-licence-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}
.account-licence-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.account-licence-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.65rem;
}
.account-licence-tier {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}
.account-licence-key code {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
}
.account-licence-seats {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: #ECFDF5;
    color: #065F46;
    min-width: 70px;
}
.account-licence-seats-full {
    background: #FEF3C7;
    color: #92400E;
}
.account-licence-seats-num {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}
.account-licence-seats-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.85;
}
.account-licence-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}
.account-licence-actions {
    display: flex;
    gap: 0.5rem;
}
