/* ============================
   Meu Brazilian JJ - PWA Styles
   Tema Claro: Fundo branco, header/nav preto, detalhes vermelho
   ============================ */

:root {
    --black: #1a1a1a;
    --black-light: #2a2a2a;
    --black-dark: #111111;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e8e8e8;
    --gray-300: #cccccc;
    --gray-400: #999999;
    --gray-500: #777777;
    --gray-600: #555555;
    --gray-700: #333333;
    --red: #e31b23;
    --red-dark: #b81419;
    --red-light: #ff3b42;
    --green: #28a745;
    --yellow: #ffc107;
    --blue: #007bff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
    --sidebar-width: 280px;
    --header-height: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--black);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   Auth Page
   ============================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--black-dark) 0%, var(--black) 50%, var(--black-light) 100%);
    color: var(--white);
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon-large {
    font-size: 64px;
    display: block;
    margin-bottom: 12px;
}

.auth-logo-img {
    width: 150px;
    height: 150px;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    border-radius: 20px;
}

.header-logo-img {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--gray-400);
    margin-top: 8px;
    font-size: 14px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group label {
    color: var(--gray-300);
}

.auth-form .form-group input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
}

.auth-form .form-group input::placeholder {
    color: var(--gray-500);
}

.auth-form .form-group input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(227, 27, 35, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    color: var(--gray-400);
    font-size: 14px;
}

.auth-switch a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

/* Install App Button (login page) */
.install-app-section,
.install-ios-section {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: 90%;
    max-width: 380px;
}

.btn-install-app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--white);
    color: var(--black);
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.btn-install-app:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.btn-install-ios {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 16px 20px;
    cursor: pointer;
}

.btn-install-ios small {
    font-size: 11px;
    font-weight: 400;
    color: var(--gray-500);
}

.install-icon {
    font-size: 22px;
}

/* Onboarding Progress */
.onboard-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.onboard-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
}

.onboard-step span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.15);
}

.onboard-step.active {
    color: #fff;
}

.onboard-step.active span {
    background: #e31b23;
    color: #fff;
    border-color: #e31b23;
}

.onboard-step.done span {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.onboard-step.done {
    color: rgba(255,255,255,0.5);
}

.onboard-public-toggle {
    margin-bottom: 16px;
}

.onboard-public-toggle .toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
}

.onboard-public-toggle strong {
    color: #fff;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.onboard-public-toggle p {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    margin: 0;
    line-height: 1.3;
}

/* ============================
   Header (preto)
   ============================ */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--black);
    border-bottom: none;
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-content {
    width: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.logo-icon {
    font-size: 24px;
}

.logo h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--white);
}

.text-red {
    color: var(--red);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.user-name {
    color: var(--gray-300);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 16px;
    padding: 4px;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--red);
}

