/* ============================================
   Dashboard Styles
   ============================================ */
:root {
    --dashboard-bg: #f8fafc;
    --dashboard-sidebar: #ffffff;
    --dashboard-text: #1e293b;
    --dashboard-text-secondary: #64748b;
    --dashboard-border: #e2e8f0;
    --dashboard-primary: #6366f1;
    --dashboard-primary-dark: #4f46e5;
    --dashboard-accent: #10b981;
    --dashboard-danger: #ef4444;
    --dashboard-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --dashboard-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.dashboard-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--dashboard-bg);
    color: var(--dashboard-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Dashboard Header
   ============================================ */
.dashboard-header {
    background: var(--dashboard-sidebar);
    border-bottom: 1px solid var(--dashboard-border);
    box-shadow: var(--dashboard-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    margin: 0 2rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--dashboard-text-secondary);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--dashboard-primary);
    background: rgba(99, 102, 241, 0.05);
}

.nav-item.active {
    color: var(--dashboard-primary);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

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

.dashboard-logo .logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
}

.dashboard-user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info .username {
    font-weight: 600;
    color: var(--dashboard-text);
    font-size: 0.9375rem;
}

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

.btn-primary-small,
.btn-secondary-small {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-block;
}

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

.btn-primary-small:hover {
    background: var(--dashboard-primary-dark);
    border-color: var(--dashboard-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary-small {
    background: transparent;
    color: var(--dashboard-text);
    border-color: var(--dashboard-border);
}

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

/* ============================================
   Dashboard Main Content
   ============================================ */
.dashboard-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-messages {
    margin-bottom: 2rem;
}

/* ============================================
   Login Page Styles
   ============================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.login-card {
    background: var(--dashboard-sidebar);
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    box-shadow: var(--dashboard-shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--dashboard-text-secondary);
    font-size: 0.9375rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-group input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: white;
    color: var(--dashboard-text);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--dashboard-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-login {
    padding: 0.875rem 1.5rem;
    background: var(--dashboard-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: var(--dashboard-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* ============================================
   Dashboard Index Page
   ============================================ */
.dashboard-container {
    background: var(--dashboard-sidebar);
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    box-shadow: var(--dashboard-shadow);
    padding: 2rem;
}

.dashboard-welcome {
    margin-bottom: 2rem;
}

.dashboard-welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 0.5rem;
}

.dashboard-welcome p {
    color: var(--dashboard-text-secondary);
}

.dashboard-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dashboard-border);
}

.dashboard-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--dashboard-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.dashboard-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.dashboard-header-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 0.5rem;
}

.header-actions-group {
    display: flex;
    gap: 0.75rem;
}

.section-header-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.info-message {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    color: var(--dashboard-text);
}

.info-message p {
    margin: 0;
    color: var(--dashboard-text-secondary);
    font-size: 0.9375rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-block;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--dashboard-primary-dark);
    border-color: var(--dashboard-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--dashboard-text);
    border-color: var(--dashboard-border);
}

.btn-secondary:hover {
    background: var(--dashboard-bg);
    border-color: var(--dashboard-text-secondary);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: #3730a3;
    border-color: rgba(99, 102, 241, 0.2);
}

/* ============================================
   Responsive Design
   ============================================ */
/* ============================================
   Client Management Styles
   ============================================ */
.clients-table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.clients-table thead {
    background: var(--dashboard-bg);
}

.clients-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dashboard-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--dashboard-border);
}

.clients-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--dashboard-border);
    color: var(--dashboard-text);
}

.clients-table tbody tr:hover {
    background: var(--dashboard-bg);
}

.clients-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.status-trial {
    background: rgba(251, 191, 36, 0.1);
    color: #854d0e;
}

