/* CoHarmony Professional Theme - Matching MAUI App Style */
/* Neutral, professional color palette */

:root {
    /* Primary Colors - Professional Blue */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --primary-hover: #1E40AF;
    
    /* Secondary Colors - Subtle Purple Accent */
    --secondary: #6366F1;
    --secondary-dark: #4F46E5;
    --secondary-light: #818CF8;
    
    /* Neutral Colors */
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    
    /* Background Colors */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-dark: #0F172A;
    
    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    
    /* Status Colors */
    --success: #059669;
    --success-light: #10B981;
    --success-bg: #ECFDF5;
    --warning: #D97706;
    --warning-light: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #DC2626;
    --danger-light: #EF4444;
    --danger-bg: #FEF2F2;
    --info: #0284C7;
    --info-light: #0EA5E9;
    --info-bg: #F0F9FF;
    
    /* Border & Shadow */
    --border-color: #E2E8F0;
    --border-color-dark: #CBD5E1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --sidebar-bg: #0F172A;
    --sidebar-text: #E2E8F0;
    --sidebar-text-muted: #94A3B8;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(37, 99, 235, 0.2);
    --sidebar-accent: #3B82F6;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn-professional {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--slate-100);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--slate-200);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #047857;
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Cards */
.card-professional {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-professional:hover {
    box-shadow: var(--shadow-md);
}

.card-professional .card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-professional .card-body {
    padding: 24px;
}

.card-professional .card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--slate-50);
}

/* Forms */
.form-control-professional {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-professional:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control-professional::placeholder {
    color: var(--text-light);
}

.form-label-professional {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Sidebar Professional */
.sidebar-professional {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar-professional .sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-professional .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.sidebar-professional .sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-professional .sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-professional .sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-professional .nav-section {
    margin-bottom: 8px;
}

.sidebar-professional .nav-section-title {
    padding: 12px 24px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sidebar-text-muted);
}

.sidebar-professional .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-professional .nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-professional .nav-item.active {
    background: var(--sidebar-active);
    color: white;
    border-left-color: var(--sidebar-accent);
}

.sidebar-professional .nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-professional .nav-item-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

.sidebar-professional .nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-professional .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-professional .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-professional .user-profile:hover {
    background: var(--sidebar-hover);
}

.sidebar-professional .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.sidebar-professional .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-professional .user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-professional .user-email {
    font-size: 0.75rem;
    color: var(--sidebar-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content-professional {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-header-professional {
    background: var(--bg-secondary);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title-professional {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.content-body-professional {
    padding: 32px;
}

/* Stat Cards Professional */
.stat-card-professional {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.2s ease;
}

.stat-card-professional:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-professional .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.stat-card-professional .stat-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-card-professional .stat-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card-professional .stat-icon.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card-professional .stat-icon.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card-professional .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-card-professional .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Alerts Professional */
.alert-professional {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-professional.success {
    background: var(--success-bg);
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.alert-professional.warning {
    background: var(--warning-bg);
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-professional.danger {
    background: var(--danger-bg);
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-professional.info {
    background: var(--info-bg);
    border: 1px solid #BAE6FD;
    color: #075985;
}

/* Tables Professional */
.table-professional {
    width: 100%;
    border-collapse: collapse;
}

.table-professional th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--slate-50);
    border-bottom: 1px solid var(--border-color);
}

.table-professional td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.table-professional tbody tr:hover {
    background: var(--slate-50);
}

/* Badge Professional */
.badge-professional {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-professional.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-professional.success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-professional.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-professional.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Mobile Toggle */
.mobile-toggle-professional {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
}

.mobile-toggle-professional:hover {
    transform: scale(1.05);
}

/* Sidebar Overlay */
.sidebar-overlay-professional {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay-professional.active {
    display: block;
}

/* Subscription Banner Professional */
.subscription-banner-professional {
    background: var(--warning-bg);
    border-bottom: 1px solid #FDE68A;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.subscription-banner-professional .banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subscription-banner-professional .banner-icon {
    font-size: 1.25rem;
    color: var(--warning);
}

.subscription-banner-professional .banner-text h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400E;
}

.subscription-banner-professional .banner-text p {
    margin: 0;
    font-size: 0.8125rem;
    color: #A16207;
}

.subscription-banner-professional .subscribe-btn {
    background: var(--warning);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.subscription-banner-professional .subscribe-btn:hover {
    background: #B45309;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar-professional {
        transform: translateX(-100%);
    }

    .sidebar-professional.active {
        transform: translateX(0);
    }

    .main-content-professional {
        margin-left: 0;
    }

    .mobile-toggle-professional {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .content-header-professional,
    .content-body-professional {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Dropdown Menu Professional */
.dropdown-menu-professional {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
}

.dropdown-menu-professional .dropdown-item {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: background 0.2s;
}

.dropdown-menu-professional .dropdown-item:hover {
    background: var(--slate-100);
}

.dropdown-menu-professional .dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-menu-professional .dropdown-divider {
    margin: 8px 0;
    border-color: var(--border-color);
}

/* Empty State */
.empty-state-professional {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-professional .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--slate-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.empty-state-professional h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-professional p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0 auto;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip */
.tooltip-professional {
    position: relative;
}

.tooltip-professional::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--slate-800);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tooltip-professional:hover::after {
    opacity: 1;
}

/* Divider */
.divider-professional {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider-professional::before,
.divider-professional::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider-professional span {
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Icon Box */
.icon-box-professional {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-box-professional.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.icon-box-professional.success {
    background: var(--success-bg);
    color: var(--success);
}

.icon-box-professional.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.icon-box-professional.secondary {
    background: var(--slate-100);
    color: var(--text-secondary);
}