/* Belt indicators */
.user-belt {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.belt-branca { background: #fff; border: 1px solid #ccc; }
.belt-azul { background: #0066cc; }
.belt-roxa { background: #7b2d8e; }
.belt-marrom { background: #8b4513; }
.belt-preta { background: #111; border: 1px solid #555; }

/* ============================
   Hamburger Button
   ============================ */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-btn:hover span {
    background: var(--red);
}

/* ============================
   Sidebar
   ============================ */
.sidebar-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

.sidebar-overlay.open {
    display: block !important;
}

.sidebar {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    background: #1a1a1a;
    color: #fff;
    z-index: 200;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar.open {
    display: flex !important;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #333;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
}

.sidebar-profile:hover {
    opacity: 0.8;
}

.sidebar-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #555;
    flex-shrink: 0;
}

.sidebar-avatar-placeholder {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: #e31b23;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    line-height: 48px;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-info strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-400);
}

.sidebar-profile-info .user-belt {
    width: 10px;
    height: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    text-decoration: none;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar-item.active {
    color: #e31b23;
    background: rgba(227, 27, 35, 0.1);
    border-right: 3px solid #e31b23;
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-badge {
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}

.sidebar-divider {
    height: 1px;
    background: #333;
    margin: 8px 16px;
}

.sidebar-section-title {
    display: block;
    padding: 8px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
}

.sidebar-footer {
    border-top: 1px solid #333;
    padding: 8px 0;
    margin-top: auto;
}

.sidebar-logout {
    color: #777 !important;
}

.sidebar-logout:hover {
    color: #e31b23 !important;
    background: rgba(227, 27, 35, 0.1) !important;
}

/* ============================
   Main Content
   ============================ */
.app-content {
    max-width: 600px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 12px) 12px 24px;
    overflow-x: hidden;
    word-wrap: break-word;
}

@media (min-width: 400px) {
    .app-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ============================
   Page Title
   ============================ */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--black);
}

.belt-info {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ============================
   Stats Grid
   ============================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stats-small {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--red);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================
   Sections
   ============================ */
.section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

/* ============================
   Cards
   ============================ */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
}

.card-body {
    padding: 12px 16px;
}

.card-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-position {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.card-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-600);
}

.card-notes {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================
   Badges
   ============================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-belt {
    color: var(--white);
}

.badge-belt.belt-branca { background: #aaa; }
.badge-belt.belt-azul { background: #0066cc; }
.badge-belt.belt-roxa { background: #7b2d8e; }
.badge-belt.belt-marrom { background: #8b4513; }
.badge-belt.belt-preta { background: #333; }

.badge-submission { background: var(--red-dark); color: var(--white); }
.badge-sweep { background: #1a6b3c; color: var(--white); }
.badge-pass { background: #0055aa; color: var(--white); }
.badge-escape { background: #666; color: var(--white); }
.badge-takedown { background: #8b4513; color: var(--white); }
.badge-control { background: #555; color: var(--white); }
.badge-transition { background: #444; color: var(--white); }
.badge-defense { background: #2a2a5a; color: var(--white); }

/* ============================
   List Items
   ============================ */
.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.list-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-content strong {
    display: block;
    font-size: 14px;
    color: var(--black);
}

.list-item-content .text-muted {
    font-size: 12px;
    color: var(--gray-500);
}

.list-item-notes {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.list-item-right {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

/* ============================
   Level Badges
   ============================ */
.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--gray-600);
}

.level-badge.level-1,
.level-badge.level-2 { background: #e0e0e0; color: #666; }
.level-badge.level-3,
.level-badge.level-4 { background: #ccc; color: #444; }
.level-badge.level-5,
.level-badge.level-6 { background: var(--gray-600); color: var(--white); }
.level-badge.level-7,
.level-badge.level-8 { background: var(--red-dark); color: var(--white); }
.level-badge.level-9,
.level-badge.level-10 { background: var(--red); color: var(--white); }

/* ============================
   Progress Bars
   ============================ */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

.progress-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-entries {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 4px;
    display: block;
}

/* ============================
   Difficulty Dots
   ============================ */
.difficulty {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-200);
    display: inline-block;
}

.dot.filled {
    background: var(--red);
}

/* ============================
   Rating Stars
   ============================ */
.rating {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--gray-300);
    font-size: 14px;
}

.star.filled {
    color: var(--yellow);
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating-input input {
    display: none;
}

.rating-input label {
    font-size: 28px;
    color: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: var(--yellow);
}

/* ============================
   Filter Bar
   ============================ */
.filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-block;
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.filter-chip.active,
.filter-chip:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ============================
   Forms
   ============================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--black);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(227, 27, 35, 0.15);
}

.form-group input:not([type="checkbox"]):not([type="radio"])::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group input[type="range"] {
    padding: 0;
    background: transparent;
    border: none;
    -webkit-appearance: auto;
    appearance: auto;
    accent-color: var(--red);
}

.range-value {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 6px;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline:hover {
    border-color: var(--black);
    color: var(--black);
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--red-dark);
    color: var(--red);
}

.btn-danger:hover {
    background: var(--red-dark);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--red-dark);
    color: var(--red);
    cursor: pointer;
}

/* ============================
   Modals
   ============================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 24px;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--black);
}

/* ============================
   Alerts
   ============================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(227, 27, 35, 0.08);
    border: 1px solid rgba(227, 27, 35, 0.3);
    color: var(--red-dark);
}

.alert-success {
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: var(--green);
}

/* ============================
   Empty States
   ============================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 16px;
}

/* ============================
   Header Notification Bell
   ============================ */
.header-notif-link {
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px;
}

.header-notif-icon {
    font-size: 20px;
    transition: all 0.2s ease;
}

.header-notif-link:hover .header-notif-icon {
    transform: rotate(15deg);
}

.header-notif-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #e31b23;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #1a1a1a;
}

/* ============================
   Header Avatar
   ============================ */
.user-avatar-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.user-avatar-img {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-600);
    transition: var(--transition);
    flex-shrink: 0;
}

.user-avatar-img:hover {
    border-color: var(--red);
}

.user-avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.user-avatar-placeholder:hover {
    background: var(--red-dark);
}

.user-name-link {
    color: var(--gray-300);
    text-decoration: none;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}

.user-name-link:hover {
    color: var(--white);
}

/* ============================
   Profile Page
   ============================ */
.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-200);
}

.profile-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    border: 3px solid var(--gray-200);
}

.profile-avatar-empty span {
    color: var(--white);
    font-size: 28px;
    font-weight: 800;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--white);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.profile-avatar-edit:hover {
    background: var(--red);
}

.profile-avatar-info {
    flex: 1;
    min-width: 0;
}

.profile-avatar-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.profile-belt-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.profile-belt-display .user-belt {
    width: 14px;
    height: 14px;
}

.profile-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 400px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Avatar modal */
.avatar-preview-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-preview-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-200);
}

.avatar-preview-empty {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gray-200);
}

.avatar-preview-empty span {
    color: var(--white);
    font-size: 40px;
    font-weight: 800;
}

.file-upload-btn {
    cursor: pointer;
}

/* ============================
   Profile Counters
   ============================ */
.profile-counters {
    display: flex;
    justify-content: center;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-counters .counter-item {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-right: 1px solid var(--gray-200);
}

.profile-counters .counter-item:last-child {
    border-right: none;
}

.counter-link {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.counter-link:hover {
    background: var(--gray-50);
}

.profile-counters .counter-item strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
}

.profile-counters .counter-item span {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================
   Community Tabs
   ============================ */
.community-tabs {
    display: flex;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.community-tab {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    text-decoration: none;
    color: var(--gray-500);
    border-right: 1px solid var(--gray-200);
    transition: var(--transition);
}

.community-tab:last-child {
    border-right: none;
}

.community-tab strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-500);
    transition: var(--transition);
}

.community-tab span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.community-tab.active {
    color: var(--red);
    background: rgba(227, 27, 35, 0.04);
    border-bottom: 3px solid var(--red);
}

.community-tab.active strong {
    color: var(--red);
}

.community-tab:hover {
    background: var(--gray-50);
}

/* ============================
   Follow List
   ============================ */
.follow-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.follow-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    gap: 8px;
    overflow: hidden;
}

.follow-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
    transition: var(--transition);
}

.follow-user-info:hover {
    opacity: 0.8;
}

.follow-user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.follow-user-avatar-placeholder {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.follow-user-text {
    flex: 1;
    min-width: 0;
}

.follow-user-info strong {
    display: block;
    font-size: 14px;
    color: var(--black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--gray-500);
}

.follow-user-meta .user-belt {
    width: 8px;
    height: 8px;
}

.follow-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ============================
   Toggle Switch (Perfil Publico)
   ============================ */
.public-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

.public-toggle-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.public-toggle-info p {
    font-size: 12px;
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-300);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--red);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ============================
   Search Bar
   ============================ */
.search-bar {
    margin-bottom: 16px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--gray-400);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--black);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(227, 27, 35, 0.15);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-clear {
    position: absolute;
    right: 12px;
    font-size: 20px;
    color: var(--gray-400);
    text-decoration: none;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.search-clear:hover {
    color: var(--red);
}

/* ============================
   Fighters List
   ============================ */
.fighters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fighter-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.fighter-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.fighter-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.fighter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fighter-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

.fighter-info {
    flex: 1;
    min-width: 0;
}

.fighter-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 3px;
}

.fighter-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 3px;
}

.fighter-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--gray-500);
}

.fighter-arrow {
    font-size: 24px;
    color: var(--gray-300);
    flex-shrink: 0;
}

/* ============================
   Fighter Profile (view)
   ============================ */
.btn-back {
    font-size: 18px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--red);
}

.fighter-profile-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.fighter-profile-header {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.fighter-profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    background: var(--gray-100);
    border: 3px solid var(--gray-200);
}

.fighter-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fighter-profile-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
}

.fighter-profile-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 6px;
}

