/* =====================================================
   TRAFFORD CRM — FIXED & OPTIMIZED VERSION
===================================================== */

/* ================= BASE RESET ================= */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ================= HIDE TOPBAR ================= */
body .layout.profile-shell .profile-topbar {
    display: none !important;
}

/* ================= LAYOUT FIX - SUPER SPECIFIC ================= */
body .layout.profile-shell {
    display: flex !important;
    min-height: 100vh !important;
}

body .layout.profile-shell .profile-sidebar-wrap {
    width: clamp(220px, 18vw, 280px) !important;
    flex-shrink: 0 !important;
}

body .layout.profile-shell .main-content.profile-main.content {
    flex: 1 !important;
    padding: clamp(12px, 2vw, 20px) !important;
    overflow-y: auto !important;
    
    /* CRITICAL FIX: center content */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    
    /* Layout safety */
    min-width: 0 !important;
    max-width: 100% !important;
}

/* =====================================================
   HERO SECTION - SUPER SPECIFIC
===================================================== */
body .layout.profile-shell .main-content.profile-main.content .hero-card.crm-hero {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto 40px auto !important;
    
    padding: clamp(16px, 2.6vw, 28px) !important;
    border-radius: clamp(16px, 2vw, 22px) !important;

    background: rgba(15, 25, 40, 0.55) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;

    border: 1px solid rgba(0, 255, 200, 0.25) !important;
    box-shadow:
        0 0 60px rgba(0, 255, 200, 0.15),
        0 25px 80px rgba(0, 0, 0, 0.6) !important;
}

body .layout.profile-shell .main-content .crm-hero h1 {
    margin: 0 0 10px 0 !important;
    font-size: clamp(22px, 3.2vw, 34px) !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
}

body .layout.profile-shell .main-content .hero-description {
    display: grid !important;
    gap: 8px !important;
}

body .layout.profile-shell .main-content .hero-description div {
    font-size: 14px !important;
    opacity: 0.92 !important;
    line-height: 1.5 !important;
}

/* =====================================================
   GRID LAYOUT — SUPER SPECIFIC
===================================================== */
body .layout.profile-shell .main-content.profile-main.content .crm-grid {
    width: 100% !important;
    max-width: 1180px !important;
    margin: clamp(12px, 2vw, 18px) auto 0 auto !important;
    
    display: grid !important;
    gap: clamp(12px, 2vw, 18px) !important;
    
    /* Responsive columns - from inline styles */
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

/* Tablet: 2 columns */
@media (min-width: 700px) {
    body .layout.profile-shell .main-content .crm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1100px) {
    body .layout.profile-shell .main-content .crm-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* =====================================================
   CRM CARDS — MATCHES INLINE STYLES
===================================================== */
.crm-card {
    position: relative;
    min-height: 340px;
    
    padding: clamp(14px, 2vw, 18px);
    border-radius: 20px;

    background: rgba(12, 20, 32, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 40px rgba(0, 255, 170, 0.05),
        inset 0 0 60px rgba(255, 255, 255, 0.02);

    display: grid;
    gap: 12px;

    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

.crm-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 200, 0.28);
    box-shadow: 
        0 0 40px rgba(0, 255, 200, 0.15),
        0 15px 50px rgba(0, 0, 0, 0.35);
}

/* Featured card - from inline styles */
.crm-card.featured {
    border-color: rgba(0, 255, 170, 0.22);
    box-shadow: 
        0 0 0 2px rgba(0, 255, 170, 0.06),
        0 25px 70px rgba(0, 0, 0, 0.25);
}

/* =====================================================
   CARD CONTENT
===================================================== */
.crm-card h3 {
    margin: 0;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.3;
    font-weight: 600;
    color: #ffffff;
    word-wrap: break-word;
}

.crm-subtitle {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.85);
}

/* Features list - from inline styles */
.crm-features {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: none;
    
    display: grid;
    gap: 6px;
}

.crm-features li {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.9;
    position: relative;
    padding-left: 0;
    overflow-wrap: anywhere;
}

/* =====================================================
   BADGES — FROM INLINE STYLES
===================================================== */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    
    padding: 8px 10px;
    border-radius: 999px;
    
    font-size: 12px;
    font-weight: 600;
    
    background: rgba(11, 17, 24, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.10);
    
    opacity: 0.95;
    z-index: 10;
}

.premium-badge {
    background: rgba(255, 214, 0, 0.10);
    border-color: rgba(255, 214, 0, 0.35);
    color: #ffd600;
}

/* =====================================================
   META ROW (PRICE + TAGS) — FROM INLINE
===================================================== */
.crm-meta {
    margin-top: 4px;
    padding-top: 0;
    
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.crm-price {
    font-size: 14px;
    font-weight: 800;
    color: #00ffc8;
    text-shadow: none;
}

.crm-tag {
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    
    background: rgba(11, 17, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    opacity: 0.95;
    white-space: nowrap;
}

/* =====================================================
   BUTTONS — FROM INLINE STYLES
===================================================== */
.btn-primary,
.btn-full,
a.btn-primary,
a.btn-full {
    /* Layout */
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    width: 100%;
    height: 46px;
    
    padding: 12px 14px;
    border-radius: 14px;
    border: none;
    
    /* Typography */
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    
    /* Colors */
    background: linear-gradient(135deg, #00ffc8, #00bfff);
    color: #001018 !important;
    
    /* Effects */
    cursor: pointer;
    transition: all 0.25s ease;
    
    box-shadow: 0 4px 15px rgba(0, 255, 200, 0.3);
}

.btn-primary:hover,
.btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 200, 0.5);
}

.btn-primary:active,
.btn-full:active {
    transform: translateY(0);
}

/* =====================================================
   SEO HIDDEN BLOCK
===================================================== */
.seo-hidden-block {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =====================================================
   BOTTOM INFO SECTION
===================================================== */
.crm-bottom-info {
    width: 100%;
    max-width: 1180px;
    margin: 60px auto 40px auto;
    
    padding: clamp(24px, 3vw, 40px);
    border-radius: 24px;

    background: rgba(15, 25, 40, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(0, 255, 200, 0.15);
    box-shadow: 0 0 60px rgba(0, 255, 200, 0.08);
}

.crm-bottom-info h2 {
    font-size: clamp(18px, 2.5vw, 24px);
    margin: 0 0 12px 0;
    font-weight: 600;
}

.crm-bottom-info p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS — OPTIMIZED
===================================================== */

/* Medium screens */
@media (max-width: 1100px) {
    .crm-hero {
        margin-bottom: 24px;
    }
    
    .main-content.profile-main.content {
        padding: 16px 12px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .crm-card {
        min-height: 320px;
        padding: 18px;
    }
    
    .badge {
        top: 10px;
        right: 10px;
        font-size: 10px;
        padding: 6px 9px;
    }
    
    .crm-grid {
        gap: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-card.crm-hero {
        padding: 18px;
        border-radius: 16px;
        margin-bottom: 20px;
    }
    
    .crm-card {
        padding: 16px;
        min-height: 300px;
    }
    
    .main-content.profile-main.content {
        padding: 12px 8px;
    }
    
    .crm-grid {
        gap: 14px;
    }
}

/* =====================================================
   PRINT STYLES
===================================================== */
@media print {
    .crm-card {
        page-break-inside: avoid;
    }
}