.status-pending {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.status-expired {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.plan-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.plan-starter {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.plan-pro {
    background: rgba(99, 102, 241, 0.1);
    color: #3730a3;
}

.plan-business {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-view {
    background: rgba(99, 102, 241, 0.1);
    color: var(--dashboard-primary);
    border-color: rgba(99, 102, 241, 0.2);
}

.btn-view:hover {
    background: rgba(99, 102, 241, 0.2);
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--dashboard-text-secondary);
}

.empty-state a {
    color: var(--dashboard-primary);
    text-decoration: none;
    font-weight: 600;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Client Cards Grid */
.clients-preview {
    margin-top: 1.5rem;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.client-card {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.client-card:hover {
    box-shadow: var(--dashboard-shadow-lg);
    transform: translateY(-2px);
}

.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.client-card-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin: 0;
}

.client-card-body {
    margin-bottom: 1rem;
}

.client-info {
    font-size: 0.875rem;
    color: var(--dashboard-text-secondary);
    margin-bottom: 0.5rem;
}

.client-info strong {
    color: var(--dashboard-text);
}

.client-info a {
    color: var(--dashboard-primary);
    text-decoration: none;
}

.client-info a:hover {
    text-decoration: underline;
}

.client-card-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--dashboard-border);
}

.btn-link {
    color: var(--dashboard-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

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

.view-all-link {
    text-align: center;
}

.text-muted {
    color: var(--dashboard-text-secondary);
    font-style: italic;
}

/* Form Styles */
.form-container {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.client-form {
    max-width: 900px;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--dashboard-primary);
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

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

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dashboard-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea.code-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.form-group small {
    color: var(--dashboard-text-secondary);
    font-size: 0.8125rem;
}

.error-message {
    color: var(--dashboard-danger);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dashboard-border);
}

/* Detail Page Styles */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.detail-section {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.detail-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.detail-label {
    font-weight: 600;
    color: var(--dashboard-text-secondary);
    font-size: 0.875rem;
    min-width: 120px;
}

.detail-value {
    color: var(--dashboard-text);
    text-align: right;
    flex: 1;
}

.detail-value code {
    background: var(--dashboard-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.detail-value a {
    color: var(--dashboard-primary);
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.code-section {
    margin-top: 1.5rem;
}

.code-block {
    position: relative;
    background: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notes-content {
    color: var(--dashboard-text);
    line-height: 1.8;
    white-space: pre-wrap;
    margin: 0;
}

.btn-copy-code {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--dashboard-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-code:hover {
    background: var(--dashboard-primary-dark);
}

/* Delete Warning */
.delete-warning {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1.5rem;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.delete-warning h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1rem;
}

.delete-warning p {
    color: var(--dashboard-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.delete-form {
    margin-top: 2rem;
}

.btn-danger {
    background: var(--dashboard-danger);
    color: white;
    border-color: var(--dashboard-danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .dashboard-header-content {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .dashboard-user-menu {
        width: 100%;
        justify-content: space-between;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .dashboard-container {
        padding: 1.5rem;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .dashboard-header-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions-group {
        flex-direction: column;
    }
    
    .form-row-two {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .conversations-chart {
        height: 260px;
        padding: 2rem 0.75rem 1.25rem 0.75rem;
        gap: 0.75rem;
    }
    
    .chart-bar {
        max-width: 100%;
        min-height: 35px;
    }
    
    .chart-label {
        font-size: 0.8125rem;
        padding: 0.2rem 0.4rem;
    }
    
    .chart-value {
        font-size: 0.875rem;
    }
    
    .dashboard-nav {
        margin: 0;
        width: 100%;
        flex-wrap: wrap;
    }
}

/* ============================================
   Analytics Styles
   ============================================ */
.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.metric-card {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

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

.metric-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dashboard-text);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--dashboard-text-secondary);
    margin-top: 0.25rem;
}

.metric-subtext {
    font-size: 0.75rem;
    color: var(--dashboard-text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.analytics-section {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    padding: 2rem;
}

.analytics-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dashboard-border);
}

.intents-list,
.dropoff-list,
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.intent-item,
.dropoff-item,
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--dashboard-bg);
    border-radius: 8px;
    border: 1px solid var(--dashboard-border);
}

.intent-name,
.dropoff-step {
    font-weight: 600;
    color: var(--dashboard-text);
}

.intent-count,
.dropoff-count {
    color: var(--dashboard-text-secondary);
    font-size: 0.9375rem;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.session-id {
    font-weight: 600;
    color: var(--dashboard-text);
    font-size: 0.9375rem;
}

.session-date {
    color: var(--dashboard-text-secondary);
    font-size: 0.875rem;
}

.session-duration {
    font-weight: 600;
    color: var(--dashboard-primary);
    font-size: 1rem;
}

.chart-container {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 3rem;
    min-width: 35px;
    align-items: flex-end;
}

.y-axis-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

.chart-y-axis .y-axis-label:first-child {
    padding-top: 0.5rem;
}

.chart-y-axis .y-axis-label:last-child {
    padding-bottom: 0.5rem;
}

.chart-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 0;
}

.grid-line {
    height: 1px;
    background: #e2e8f0;
    width: 100%;
}

.conversations-chart-wrapper {
    flex: 1;
    position: relative;
    min-height: 280px;
}

.conversations-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0;
    height: 280px;
    justify-content: space-between;
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    padding-bottom: 3rem;
    z-index: 1;
}

.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.chart-bar-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.chart-bar {
    width: 70%;
    max-width: 56px;
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 6px 6px 0 0;
    min-height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    z-index: 2;
}

.chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
    border-radius: 6px 6px 0 0;
    pointer-events: none;
}

.chart-bar:hover {
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.35);
    z-index: 3;
}

.chart-bar-zero {
    background: #e2e8f0 !important;
    min-height: 2px !important;
    box-shadow: none !important;
    cursor: default;
}

.chart-bar-zero:hover {
    transform: none !important;
    box-shadow: none !important;
}

.chart-value {
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.chart-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.chart-day-name {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-date {
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 600;
    text-align: center;
}

.chart-bar-item:hover .chart-date {
    color: #1e293b;
}

.chart-bar-item:hover .chart-day-name {
    color: #6366f1;
}

.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.client-analytics-card {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.client-analytics-card:hover {
    box-shadow: var(--dashboard-shadow);
}

.client-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.client-analytics-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin: 0;
}

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

.client-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-metric-label {
    font-size: 0.875rem;
    color: var(--dashboard-text-secondary);
}

.client-metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
}

.client-metric-subtext {
    font-size: 0.75rem;
    color: var(--dashboard-text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
    opacity: 0.8;
    display: block;
}
    
    .clients-table {
        font-size: 0.875rem;
    }
    
    .clients-table th,
    .clients-table td {
        padding: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   Subscription Management Styles
   ============================================ */
.subscription-actions-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
}

.subscription-actions-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dashboard-border);
}

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

.subscription-action-card {
    padding: 1.5rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    background: var(--dashboard-bg);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.subscription-action-card:hover {
    border-color: var(--dashboard-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.subscription-action-card.danger-card {
    border-color: #fecaca;
    background: #fef2f2;
}

.subscription-action-card.danger-card:hover {
    border-color: var(--dashboard-danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.subscription-action-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin-bottom: 0.75rem;
}

.subscription-action-card p {
    font-size: 0.9375rem;
    color: var(--dashboard-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.subscription-action-card .btn {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 768px) {
    .subscription-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .subscription-actions-section {
        padding: 1.5rem;
    }
}