.fighter-profile-belt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gray-600);
}

.fighter-profile-belt .user-belt {
    width: 14px;
    height: 14px;
}

.fighter-profile-bio {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.fighter-profile-bio p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
}

.fighter-profile-details {
    padding: 8px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--gray-500);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

/* ============================
   Feed / Posts
   ============================ */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-post {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    gap: 8px;
    overflow: hidden;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.post-author-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    max-height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-author-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-info strong {
    font-size: 14px;
    color: var(--black);
}

.post-meta {
    font-size: 11px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-meta .user-belt {
    width: 8px;
    height: 8px;
}

.btn-post-menu {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-post-menu:hover {
    color: var(--red);
    background: var(--gray-100);
}

.post-image {
    width: 100%;
    background: var(--gray-100);
}

.post-image img {
    width: 100%;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.post-actions {
    display: flex;
    gap: 16px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 4px 0;
    transition: var(--transition);
}

.post-action-btn:hover {
    color: var(--black);
}

.like-btn.liked {
    color: var(--red);
}

.like-btn.liked .like-icon {
    color: var(--red);
}

.like-icon {
    font-size: 20px;
}

.post-caption {
    padding: 8px 12px 12px;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-caption strong {
    color: var(--black);
    margin-right: 4px;
}

.post-text-only {
    font-size: 16px;
    padding: 20px 12px;
    line-height: 1.6;
    border-bottom: 1px solid var(--gray-100);
}

/* Video embed horizontal (YouTube normal) */
.post-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
    max-width: 100%;
}

.post-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video embed vertical (Shorts, Reels, Instagram) */
.post-video-vertical {
    padding-bottom: 0;
    height: 500px;
    max-height: 70vh;
    max-width: 320px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

/* Instagram Embed Card */
.ig-embed-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
}

.ig-embed-card:hover {
    border-color: #E1306C;
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.15);
}

.ig-embed-preview {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-embed-preview img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.ig-embed-preview.ig-no-thumb {
    height: 200px;
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
}

.ig-embed-preview.ig-no-thumb img {
    display: none;
}

.ig-embed-preview.ig-no-thumb::after {
    content: 'Instagram';
    font-size: 20px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

.ig-embed-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.ig-embed-icon {
    font-size: 13px;
    font-weight: 600;
    color: #E1306C;
}

.ig-embed-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
}

.ig-embed-card:hover .ig-embed-cta {
    color: #E1306C;
}

.video-embed-vertical {
    padding-bottom: 0 !important;
    height: 450px;
    max-height: 65vh;
    max-width: 300px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.remove-preview-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-preview-btn:hover {
    background: var(--red);
}

/* Comments */
.post-comments {
    border-top: 1px solid var(--gray-100);
}

.comments-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 12px;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-200);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
}

.comment-body {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.4;
}

.comment-body strong {
    color: var(--black);
    margin-right: 4px;
}

.comment-time {
    font-size: 11px;
    color: var(--gray-400);
    margin-left: 4px;
}

.comment-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--gray-100);
}

.comment-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: var(--black);
    background: var(--gray-50);
    transition: var(--transition);
}

.comment-form input:focus {
    outline: none;
    border-color: var(--red);
}

.comment-form input::placeholder {
    color: var(--gray-400);
}

.comment-send-btn {
    background: none;
    border: none;
    color: var(--red);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.comment-send-btn:hover {
    color: var(--red-dark);
}

/* Upload area */
.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-500);
    font-size: 14px;
    transition: var(--transition);
}

.file-upload-area:hover {
    border-color: var(--red);
    color: var(--red);
}

.upload-icon {
    font-size: 36px;
}

.upload-hint {
    font-size: 11px;
    color: var(--gray-400);
}

.post-image-preview {
    position: relative;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-image-preview img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

/* ============================
   Fighter Counters & Follow
   ============================ */
.fighter-counters {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.counter-item {
    text-align: center;
}

.counter-item strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
}

.counter-item span {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-follow {
    margin-top: 16px;
}

/* Posts Grid (galeria no perfil) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.posts-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--gray-100);
}

.posts-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.posts-grid-item:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* ============================
   Shared Technique Card (Feed)
   ============================ */
.shared-technique-card {
    margin: 0 12px 8px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-50);
}

.shared-tech-header {
    padding: 8px 12px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shared-tech-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.shared-tech-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    font-family: inherit;
    transition: var(--transition);
}

.shared-tech-toggle:hover {
    color: var(--red);
}

.shared-tech-body {
    padding: 12px;
}

.shared-tech-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.shared-tech-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.shared-tech-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Detalhes expandiveis da tecnica */
.shared-tech-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-200);
}

.shared-tech-section {
    margin-bottom: 12px;
}

.shared-tech-section:last-child {
    margin-bottom: 0;
}

.shared-tech-section-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.shared-tech-section p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.shared-tech-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 6px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--black);
}

.shared-tech-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================
   Share/Send Technique Modal
   ============================ */
.share-tech-preview {
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--black);
}

.send-user-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.send-user-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.send-user-item input[type="radio"] {
    display: none;
}

.send-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.send-user-item input:checked + .send-user-info {
    border-color: var(--red);
    background: rgba(227, 27, 35, 0.05);
}

.send-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.send-user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.send-user-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

/* ============================
   Chat - Conversations List
   ============================ */
.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.conversation-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.conversation-item.has-unread {
    border-left: 3px solid var(--red);
}

.conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conv-avatar span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

.conv-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.conv-name-row strong {
    font-size: 14px;
    color: var(--black);
}

.conv-time {
    font-size: 11px;
    color: var(--gray-400);
}

.conv-last-msg {
    font-size: 13px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-unread-badge {
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}

/* ============================
   Chat - Conversation View
   ============================ */
.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.chat-header-bar .btn-back {
    font-size: 24px;
    padding: 4px 8px;
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.chat-header-user strong {
    display: block;
    font-size: 15px;
    color: var(--black);
}

.chat-header-belt {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--gray-500);
}

.chat-header-belt .user-belt {
    width: 8px;
    height: 8px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - var(--header-height) - 180px);
    overflow-y: auto;
    padding: 8px 0;
    margin-bottom: 8px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.chat-bubble p {
    margin: 0;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--red);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow);
}

.chat-time {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
}

