/* Client Portal - Estilo consistente con CRM principal */

/* Variables del CRM */
:root {
    --primary-blue: #1e40af;
    --primary-blue-light: #3b82f6;
    --primary-blue-dark: #1e3a8a;
    --secondary-gray: #64748b;
    --secondary-gray-light: #94a3b8;
    --secondary-gray-dark: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Aliases for CRM compatibility */
    --primary-color: var(--primary-blue);
    --primary-light: rgba(30, 64, 175, 0.1);
    --card-bg: var(--bg-primary);
    --border-color: var(--border-light);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --success-color: var(--success);
    --success-light: rgba(16, 185, 129, 0.1);
    --danger-color: var(--danger);
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning-color: var(--warning);
    --warning-light: rgba(245, 158, 11, 0.1);
    --bg-hover: rgba(248, 250, 252, 0.8);
    --gradient-primary: linear-gradient(180deg, #1e40af, #0f1c4d);
    --gradient-secondary: linear-gradient(90deg, #eaf2ff, #f7f9ff);
    --bank-bg: #0f1320;
    --bank-card: #171c2b;
    --bank-text: #e5e7eb;
    --bank-muted: #9aa0aa;
    --bank-border: #2a3142;
    --accent-blue: #2d6cdf;
    --accent-blue-2: #5aa3ff;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tema claro: restablece variables bancarias a paleta clara */
.theme-light {
  --bank-bg: var(--bg-secondary);
  --bank-card: var(--card-bg);
  --bank-text: var(--text-primary);
  --bank-muted: var(--text-muted);
  --bank-border: var(--border-light);
}

/* Mobile Toggle Button */
.mobile-menu-toggle{display:none;position:fixed;top:12px;left:12px;width:40px;height:40px;border:none;border-radius:10px;background:var(--primary-blue);color:#fff;z-index:1100;box-shadow:var(--shadow-md)}
.mobile-menu-toggle i{font-size:18px}

.topbar{position:sticky;top:0;background:var(--bg-primary);border-bottom:1px solid var(--border-light);z-index:100}
.topbar .brand{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem}
.topbar .menu{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem}

@media (max-width:1024px){
  .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center}
  .content{margin-left:0}
  .client-main-wrapper{margin-left:0 !important}
}

@media (max-width:768px){
  .topbar .menu{display:none}
  .btn{min-height:44px;padding:.75rem 1rem}
  .form-group select,.form-group input{min-height:44px;padding:.85rem 1rem}
  .client-page-title{font-size:1.375rem}
  .client-content{padding:16px !important}
  .card{max-width:100%; margin:0}
  .account-create .wizard-steps{grid-template-columns:1fr}
}

@media (min-width:1024px){
  .account-create.client-content{max-width:960px;margin:0 auto;padding:32px}
  .account-create .card{width:100%;border-radius:16px;box-shadow:var(--shadow-md)}
  .account-create .card .card-body{padding:24px}
  .account-create .form-group{max-width:640px}
  .account-create .btn.btn-primary{min-height:44px;border-radius:10px}
  .account-create .account-types-grid{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:20px}
  .account-create .selectable-card{cursor:pointer}
  .account-create .account-types-grid .card{border-radius:14px;box-shadow:var(--shadow-sm)}
  .account-create .account-types-grid .card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
  .account-create .account-types-grid .card .card-body{padding:16px}
  .account-create .card{max-width:960px;margin:0 auto}
  .account-create .wizard{max-width:960px;margin:0 auto 16px}
  .account-create .wizard-bar{height:8px;background:var(--bg-tertiary);border-radius:8px;overflow:hidden;border:1px solid var(--border-light)}
  .account-create .wizard-fill{height:100%;background:linear-gradient(90deg,#3b82f6,#1e40af);width:33%}
  .account-create .wizard-fill.progress-66{width:66%}
  .account-create .wizard-fill.progress-100{width:100%}
  .account-create .wizard-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}
  .account-create .wizard-step{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--border-light);border-radius:10px;background:var(--bg-primary)}
  .account-create .wizard-step .step-index{width:28px;height:28px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:var(--bg-tertiary);color:var(--text-primary);font-weight:700}
  .account-create .wizard-step .step-title{font-weight:600;color:var(--text-primary)}
  .account-create .wizard-step.is-current{border-color:#3b82f6;box-shadow:0 2px 8px rgba(59,130,246,0.15)}
  .account-create .wizard-step.is-current .step-index{background:#dbeafe;color:#1e40af}
  .account-create .wizard-step.is-done .step-index{background:#dcfce7;color:#166534}
}
  .table-responsive{overflow-x:auto}
}

/* Layout principal */
.client-portal-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Sidebar del Client Portal */
.client-sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.client-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.client-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.client-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.client-logo-text {
    display: flex;
    flex-direction: column;
}

.client-logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.client-logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Navegación del sidebar */
.client-sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.client-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.client-nav-item {
    margin: 0.25rem 1rem;
}

.client-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.client-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.client-nav-link.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
    box-shadow: var(--shadow-sm);
}

.client-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Manager card en sidebar */
.client-manager-card {
    margin: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* Barra de cierre de sesión debajo del gestor */
.client-logout-bar { margin: 0 1rem 1rem; }
.client-logout-bar .logout-btn { width:100%; justify-content:center; border:1px solid rgba(30,64,175,.18); border-radius:10px; padding:.6rem 1rem; background:linear-gradient(180deg,#3b82f6,#1e40af); box-shadow:0 6px 14px rgba(30,64,175,.25); display:inline-flex; align-items:center; gap:.5rem; color:#fff; text-decoration:none; }
.client-logout-bar .logout-btn:hover{ transform: translateY(-1px); filter: brightness(1.03); }

.client-manager-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.client-manager-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.client-manager-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.client-manager-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.client-manager-contact {
    margin-top: 0.75rem;
}

.client-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.client-contact-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

/* Contenido principal */
.client-main-wrapper {
    flex: 1;
    margin-left: 300px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar del layout del portal cliente */
.topbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: #fff;
    font-weight: 700;
}

.topbar .brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.topbar .menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar .menu-link,
.topbar .dropdown-toggle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Header del Client Portal */
.client-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.client-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.client-breadcrumb-item {
    color: var(--text-secondary);
    font-weight: 500;
}

.client-breadcrumb-item.current {
    color: var(--primary-blue);
    font-weight: 600;
}

.client-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.client-header-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-header-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

.client-header-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.client-header-btn.secondary:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* User dropdown en header */
.client-user-dropdown {
    position: relative;
}

.client-user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-user-btn:hover {
    background: var(--border-light);
}

.client-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.client-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.client-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.client-user-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Contenido principal */
.client-main-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
}

/* Welcome section */
.client-welcome {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

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

.client-welcome-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.client-welcome-text p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stats Grid - CRM Widget Style */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Variantes de widgets para íconos y barra superior, estilo como imagen adjunta */
.stat-card.balance-card::before { background: linear-gradient(90deg, #4f46e5, #3b82f6); }
.stat-card.accounts-card::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.profit-card::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.trades-card::before { background: linear-gradient(90deg, #0ea5e9, #14b8a6); }

.balance-card .stat-icon { background: rgba(158,203,255,.12); color: #9ecbff; }
.accounts-card .stat-icon { background: rgba(245,191,36,.12); color: #fbbf24; }
.profit-card .stat-icon { background: rgba(52,211,153,.12); color: #34d399; }
.trades-card .stat-icon { background: rgba(20,184,166,.12); color: #14b8a6; }

.stat-card .stat-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

.stat-change.neutral {
    color: var(--text-muted);
}

/* Section Headers - CRM Style */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.section-title i {
    color: #9ecbff;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Accounts Summary Cards */
.accounts-summary {
    margin-bottom: 2rem;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.types-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin:12px 0}
.type-card{background:var(--bank-card);border:1px solid var(--bank-border);border-radius:14px;box-shadow:0 8px 20px rgba(0,0,0,.35);overflow:hidden}
.type-card .type-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:rgba(255,255,255,.06)}
.type-card .type-name{font-weight:800;color:var(--bank-text)}
.type-card .type-chip{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .6rem;border-radius:999px;background:rgba(158,203,255,.12);color:#9ecbff;border:1px solid rgba(158,203,255,.35);font-weight:700;font-size:.75rem}
.type-card .type-body{padding:12px 14px}
.type-row{display:flex;align-items:center;justify-content:space-between;padding:8px 0;color:var(--bank-text)}
.type-card.type-standard .type-head{background:linear-gradient(90deg,#e0f2fe,rgba(255,255,255,.06))}
.type-card.type-pro .type-head{background:linear-gradient(90deg,#fef3c7,rgba(255,255,255,.06))}
.type-card.type-vip .type-head{background:linear-gradient(90deg,#e9d5ff,rgba(255,255,255,.06))}

.bank-info{margin:12px 0}
.bank-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem}
.bank-card{background:var(--bank-card);border:1px solid var(--bank-border);border-radius:14px;box-shadow:0 8px 20px rgba(0,0,0,.35);padding:14px}
.bank-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--bank-border);padding:8px 0}
.bank-row:last-child{border-bottom:0}
.bank-label{color:var(--bank-muted);font-weight:700}
.bank-value{color:var(--bank-text);display:flex;align-items:center;gap:8px}
.copy-btn{border:1px solid var(--bank-border);background:rgba(255,255,255,.06);color:#9ecbff;border-radius:8px;padding:6px 8px;cursor:pointer}
.copy-btn:hover{filter:brightness(1.08)}

/* Revolut-like tiles and lists */
.revo-filter{display:flex;gap:.5rem;align-items:center;justify-content:space-between;margin:12px 0}
.revo-filter-left{display:flex;gap:.5rem;align-items:center}
.pill{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .7rem;border-radius:9999px;background:var(--bank-card);border:1px solid var(--bank-border);color:var(--bank-text);cursor:pointer}
.pill.active{background:rgba(158,203,255,.12);border-color:rgba(158,203,255,.35);color:#9ecbff}
.search-input{min-width:240px;padding:.5rem .75rem;border-radius:10px;border:1px solid var(--bank-border);background:var(--bank-card);color:var(--bank-text)}

.revo-list{list-style:none;padding:0;margin:0;display:grid;gap:.5rem}
.revo-item{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:var(--bank-card);border:1px solid var(--bank-border);border-radius:12px}
.revo-item:hover{filter:brightness(1.04)}
.revo-left{display:flex;align-items:center;gap:.75rem}
.revo-icon{width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.06);display:flex;align-items:center;justify-content:center;color:#9ecbff}
.revo-main{display:flex;flex-direction:column}
.revo-title{font-weight:700;color:var(--bank-text)}
.revo-sub{font-size:.8rem;color:var(--bank-muted)}
.revo-right{text-align:right}
.revo-amt{font-weight:800;color:var(--bank-text)}
.revo-cur{color:var(--bank-muted);font-weight:600}

/* Generic cards and buttons */
.revo-card{background:var(--bank-card);border:1px solid var(--bank-border);border-radius:16px;box-shadow:0 8px 20px rgba(0,0,0,.35);padding:16px}
.btn{display:inline-flex;align-items:center;gap:.5rem;border-radius:12px;padding:.6rem .9rem;text-decoration:none;border:1px solid var(--bank-border);background:var(--bank-card);color:var(--bank-text);cursor:pointer}
.btn:hover{filter:brightness(1.06)}
.btn-primary{background:linear-gradient(135deg,var(--accent-blue-2),var(--accent-blue));color:#fff;border-color:rgba(46,166,255,.35)}
.btn-secondary{background:rgba(255,255,255,.06);color:var(--bank-text)}
.input, .form-input, .form-select{padding:.6rem .8rem;border-radius:10px;border:1px solid var(--bank-border);background:var(--bank-card);color:var(--bank-text)}
.input::placeholder, .form-input::placeholder{color:var(--bank-muted)}

/* Dashboard hero and quick actions */
.bank-hero{margin:12px 0}
.bank-hero-card{background:var(--bank-card);border:1px solid var(--bank-border);border-radius:16px;box-shadow:0 8px 20px rgba(0,0,0,.35);padding:16px}
.hero-content{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.hero-text h3{margin:0;color:var(--bank-text);font-size:1.1rem}
.hero-text p{margin:.25rem 0 0;color:var(--bank-muted)}
.qa-title{font-size:.95rem;color:var(--bank-muted);margin:8px 0}
.qa-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.qa-tile{display:flex;flex-direction:column;gap:.5rem;align-items:center;justify-content:center;background:var(--bank-card);border:1px solid var(--bank-border);border-radius:12px;padding:12px;text-decoration:none;color:var(--bank-text)}
.qa-tile i{color:#9ecbff;font-size:1.1rem}
.qa-tile:hover{filter:brightness(1.04)}

.account-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Barra superior al estilo de widgets del CRM */
.account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: 12px 12px 0 0;
}

.account-card.account-live::before {
    background: linear-gradient(90deg, #4f46e5, #3b82f6);
}

.account-card.account-demo::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Variante premium: apariencia similar a las tarjetas de Desks */
.account-card.premium {
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.account-card.premium:hover { box-shadow: var(--shadow-lg); }
.account-card.premium::before { display: none; }

.account-card-header.premium {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gradient-secondary);
    border-bottom: 1px solid var(--border-light);
    /* extender la cabecera a los bordes del card */
    margin: -1rem -1rem 0;
    border-radius: 12px 12px 0 0;
}

.account-card.premium .type-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-blue);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.account-card.premium.account-demo .type-icon { color: #b45309; }
.account-card.premium.account-live .type-icon { color: #1e40af; }

.account-card.premium .account-id .type-name { font-size: 1.02rem; }
.account-card.premium .account-card-body { padding-top: .5rem; }

.account-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.type-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
}

.account-card.account-demo .type-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.account-card.account-live .type-icon {
    background: rgba(30, 64, 175, 0.12);
    color: #1e40af;
}

.account-id .type-name {
    font-weight: 600;
    color: var(--text-primary);
}

.account-id .account-number {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    color: var(--text-secondary);
}

.account-card-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.balance .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.balance .value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 6px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.balance-fill {
    height: 100%;
    background: linear-gradient(90deg,#2ea6ff,#1b7bd3);
    width: 0;
    transition: width 0.6s ease;
}

.account-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

/* Botones de acción modernos (portal cliente) */
.btn-action,
.client-action-btn,
.account-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    border: 1px solid var(--border-light);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-action i,
.client-action-btn i,
.account-action-btn i { font-size: 0.9rem; }
.btn-size-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }

/* Variantes verdes y rojas para depósito/retiro */
.btn-deposit,
.client-action-btn.deposit,
.account-action-btn.deposit {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    color: #fff;
    border-color: rgba(22, 163, 74, 0.4);
}
.btn-deposit:hover,
.client-action-btn.deposit:hover,
.account-action-btn.deposit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}

.btn-withdraw,
.client-action-btn.withdraw,
.account-action-btn.withdraw {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    border-color: rgba(220, 38, 38, 0.4);
}
.btn-withdraw:hover,
.client-action-btn.withdraw:hover,
.account-action-btn.withdraw:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.35);
}

.client-action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.client-action-btn.secondary:hover {
    background: var(--border-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Chips KPI dentro de tarjetas de cuenta */
.account-kpis { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}
.kpi-chip i { font-size: 0.8rem; opacity: 0.9; }
.kpi-chip.status.ok { background: var(--success-light); color: var(--success-color); border-color: rgba(16, 185, 129, 0.25); }
.kpi-chip.status.bad { background: var(--danger-light); color: var(--danger-color); border-color: rgba(239, 68, 68, 0.25); }

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

/* Tables - CRM Style */
.accounts-table-container,
.documents-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accounts-table,
.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.accounts-table thead th,
.documents-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accounts-table tbody td,
.documents-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.accounts-table tbody tr:hover,
.documents-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Status Badges - CRM Style */
.status-badge,
.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tickets: prioridad y estado */
.priority-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .6rem; border-radius:999px; font-weight:700; font-size:.75rem; border:1px solid transparent }
.priority-badge.low { background: rgba(52,211,153,.12); color:#34d399; border-color: rgba(52,211,153,.35) }
.priority-badge.medium { background: rgba(245,158,11,.12); color:#f59e0b; border-color: rgba(245,158,11,.35) }
.priority-badge.high { background: rgba(239,68,68,.12); color:#ef4444; border-color: rgba(239,68,68,.35) }

.status-badge.open { background: rgba(245,158,11,.18); color:#f5d49b; border:1px solid rgba(245,158,11,.35) }
.status-badge.in-progress { background: rgba(158,203,255,.18); color:#9ecbff; border:1px solid rgba(158,203,255,.35) }
.status-badge.closed { background: rgba(16,185,129,.18); color:#a8f0c7; border:1px solid rgba(16,185,129,.35) }

.ticket-subject-link { color: var(--text-primary); font-weight:700; text-decoration:none }
.ticket-subject-link:hover { text-decoration:underline; }

.status-badge.status-active,
.doc-badge.approved {
    background: rgba(16,185,129,.18);
    color: #a8f0c7;
    border: 1px solid rgba(16,185,129,.35);
}

.status-badge.status-inactive,
.doc-badge.rejected {
    background: rgba(239,68,68,.18);
    color: #f5a6a6;
    border: 1px solid rgba(239,68,68,.35);
}

.doc-badge.pending {
    background: rgba(245,158,11,.18);
    color: #f5d49b;
    border: 1px solid rgba(245,158,11,.35);
}

/* Action Buttons - CRM Style */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.action-btn-small {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.action-btn-small:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.action-btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Support Cards - CRM Widget Style */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.support-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.support-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.support-card p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Verification Section - CRM Style */
.verification-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.verification-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,#2ea6ff,#1b7bd3);
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.verification-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.step.completed .step-icon {
    background: var(--success-color);
    color: white;
}

.step.pending .step-icon {
    background: var(--warning-light);
    color: var(--warning-color);
}

/* Additional styles for enhanced form and table elements */

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-primary);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Priority and Status Badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-badge.low {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.priority-badge.high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-badge.open {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-badge.in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.closed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Ticket ID styling */
.ticket-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.ticket-subject-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ticket-subject-link:hover {
    color: var(--primary-color);
}

/* Support Card */
.support-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Enhanced Action Buttons */
.action-btn-small.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.action-btn-small.edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .client-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .client-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .client-main-wrapper {
        margin-left: 0;
    }
    
    .client-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .client-main-content {
        padding: 1rem;
    }

    /* Ocultar menú superior en tablet y usar botón burger */
    .topbar .menu { display: none; }
    .topbar { padding: 0.5rem 0.75rem; }
}

@media (max-width: 768px) {
    .client-header {
        padding: 1rem;
    }
    
    .client-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .client-welcome {
        padding: 1.5rem;
    }
    
    .client-welcome-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .client-section-header {
        padding: 1rem;
    }
    
    .client-section-content {
        padding: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .documents-table th:nth-child(5),
    .documents-table th:nth-child(6),
    .documents-table td:nth-child(5),
    .documents-table td:nth-child(6) {
        display: none;
    }

    /* Ajustes de tarjetas y secciones para móvil */
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-card { padding: 1rem; border-radius: 12px; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .section-header { margin-bottom: 1rem; padding-bottom: 0.75rem; }
    .section-actions { flex-wrap: wrap; gap: 0.5rem; }
    .topbar .brand-title { display: none; }
}

/* Sidebar overlay (para el layout móvil del portal cliente) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sidebar-overlay.show {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

/* WebTrader Button Styles */
.client-action-btn.webtrader {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    position: relative;
    overflow: hidden;
}

.client-action-btn.webtrader:hover {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.client-action-btn.webtrader:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.client-action-btn.webtrader:hover:before {
    left: 100%;
}

.client-action-btn.webtrader i {
    margin-right: 0.5rem;
    font-size: 1.1em;
}
.btn-action i,
.client-action-btn i,
.account-action-btn i { font-size: 0.9rem; }
.btn-size-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }

/* Variantes verdes y rojas para depósito/retiro */
.btn-deposit,
.client-action-btn.deposit,
.account-action-btn.deposit {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    color: #fff;
    border-color: rgba(22, 163, 74, 0.4);
}
.btn-deposit:hover,
.client-action-btn.deposit:hover,
.account-action-btn.deposit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}

.btn-withdraw,
.client-action-btn.withdraw,
.account-action-btn.withdraw {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    border-color: rgba(220, 38, 38, 0.4);
}
.btn-withdraw:hover,
.client-action-btn.withdraw:hover,
.account-action-btn.withdraw:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.35);
}

.client-action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.client-action-btn.secondary:hover {
    background: var(--border-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Chips KPI dentro de tarjetas de cuenta */
.account-kpis { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}
.kpi-chip i { font-size: 0.8rem; opacity: 0.9; }
.kpi-chip.status.ok { background: var(--success-light); color: var(--success-color); border-color: rgba(16, 185, 129, 0.25); }
.kpi-chip.status.bad { background: var(--danger-light); color: var(--danger-color); border-color: rgba(239, 68, 68, 0.25); }

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

/* Tables - CRM Style */
.accounts-table-container,
.documents-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accounts-table,
.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.accounts-table thead th,
.documents-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accounts-table tbody td,
.documents-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.accounts-table tbody tr:hover,
.documents-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Status Badges - CRM Style */
.status-badge,
.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active,
.doc-badge.approved {
    background: var(--success-light);
    color: var(--success-color);
}

.status-badge.status-inactive,
.doc-badge.rejected {
    background: var(--danger-light);
    color: var(--danger-color);
}

.doc-badge.pending {
    background: var(--warning-light);
    color: var(--warning-color);
}

/* Action Buttons - CRM Style */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.action-btn-small {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.action-btn-small:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Support Cards - CRM Widget Style */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.support-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.support-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.support-card p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Verification Section - CRM Style */
.verification-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.verification-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.verification-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.step.completed .step-icon {
    background: var(--success-color);
    color: white;
}

.step.pending .step-icon {
    background: var(--warning-light);
    color: var(--warning-color);
}

/* Additional styles for enhanced form and table elements */

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Priority and Status Badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-badge.low {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.priority-badge.high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-badge.open {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-badge.in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.closed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Ticket ID styling */
.ticket-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.ticket-subject-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ticket-subject-link:hover {
    color: var(--primary-color);
}

/* Support Card */
.support-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Enhanced Action Buttons */
.action-btn-small.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.action-btn-small.edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .client-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .client-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .client-main-wrapper {
        margin-left: 0;
    }
    
    .client-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .client-main-content {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .client-header {
        padding: 1rem;
    }
    
    .client-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .client-welcome {
        padding: 1.5rem;
    }
    
    .client-welcome-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .client-section-header {
        padding: 1rem;
    }
    
    .client-section-content {
        padding: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .documents-table th:nth-child(5),
    .documents-table th:nth-child(6),
    .documents-table td:nth-child(5),
    .documents-table td:nth-child(6) {
        display: none;
    }
}

/* Sidebar overlay (para el layout móvil del portal cliente) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
    display: none;
}
.sidebar-overlay.active {
    display: block;
}
/* Wizard base styles */
.account-create .wizard{margin:0 0 12px}
.account-create .wizard-bar{height:6px;background:var(--bg-tertiary);border-radius:8px;overflow:hidden;border:1px solid var(--border-light)}
.account-create .wizard-fill{height:100%;background:linear-gradient(90deg,#3b82f6,#1e40af);width:33%}
.account-create .wizard-fill.progress-66{width:66%}
.account-create .wizard-fill.progress-100{width:100%}
.account-create .wizard-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.account-create .wizard-step{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border-light);border-radius:8px;background:var(--bg-primary)}
.account-create .wizard-step .step-index{width:24px;height:24px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;background:var(--bg-tertiary);color:var(--text-primary);font-weight:700}
.account-create .wizard-step .step-title{font-weight:600;color:var(--text-primary);font-size:.875rem}
.account-create .wizard-step.is-current{border-color:#3b82f6;box-shadow:0 2px 6px rgba(59,130,246,0.12)}
.account-create .wizard-step.is-current .step-index{background:#dbeafe;color:#1e40af}
.account-create .wizard-step.is-done .step-index{background:#dcfce7;color:#166534}
.chat-overlay{position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:1400}
.chat-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1450}
.chat-window{width:360px;max-width:90vw;background:#fff;border:1px solid var(--border-light);border-radius:12px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column}
.chat-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border-light)}
.chat-close{border:none;background:transparent;color:#64748b;font-size:20px;line-height:1;cursor:pointer}
.chat-body{height:300px;overflow-y:auto;padding:12px}
.chat-msg{margin-bottom:10px}
.chat-msg .chat-text{display:inline-block;padding:8px 10px;border-radius:10px}
.chat-msg.from-client .chat-text{background:#e0f2fe;color:#0ea5e9}
.chat-msg.from-manager .chat-text{background:#dcfce7;color:#16a34a}
.chat-time{font-size:12px;color:#64748b;margin-top:2px}
.chat-input{border-top:1px solid var(--border-light);padding:10px}
.chat-input form{display:flex;gap:8px}
.chat-input input{flex:1;padding:.625rem .75rem;border:1px solid var(--border-light);border-radius:8px}
.client-manager-card .client-contact-btn{width:100%;justify-content:center;border:1px solid rgba(30,64,175,.18);border-radius:10px;padding:.6rem 1rem;background:linear-gradient(180deg,#3b82f6,#1e40af);box-shadow:0 6px 14px rgba(30,64,175,.25)}
.client-manager-card .client-contact-btn:hover{transform:translateY(-1px);filter:brightness(1.03)}
.client-manager-card .client-contact-btn i{font-size:.95rem}
@media (min-width:1024px){.client-manager-card .client-contact-btn{font-size:.8125rem;min-height:40px}}
@media (max-width:768px){.client-manager-card .client-contact-btn{font-size:.8125rem;min-height:44px}}