.chat-bubble.sent .chat-time {
    text-align: right;
    color: rgba(255,255,255,0.7);
}

.chat-bubble.received .chat-time {
    color: var(--gray-400);
}

/* Technique card inside chat */
.chat-technique-card {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.chat-bubble.sent .chat-technique-card {
    background: rgba(255,255,255,0.15);
}

.chat-bubble.received .chat-technique-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.chat-tech-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.chat-bubble.sent .chat-tech-label {
    color: rgba(255,255,255,0.8);
}

.chat-bubble.received .chat-tech-label {
    color: var(--red);
}

.chat-technique-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.chat-tech-meta {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.chat-technique-card {
    cursor: pointer;
}

.chat-tech-cta {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    opacity: 0.7;
}

.chat-bubble.sent .chat-tech-cta {
    color: rgba(255,255,255,0.8);
}

.chat-bubble.received .chat-tech-cta {
    color: var(--red);
}

.chat-tech-expand {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.chat-bubble.received .chat-tech-expand {
    border-top-color: var(--gray-200);
}

.chat-tech-expand.open {
    display: block;
}

.chat-tech-desc {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 8px;
    opacity: 0.9;
}

.chat-video-embed {
    margin: 4px -6px 6px;
    border-radius: 8px;
    overflow: hidden;
}

.chat-video-embed .post-video-embed,
.chat-video-embed .post-video-vertical {
    border-radius: 8px;
    max-width: 100%;
}

.chat-video-embed .post-video-vertical {
    max-width: 220px;
    height: 350px;
}

/* Chat input */
.chat-input-bar {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
    margin: 0 -12px;
    padding: 12px;
    position: sticky;
    bottom: 0;
}

@media (min-width: 400px) {
    .chat-input-bar {
        margin: 0 -16px;
        padding: 12px 16px;
    }
}

.chat-input-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    color: var(--black);
    background: var(--white);
    transition: var(--transition);
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--red);
}

.chat-input-bar input::placeholder {
    color: var(--gray-400);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: var(--red-dark);
}

.chat-blocked-bar {
    text-align: center;
    padding: 16px 12px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    margin: 0 -12px;
}

.chat-blocked-bar p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

/* ============================
   Notifications Page
   ============================ */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.notif-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.notif-item.notif-message {
    border-left: 3px solid var(--blue);
}

.notif-item.notif-like {
    border-left: 3px solid var(--red);
}

.notif-item.notif-comment {
    border-left: 3px solid var(--green);
}

.notif-item.notif-follow {
    border-left: 3px solid var(--yellow);
}

.notif-item.notif-invite {
    border-left: 3px solid #8b5cf6;
}

.notif-item.notif-dojo_invite {
    border-left: 3px solid #b8860b;
}

.notif-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.notif-avatar img {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-avatar span:first-child {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.notif-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-content p {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.4;
    margin: 0;
}

.notif-content strong {
    color: var(--black);
}

.notif-preview {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

.notif-thumb {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================
   Achievements Timeline
   ============================ */
.achiev-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.achiev-card {
    display: flex;
    gap: 12px;
}

.achiev-icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 36px;
}

.achiev-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    z-index: 1;
}

.achiev-line {
    width: 2px;
    flex: 1;
    background: var(--gray-200);
    min-height: 16px;
}

.achiev-card:last-child .achiev-line {
    display: none;
}

.achiev-content {
    flex: 1;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.achiev-photo {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.achiev-photo img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.achiev-info {
    padding: 12px;
}

.achiev-date {
    font-size: 11px;
    color: var(--gray-400);
}

.achiev-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin: 2px 0 6px;
}

.achiev-belt-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-600);
    margin: 6px 0;
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.achiev-belt-change .user-belt {
    width: 14px;
    height: 14px;
}

.achiev-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-top: 6px;
}

.achiev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.achiev-shared-badge {
    font-size: 11px;
    color: var(--green);
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(40,167,69,0.08);
    border-radius: 12px;
}

/* ============================
   Competitions
   ============================ */
.comp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comp-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comp-photo {
    width: 100%;
    max-height: 250px;
    overflow: hidden;
    background: var(--gray-100);
}

.comp-photo img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.comp-info {
    padding: 12px;
}

.comp-medal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comp-medal {
    font-size: 14px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.comp-medal-ouro {
    background: rgba(255, 215, 0, 0.15);
    color: #b8860b;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.comp-medal-prata {
    background: rgba(192, 192, 192, 0.2);
    color: #666;
    border: 1px solid rgba(192, 192, 192, 0.4);
}

.comp-medal-bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #8b4513;
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.comp-medal-participacao {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.comp-date {
    font-size: 12px;
    color: var(--gray-500);
}

.comp-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.comp-location {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.comp-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.comp-result {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
    font-style: italic;
}

.comp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================
   My Videos / Techniques
   ============================ */
.videos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: var(--gray-100);
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
}

.video-link-preview:hover {
    background: var(--gray-200);
}

.video-link-preview span {
    font-size: 24px;
}

.video-info {
    padding: 12px;
}

.video-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.video-info p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 4px;
}

.video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.evo-level-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.evo-level-label {
    font-size: 12px;
    color: var(--gray-500);
    font-style: italic;
}

/* Evolution Grid */
.evo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 400px) {
    .evo-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.evo-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.evo-item:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.evo-item:active {
    transform: scale(0.98);
}

.evo-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.evo-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.evo-item .progress-bar {
    margin-bottom: 6px;
}

.evo-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

/* ============================
   Knowledge Base (Conceitos & Teoria)
   ============================ */
.kb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.kb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    cursor: pointer;
    gap: 10px;
    transition: var(--transition);
}

.kb-card-header:hover {
    background: var(--gray-50);
}

.kb-card-title {
    flex: 1;
    min-width: 0;
}

.kb-card-title h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2px;
}

.kb-card-subtitle {
    font-size: 12px;
    color: var(--gray-500);
    font-style: italic;
}

.kb-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.kb-difficulty {
    display: flex;
    gap: 2px;
}

.kb-expand-icon {
    font-size: 12px;
    color: var(--gray-400);
    transition: transform 0.3s ease;
}

.kb-card.expanded .kb-expand-icon {
    transform: rotate(180deg);
}

.kb-card-body {
    display: none;
    padding: 0 12px 16px;
    border-top: 1px solid var(--gray-200);
}

.kb-card.expanded .kb-card-body {
    display: block;
}

.kb-section {
    margin-top: 14px;
}

.kb-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.kb-section p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}

.kb-section ul,
.kb-section ol {
    padding-left: 0;
    list-style: none;
}

.kb-section ul li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0 4px 16px;
    position: relative;
    line-height: 1.5;
}

.kb-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
}

.kb-mistakes li::before {
    background: var(--yellow) !important;
}

/* Passo a passo numerado */
.kb-steps {
    counter-reset: step;
    padding-left: 0;
}

.kb-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.kb-steps li::before {
    display: none;
}

.kb-steps li:last-child {
    border-bottom: none;
}

.kb-step-num {
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Tags */
.kb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kb-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.kb-tag-red {
    background: rgba(227, 27, 35, 0.1);
    color: var(--red);
    border: 1px solid rgba(227, 27, 35, 0.2);
}

.kb-tag-blue {
    background: rgba(0, 123, 255, 0.1);
    color: var(--blue);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.kb-diff-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Theory position badge */
.theory-position-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(227, 27, 35, 0.06);
    border: 1px solid rgba(227, 27, 35, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray-600);
}

.theory-position-badge strong {
    color: var(--red);
}

/* ============================
   PWA Install Banner
   ============================ */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--black);
    border-top: 2px solid var(--red);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    animation: slideUpBanner 0.4s ease;
}

@keyframes slideUpBanner {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.install-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.install-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.install-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.install-banner-info strong {
    display: block;
    font-size: 14px;
    color: var(--white);
    margin-bottom: 2px;
}

.install-banner-info p {
    font-size: 12px;
    color: var(--gray-400);
    margin: 0;
}

.install-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.install-close {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.install-close:hover {
    color: var(--white);
}

.install-ios-hint {
    padding: 0 16px 14px;
    max-width: 600px;
    margin: 0 auto;
}

.install-ios-hint p {
    font-size: 13px;
    color: var(--gray-300);
    text-align: center;
    line-height: 1.5;
    margin: 0;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

/* ============================
   Practice Page
   ============================ */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

.practice-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: block;
    position: relative;
}

.practice-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.practice-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.practice-card-cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.practice-card-diff { display: flex; gap: 2px; }

.practice-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2px;
}

.practice-card-en {
    font-size: 11px;
    color: var(--gray-400);
    font-style: italic;
    margin-bottom: 6px;
}

.practice-card-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}

.practice-has-video-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    background: rgba(227,27,35,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Practice tech list */
.practice-tech-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.practice-tech-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.practice-tech-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.practice-tech-info {
    flex: 1;
    min-width: 0;
}

.practice-tech-info strong {
    display: block;
    font-size: 14px;
    color: var(--black);
    margin-bottom: 2px;
}

.practice-tech-info span {
    font-size: 12px;
    color: var(--gray-500);
}

.practice-has-video {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Practice detail */
.practice-detail {
    max-width: 600px;
    margin: 0 auto;
}

.practice-video {
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
}

.practice-title-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.practice-title-card h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    margin: 6px 0 4px;
}

.practice-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 8px;
}

.practice-diff {
    font-size: 13px;
    color: var(--gray-600);
}

.practice-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.practice-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
}

.practice-section p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Practice steps */
.practice-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.practice-step {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    align-items: flex-start;
}

.practice-step:last-child { border-bottom: none; }

.practice-step-num {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.practice-step-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    padding-top: 4px;
}

.practice-list {
    list-style: none;
    padding: 0;
}

.practice-list li {
    font-size: 14px;
    color: var(--gray-600);
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.5;
}

.practice-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.practice-mistakes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
}

.practice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============================
   My Photos
   ============================ */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

@media (min-width: 500px) {
    .photos-grid { grid-template-columns: repeat(4, 1fr); }
}

.photo-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.photo-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--gray-100);
}

.photo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.photo-img:hover img {
    transform: scale(1.05);
}

.photo-public-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(40,167,69,0.85);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.photo-title {
    font-size: 11px;
    color: var(--gray-600);
    padding: 4px 6px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px 6px 6px;
}

.photo-actions .btn-xs {
    padding: 3px 6px;
    font-size: 10px;
}

.photo-actions .btn-sm {
    padding: 6px 4px;
    font-size: 11px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-actions form {
    display: block;
    width: 100%;
}

.photo-actions form .btn-sm {
    width: 100%;
}

/* ============================
   Checking Cards
   ============================ */
.checkin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 500px) {
    .checkin-grid { grid-template-columns: repeat(3, 1fr); }
}

.checkin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
    position: relative;
    width: 100%;
}

.checkin-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.checkin-card:active {
    transform: scale(0.97);
}

.checkin-today {
    border-color: var(--red);
    background: rgba(227, 27, 35, 0.03);
}

.checkin-day {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkin-time {
    font-size: 16px;
    font-weight: 800;
    color: var(--black);
}

.checkin-class {
    font-size: 11px;
    color: var(--gray-500);
}

.checkin-today-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* ============================
   Dojo
   ============================ */
.dojo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dojo-header-info {
    flex: 1;
    min-width: 0;
}

.dojo-header-info h2 {
    font-size: 20px;
    font-weight: 800;
}

.dojo-info-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dojo-info-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
}

.dojo-info-item:last-child {
    border-bottom: none;
}

.dojo-info-item strong {
    display: block;
    font-size: 13px;
    color: var(--black);
    margin-bottom: 4px;
}

.dojo-info-item p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.dojo-pinned {
    border-left: 3px solid #FFD700 !important;
}

.dojo-pin-label {
    font-size: 11px;
    font-weight: 700;
    color: #b8860b;
    padding: 6px 12px 0;
}

.dojo-tech-topics {
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid var(--gray-100);
}

.dojo-tech-topic {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0 4px 8px;
    border-left: 3px solid var(--red);
    margin-bottom: 4px;
    line-height: 1.4;
}

.dojo-notice-text {
    background: rgba(227, 27, 35, 0.04);
    border-left: 3px solid var(--red);
    padding: 12px !important;
    font-weight: 500;
}

/* ============================
   Academies
   ============================ */
.academy-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.academy-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.academy-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.academy-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.academy-info {
    flex: 1;
    min-width: 0;
}

.academy-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2px;
}

.academy-count {
    background: var(--red);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    min-width: 28px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    flex-shrink: 0;
}

.academy-header-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.academy-header-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 2px;
}

/* ============================
   Communities
   ============================ */
.comm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comm-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.comm-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-lg); }

.comm-invite { border-left: 3px solid var(--yellow); }

.comm-icon { font-size: 28px; flex-shrink: 0; }
.comm-info { flex: 1; min-width: 0; }
.comm-info h4 { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 2px; }
.comm-desc { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.comm-arrow { font-size: 20px; color: var(--gray-300); flex-shrink: 0; }
.comm-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Community View */
.comm-view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.comm-view-header h2 { font-size: 20px; font-weight: 800; }

.comm-post-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.comm-post-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.comm-video-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
}

.comm-post-types {
    display: flex;
    gap: 8px;
}

.comm-type-label {
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

.comm-type-label input { width: 14px; height: 14px; accent-color: var(--red); }

.comm-question {
    border-left: 3px solid var(--red);
    padding-left: 12px !important;
}

/* ============================
   Pro Badge & Page
   ============================ */
.master-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
    border: 1px solid #555;
}

.pro-badge-sm {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
}

.plan-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: auto;
    vertical-align: middle;
    line-height: 1;
    flex-shrink: 0;
}
.plan-badge-pro {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}
.plan-badge-premium {
    background: linear-gradient(135deg, #FF8C00, #FF4500);
    color: #fff;
}
.plan-badge-platinum {
    background: linear-gradient(135deg, #a0aabf, #e5e9f0);
    color: #0a0a1a;
}

.sidebar-pro-btn {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,165,0,0.1)) !important;
    color: #FFD700 !important;
    font-weight: 700 !important;
}

.sidebar-pro-btn:hover {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.2)) !important;
}

.pro-status-card {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, #1a1a0a, #2a200a);
    border: 2px solid #FFD700;
    border-radius: var(--radius);
    margin-bottom: 24px;
    color: var(--black);
}

.pro-status-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.pro-status-card h3 { font-size: 22px; color: #FFD700; margin-bottom: 8px; }
.pro-status-card p { color: #666; }

.pro-hero {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--black), #2a1a0a);
    border-radius: var(--radius);
    margin-bottom: 24px;
    color: var(--white);
}

.pro-hero-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.pro-hero h3 { font-size: 22px; margin-bottom: 4px; }
.pro-hero p { color: #999; margin-bottom: 16px; }

.pro-price { margin-top: 12px; }
.pro-price-value { font-size: 36px; font-weight: 900; color: #FFD700; }
.pro-price-label { display: block; font-size: 14px; color: #999; }

.pro-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pro-compare-col {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 12px;
}

.pro-compare-col h4 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--black);
}

.pro-col {
    border-color: #FFD700;
    background: linear-gradient(180deg, #fffef5, #fff);
}

.pro-col h4 { color: #b8860b; }

.pro-features-list { display: flex; flex-direction: column; gap: 6px; }

.pro-feature-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--gray-50);
}

.pro-feature-item.active { color: var(--black); }
.pro-feature-item.locked { color: var(--gray-400); text-decoration: line-through; opacity: 0.6; }
.pro-features-list .pro-feature-item.active { background: rgba(40,167,69,0.08); }

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.payment-btn:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.payment-icon { font-size: 28px; flex-shrink: 0; }
.payment-btn strong { display: block; font-size: 15px; color: var(--black); }
.payment-btn span { font-size: 12px; color: var(--gray-500); }

/* Public checkbox */
.public-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
}

.public-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--red);
    cursor: pointer;
}

/* ============================
   Realtime Toast Notification
   ============================ */
.rt-toast {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--black);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 300;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 90%;
}

.rt-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rt-toast-icon {
    font-size: 18px;
}

/* ============================
   Utilities
   ============================ */
.text-muted {
    color: var(--gray-500);
}

/* ============================
   Responsive
   ============================ */

/* Mobile small (< 360px) */
@media (max-width: 359px) {
    .page-title h2 {
        font-size: 18px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stats-small {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-card {
        padding: 12px 8px;
    }

    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-counters .counter-item strong {
        font-size: 16px;
    }

    .logo h1 {
        font-size: 15px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Mobile medium (>= 400px) */
@media (min-width: 400px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet+ */
@media (min-width: 600px) {
    .modal-content {
        border-radius: var(--radius);
        margin-bottom: 20px;
    }

    .modal {
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form row mobile override */
@media (max-width: 450px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* PWA standalone mode */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top, 0);
    }

    .app-header {
        padding-top: env(safe-area-inset-top, 0);
        height: calc(var(--header-height) + env(safe-area-inset-top, 0));
    }

    .app-content {
        padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0) + 12px);
    }

    .sidebar {
        padding-top: env(safe-area-inset-top, 0);
    }

    .install-banner {
        display: none !important;
    }
}

/* ============================
   Fluxograma (editor de sequencias)
   ============================ */
.flowchart-card .card-header h3 {
    font-size: 16px;
}

.flow-editor-page {
    position: fixed;
    top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--gray-100);
    z-index: 50;
}

.flow-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.flow-name-input {
    flex: 1 1 180px;
    min-width: 140px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    background: var(--gray-50);
}

.flow-name-input:focus {
    outline: none;
    border-color: var(--red);
    background: var(--white);
}

.flow-toolbar-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.flow-toolbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#flow-save-btn.btn-dirty {
    box-shadow: 0 0 0 2px rgba(227, 27, 35, 0.35);
    animation: flowDirtyPulse 1.5s ease-in-out infinite;
}

@keyframes flowDirtyPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(227, 27, 35, 0.35); }
    50%      { box-shadow: 0 0 0 4px rgba(227, 27, 35, 0.15); }
}

.flow-editor-wrap {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.flow-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.flow-sidebar-section {
    display: flex;
    flex-direction: column;
}

.flow-help {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--gray-500);
    line-height: 1.5;
}

.flow-help li {
    padding: 3px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.flow-help li:last-child { border-bottom: none; }

.flow-preset-tabs {
    display: flex;
    gap: 4px;
    margin: 6px 0;
}

.preset-tab {
    flex: 1;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.preset-tab:hover { background: var(--gray-100); }

.preset-tab.active[data-actor="eu"] {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

.preset-tab.active[data-actor="oponente"] {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.flow-preset-search {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    margin-bottom: 8px;
    background: var(--gray-50);
}

.flow-preset-search:focus {
    outline: none;
    border-color: var(--red);
    background: var(--white);
}

.flow-preset-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.flow-preset-label {
    width: 100%;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.flow-preset-chip {
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition: var(--transition);
}

.flow-preset-chip:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

.flow-canvas-outer {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.flow-canvas-wrap {
    position: absolute;
    inset: 0;
    overflow: auto;
    background:
        radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px),
        var(--gray-100);
    background-size: 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.flow-canvas {
    position: relative;
    min-width: 1200px;
    min-height: 700px;
}

.flow-canvas.flow-connecting {
    cursor: crosshair;
}

.flow-edges {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.flow-edges path.flow-edge {
    fill: none;
    stroke-width: 2.4;
    pointer-events: stroke;
    cursor: pointer;
    transition: stroke-width 0.15s;
}

.flow-edges path.flow-edge:hover {
    stroke-width: 4;
}

.flow-edges text.flow-edge-label {
    font-size: 11px;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

.flow-edges rect.flow-edge-label-bg {
    pointer-events: auto;
    cursor: pointer;
}

.flow-nodes {
    position: relative;
    width: 100%;
    height: 100%;
}

.flow-node {
    position: absolute;
    width: 200px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    user-select: none;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.05s;
    z-index: 2;
}

.flow-node-inner {
    position: relative;
    border-radius: inherit;
    overflow: hidden;
}

.flow-node.dragging {
    cursor: grabbing;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    transform: scale(1.02);
}

.flow-node-eu {
    border-color: var(--blue);
}

.flow-node-eu .flow-node-header {
    background: var(--blue);
    color: var(--white);
}

.flow-node-oponente {
    border-color: var(--red);
}

.flow-node-oponente .flow-node-header {
    background: var(--red);
    color: var(--white);
}

.flow-node-source {
    box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.5), var(--shadow);
}

.flow-node-target .flow-node-port-in {
    animation: flowPortPulse 1.2s ease-in-out infinite;
    transform: scale(1.4) translateY(-50%);
}

@keyframes flowPortPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(227, 27, 35, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(227, 27, 35, 0); }
}

.flow-node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 10px 10px 0 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-node-edit {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--gray-700);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.flow-node-eu       .flow-node-edit { color: var(--blue); }
.flow-node-oponente .flow-node-edit { color: var(--red); }

.flow-node-edit:hover {
    background: var(--white);
    transform: scale(1.05);
}

.flow-node-label {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    word-break: break-word;
}

.flow-node-notes {
    padding: 0 10px 8px;
    font-size: 11px;
    color: var(--gray-500);
    line-height: 1.35;
    word-break: break-word;
    border-top: 1px dashed var(--gray-200);
    padding-top: 6px;
}

.flow-node-port {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-400);
    top: 50%;
    transform: translateY(-50%);
    cursor: crosshair;
    transition: var(--transition);
    z-index: 3;
}

.flow-node-port:hover {
    transform: scale(1.3) translateY(-50%);
}

.flow-node-port {
    top: auto;
    transform: none;
}

.flow-node-port-top {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
}
.flow-node-port-right {
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
}
.flow-node-port-bottom {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
}
.flow-node-port-left {
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
}

.flow-node-port-top:hover    { transform: translateX(-50%) scale(1.35); }
.flow-node-port-right:hover  { transform: translateY(-50%) scale(1.35); }
.flow-node-port-bottom:hover { transform: translateX(-50%) scale(1.35); }
.flow-node-port-left:hover   { transform: translateY(-50%) scale(1.35); }

.flow-node-eu       .flow-node-port { border-color: var(--blue); }
.flow-node-oponente .flow-node-port { border-color: var(--red); }
.flow-node-decisao  .flow-node-port { border-color: #f59e0b; background: #fff7e6; }

/* No de decisao - losango */
.flow-node-decisao {
    width: 220px;
    height: 150px;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* "borda" laranja: camada externa em diamante */
.flow-node-decisao::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f59e0b;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    z-index: 0;
}

/* preenchimento interno em diamante (cria o efeito de borda 3px) */
.flow-node-decisao .flow-node-inner {
    position: absolute;
    inset: 3px;
    background: linear-gradient(180deg, #fffbeb 0%, #fff5d1 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    z-index: 1;
}

.flow-node-decisao .flow-node-header,
.flow-node-decisao .flow-node-actor,
.flow-node-decisao .flow-node-notes {
    display: none;
}

/* botao editar do losango: usa posicao default (top-right do bounding box, fora do clip-path) */
.flow-node-decisao .flow-node-edit {
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.4);
}

.flow-node-decisao .flow-node-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 38px;
    font-size: 12.5px;
    line-height: 1.25;
    color: #4b3b00;
    font-weight: 700;
    z-index: 2;
    pointer-events: none;
}

.flow-node-decisao.dragging {
    transform: scale(1.02);
}

/* edges de decisao com legenda destacada */
.flow-edge-decision {
    stroke-width: 2.6;
}

.dot-dec { background: #f59e0b; }

/* toggle (switch) reutilizavel */
.toggle-line {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    transition: var(--transition);
}

.toggle-line:hover { border-color: var(--red); }

.toggle-line input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 22px;
    background: var(--gray-300);
    border-radius: 999px;
    flex-shrink: 0;
    transition: var(--transition);
    margin-top: 2px;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-line input[type="checkbox"]:checked + .toggle-switch {
    background: var(--red);
}

.toggle-line input[type="checkbox"]:checked + .toggle-switch::after {
    left: 19px;
}

.preset-tab.active[data-actor="decisao"] {
    background: #f59e0b;
    color: var(--white);
    border-color: #f59e0b;
}

.actor-opt.actor-dec input:checked,
.actor-opt:has(input:checked).actor-dec {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.flow-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--gray-500);
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.85);
    padding: 24px 32px;
    border-radius: var(--radius);
    border: 2px dashed var(--gray-300);
    z-index: 1;
}

.flow-empty p { margin: 4px 0; }

.flow-status {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--black);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0.92;
}

.flow-status:empty { display: none; }

.flow-status-success { background: var(--green); }
.flow-status-error   { background: var(--red); }
.flow-status-info    { background: var(--blue); }

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.dot-eu { background: var(--blue); }
.dot-op { background: var(--red); }

.actor-toggle {
    display: flex;
    gap: 8px;
}

.actor-opt {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
}

.actor-opt input { margin: 0; }

.actor-opt.actor-eu input:checked + .dot,
.actor-opt:has(input:checked).actor-eu {
    border-color: var(--blue);
    background: rgba(0, 123, 255, 0.08);
    color: var(--blue);
}

.actor-opt.actor-op input:checked + .dot,
.actor-opt:has(input:checked).actor-op {
    border-color: var(--red);
    background: rgba(227, 27, 35, 0.08);
    color: var(--red);
}

/* Mobile */
@media (max-width: 768px) {
    .flow-toolbar {
        padding: 6px 8px;
        gap: 6px;
    }

    .flow-toolbar .btn {
        padding: 5px 8px;
        font-size: 11.5px;
    }

    .flow-name-input {
        font-size: 13px;
        flex-basis: 100%;
        order: 1;
    }

    .flow-toolbar-actions {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .flow-toolbar-actions .btn {
        flex-shrink: 0;
    }

    .flow-sidebar {
        width: 200px;
        padding: 8px;
    }

    .flow-node {
        width: 170px;
    }

    .flow-node-decisao {
        width: 200px;
        height: 140px;
    }

    .flow-node-decisao .flow-node-label {
        font-size: 12px;
        padding: 0 32px;
    }
}

/* ============================
   Tour interativo
   ============================ */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.tour-overlay.tour-active {
    opacity: 1;
    pointer-events: auto;
}

.tour-modal {
    background: var(--white);
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    padding: 24px 22px 20px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
    text-align: center;
    transform: translateY(12px) scale(0.96);
    transition: transform 0.3s cubic-bezier(.2,.8,.3,1.1);
}

.tour-overlay.tour-active .tour-modal {
    transform: translateY(0) scale(1);
}

.tour-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-100);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.tour-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--red), #ff6b6b);
    width: 0%;
    transition: width 0.3s ease;
}

.tour-step-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.tour-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 10px;
}

.tour-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 10px;
}

.tour-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--gray-700);
    margin-bottom: 22px;
    text-align: left;
}

.tour-body b {
    color: var(--black);
}

.tour-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.tour-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
    flex: 1;
    min-width: 90px;
}

.tour-actions .tour-skip {
    flex: 0 0 auto;
    background: transparent;
    border-color: transparent;
    color: var(--gray-500);
    font-size: 12px;
    text-decoration: underline;
}

.tour-actions .tour-next {
    flex: 1.5;
}

.tour-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.tour-close:hover {
    background: var(--gray-100);
    color: var(--black);
}

/* pill flutuante para retomar tour */
.tour-resume-pill {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--red), #ff5b5b);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(227, 27, 35, 0.45);
    z-index: 9990;
    animation: tourPulse 2.5s ease-in-out infinite;
}

.tour-resume-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(227, 27, 35, 0.55);
}

@keyframes tourPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(227, 27, 35, 0.45); }
    50%      { box-shadow: 0 8px 32px rgba(227, 27, 35, 0.7); }
}

/* toast de conclusao */
.tour-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translate(-50%, -20px);
    background: var(--green);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tour-toast.tour-toast-show {
    transform: translate(-50%, 0);
    opacity: 1;
}

@media (max-width: 480px) {
    .tour-modal {
        padding: 20px 16px;
    }
    .tour-title { font-size: 18px; }
    .tour-icon { font-size: 36px; }
    .tour-actions {
        flex-direction: column-reverse;
    }
    .tour-actions .btn { width: 100%; }
    .tour-actions .tour-skip { order: 99; margin-top: 4px; }
    .tour-resume-pill {
        bottom: 14px;
        right: 14px;
        font-size: 12px;
        padding: 9px 14px;
    }
}

@media (max-width: 520px) {
    .flow-editor-wrap {
        flex-direction: column;
    }

    .flow-sidebar {
        width: 100%;
        max-height: 38vh;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
}

/* Read-only viewer - esconde sidebar de presets */
.flow-editor-page.flow-readonly .flow-sidebar {
    display: none;
}

/* Modal de compartilhar */
.share-flow-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-flow-opt {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.share-flow-opt:hover {
    border-color: var(--red);
    background: #fff5f5;
}

.share-flow-opt > div {
    display: flex;
    flex-direction: column;
}

.share-flow-opt strong {
    font-size: 13.5px;
    color: var(--black);
}

.share-flow-opt .text-muted {
    font-size: 11.5px;
}

.share-flow-ico {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

/* Card de fluxograma compartilhado no feed/chat */
.shared-flowchart-card {
    border: 1px solid var(--gray-200);
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 10px;
}

.shared-flowchart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.shared-flowchart-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.shared-flowchart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin: 2px 0;
}

.shared-flowchart-stats {
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.shared-flowchart-stats .dot { vertical-align: middle; }

.chat-flowchart-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-flowchart-card:hover { background: var(--white); }

.chat-flowchart-card .chat-tech-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 2px;
}

.chat-flowchart-card strong {
    font-size: 13px;
    color: var(--black);
    display: block;
    margin-bottom: 4px;
}

.chat-flowchart-card .chat-flow-stats {
    font-size: 11px;
    color: var(--gray-500);
}

/* Print / PDF */
@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body { background: #fff !important; }

    .app-header,
    .sidebar,
    .sidebar-overlay,
    .install-banner,
    .rt-toast,
    .modal,
    .flow-toolbar,
    .flow-sidebar,
    .flow-empty,
    .flow-status,
    .alert,
    .flow-node-port,
    .flow-node-edit {
        display: none !important;
    }

    .app-content {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .flow-editor-page {
        position: static !important;
        height: auto !important;
        background: #fff !important;
        z-index: auto !important;
    }

    .flow-editor-wrap {
        overflow: visible !important;
        height: auto !important;
    }

    .flow-canvas-outer,
    .flow-canvas-wrap {
        position: static !important;
        overflow: visible !important;
        background: #fff !important;
        height: auto !important;
        inset: auto !important;
    }

    .flow-canvas-wrap {
        background: #fff !important;
    }

    .flow-canvas {
        page-break-inside: avoid;
    }

    .flow-node {
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .flow-edges path.flow-edge {
        stroke-width: 2 !important;
    }
}

body.flow-printing {
    overflow: visible !important;
}
