/*
Theme Name: CRM Pro Theme
Theme URI: http://localhost/crm/
Author: Shubham
Description: Professional CRM theme with custom header, footer, guest layout and branded login page.
Version: 1.0.0
Text Domain: crm-pro-theme
*/

:root{
    --crm-bg:#eef4ff;
    --crm-surface:#ffffff;
    --crm-border:#dbe4f0;
    --crm-text:#0f172a;
    --crm-muted:#64748b;
    --crm-blue:#2563eb;
    --crm-violet:#7c3aed;
    --crm-cyan:#06b6d4;
    --crm-pink:#ec4899;
    --crm-green:#16a34a;
    --crm-orange:#ea580c;
    --crm-dark:#0f172a;
    --crm-dark-2:#1e293b;
    --crm-shadow:0 18px 45px rgba(15,23,42,.08);
    --crm-radius:22px;
    --crm-radius-sm:14px;
}

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    padding:0;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.10) 0%, rgba(37,99,235,0) 28%),
        radial-gradient(circle at top right, rgba(124,58,237,.10) 0%, rgba(124,58,237,0) 30%),
        linear-gradient(180deg,#f8fbff 0%, #eef4ff 100%);
    color:var(--crm-text);
    font-family:Inter, Arial, Helvetica, sans-serif;
    font-size:15px;
    line-height:1.6;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

a{
    color:var(--crm-blue);
    text-decoration:none;
}

a:hover{
    text-decoration:none;
}

.site-wrap{
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

.crm-container{
    width:100%;
    max-width:1380px;
    margin:0 auto;
    padding:0 18px;
}

/* HEADER */
.crm-site-header{
    position:sticky;
    top:0;
    z-index:100;
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(219,228,240,.95);
    box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.crm-site-header-inner{
    min-height:82px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}

.crm-brand{
    display:flex;
    align-items:center;
    gap:14px;
}

.crm-brand-logo{
    width:50px;
    height:50px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--crm-blue) 0%, var(--crm-violet) 55%, var(--crm-cyan) 100%);
    color:#fff;
    font-size:22px;
    font-weight:800;
    box-shadow:0 14px 26px rgba(37,99,235,.22);
}

.crm-brand-text{
    line-height:1.2;
}

.crm-brand-text strong{
    display:block;
    color:var(--crm-text);
    font-size:24px;
    font-weight:900;
}

.crm-brand-text span{
    display:block;
    color:var(--crm-muted);
    font-size:12px;
    margin-top:3px;
}

.crm-header-right{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
}

.crm-nav{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.crm-nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:11px 18px;
    border-radius:999px;
    border:1px solid #d8e2ee;
    background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
    color:#334155;
    font-size:13px;
    font-weight:800;
    transition:.2s ease;
}

.crm-nav a:hover,
.crm-nav a.current-menu-item,
.crm-nav a.crm-nav-active{
    background:linear-gradient(135deg,var(--crm-blue) 0%, var(--crm-violet) 75%, var(--crm-pink) 100%);
    color:#fff;
    border-color:transparent;
    box-shadow:0 12px 22px rgba(37,99,235,.16);
}

.crm-user-chip{
    display:flex;
    align-items:center;
    gap:10px;
    background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
    border:1px solid #e2e8f0;
    border-radius:999px;
    padding:8px 12px;
    min-width:220px;
    box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.crm-user-chip-avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    overflow:hidden;
    background:#ffffff;
    flex:0 0 40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #eef2ff;
}

.crm-user-chip-avatar img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:4px;
    background:#fff;
}

.crm-user-chip-text{
    min-width:0;
    line-height:1.2;
}

.crm-user-chip-text strong{
    display:block;
    font-size:13px;
    font-weight:800;
    color:var(--crm-text);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.crm-user-chip-text span{
    display:block;
    font-size:11px;
    color:var(--crm-muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.crm-auth-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.crm-btn,
.crm-btn-outline{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 16px;
    border-radius:14px;
    font-size:13px;
    font-weight:800;
    transition:.2s ease;
    border:none;
    cursor:pointer;
}

.crm-btn{
    background:linear-gradient(135deg,var(--crm-blue) 0%, var(--crm-violet) 70%, var(--crm-pink) 100%);
    color:#fff;
    box-shadow:0 14px 24px rgba(37,99,235,.16);
}

.crm-btn-outline{
    background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
    color:var(--crm-text);
    border:1px solid #d1d5db;
}

.crm-btn:hover,
.crm-btn-outline:hover{
    transform:translateY(-1px);
}

/* MAIN */
.crm-main{
    flex:1 1 auto;
    padding:24px 0 34px;
}

.crm-page-shell{
    background:rgba(255,255,255,.68);
    border:1px solid #e3ebf5;
    border-radius:28px;
    box-shadow:var(--crm-shadow);
    overflow:hidden;
}

.crm-page-shell-home{
    background:transparent;
    border:none;
    box-shadow:none;
}

.crm-page-body{
    padding:24px;
}

.crm-page-body-home{
    padding:0;
}

.crm-page-header{
    padding:22px 24px;
    background:linear-gradient(135deg,#eff6ff 0%,#eef2ff 45%,#faf5ff 100%);
    border-bottom:1px solid #dde7f5;
}

.crm-page-header h1{
    margin:0 0 6px;
    font-size:34px;
    line-height:1.15;
    font-weight:800;
    color:var(--crm-text);
}

.crm-page-header p{
    margin:0;
    color:var(--crm-muted);
    font-size:15px;
}

/* GUEST HOME */
.crm-guest-hero{
    display:grid;
    grid-template-columns:1.3fr .9fr;
    gap:20px;
    align-items:stretch;
}

.crm-guest-card,
.crm-side-card{
    background:#fff;
    border:1px solid var(--crm-border);
    border-radius:24px;
    padding:26px;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.crm-guest-card{
    background:linear-gradient(135deg,#eff6ff 0%,#eef2ff 45%,#faf5ff 100%);
    border-color:#dbeafe;
    position:relative;
    overflow:hidden;
}

.crm-guest-card::after{
    content:"";
    position:absolute;
    right:-80px;
    top:-80px;
    width:220px;
    height:220px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(124,58,237,.15) 0%, rgba(124,58,237,0) 70%);
}

.crm-pill{
    display:inline-flex;
    padding:7px 12px;
    border-radius:999px;
    background:#fff;
    border:1px solid #e0e7ff;
    color:#4338ca;
    font-size:12px;
    font-weight:800;
    margin-bottom:14px;
}

.crm-guest-card h2{
    margin:0 0 10px;
    font-size:38px;
    line-height:1.12;
    font-weight:800;
}

.crm-guest-card p{
    margin:0 0 18px;
    color:#475569;
    font-size:15px;
    max-width:720px;
}

.crm-feature-list{
    display:grid;
    gap:12px;
    margin:18px 0 22px;
}

.crm-feature-item{
    display:flex;
    gap:12px;
    align-items:flex-start;
    padding:12px 14px;
    background:rgba(255,255,255,.78);
    border:1px solid rgba(255,255,255,.95);
    border-radius:16px;
}

.crm-feature-icon{
    width:36px;
    height:36px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--crm-blue) 0%, var(--crm-violet) 100%);
    color:#fff;
    font-size:16px;
    font-weight:800;
    flex:0 0 36px;
}

.crm-feature-item strong{
    display:block;
    font-size:14px;
    margin-bottom:2px;
}

.crm-feature-item span{
    display:block;
    font-size:13px;
    color:var(--crm-muted);
}

.crm-cta-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.crm-side-card h3{
    margin:0 0 12px;
    font-size:22px;
    font-weight:800;
}

.crm-side-card p{
    margin:0 0 14px;
    color:var(--crm-muted);
    font-size:14px;
}

.crm-mini-list{
    display:grid;
    gap:10px;
}

.crm-mini-item{
    padding:12px 14px;
    border-radius:14px;
    background:#f8fafc;
    border:1px solid #eef2f7;
}

.crm-mini-item strong{
    display:block;
    font-size:14px;
    margin-bottom:4px;
}

.crm-mini-item span{
    display:block;
    font-size:13px;
    color:var(--crm-muted);
}

/* DEFAULT CONTENT */
.crm-default-content{
    background:#fff;
    border:1px solid var(--crm-border);
    border-radius:22px;
    padding:22px;
}

.crm-default-content-home{
    background:transparent;
    border:none;
    padding:0;
}

.crm-default-content > *:first-child{
    margin-top:0;
}

.crm-default-content > *:last-child{
    margin-bottom:0;
}

/* HOMEPAGE PLUGIN IMAGE SUPPORT */
.crm-profile-image{
    width:74px;
    height:74px;
    border-radius:50%;
    overflow:hidden;
    background:#ffffff;
    border:3px solid #eef2ff;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 8px 18px rgba(0,0,0,.08);
    flex:0 0 74px;
}

.crm-profile-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:6px;
    background:#fff;
}

/* FOOTER */
.crm-site-footer{
    margin-top:30px;
    background:
        radial-gradient(circle at left top, rgba(37,99,235,.18) 0%, rgba(37,99,235,0) 30%),
        radial-gradient(circle at right top, rgba(124,58,237,.18) 0%, rgba(124,58,237,0) 32%),
        linear-gradient(135deg,var(--crm-dark) 0%, var(--crm-dark-2) 100%);
    color:#fff;
}

.crm-site-footer-inner{
    padding:34px 0 20px;
}

.crm-footer-grid{
    display:grid;
    grid-template-columns:1.2fr .8fr .8fr .9fr;
    gap:20px;
    margin-bottom:18px;
}

.crm-footer-col h4{
    margin:0 0 12px;
    font-size:16px;
    font-weight:900;
}

.crm-footer-col p{
    margin:0;
    color:rgba(255,255,255,.72);
    font-size:13px;
    line-height:1.8;
}

.crm-footer-links{
    display:grid;
    gap:8px;
}

.crm-footer-links a{
    color:rgba(255,255,255,.84);
    font-size:13px;
    font-weight:600;
}

.crm-footer-links a:hover{
    color:#fff;
}

.crm-footer-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    padding-top:16px;
    border-top:1px solid rgba(255,255,255,.10);
}

.crm-footer-bottom p{
    margin:0;
    font-size:12px;
    color:rgba(255,255,255,.68);
}

.crm-footer-badges{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.crm-footer-badge{
    display:inline-flex;
    padding:7px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    color:#fff;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.10);
}

/* HIDE DEFAULT WP TITLES */
.entry-title,
.page-title,
.wp-block-post-title,
.entry-header,
.page-header,
.site-page-header{
    display:none!important;
}

/* RESPONSIVE */
@media (max-width: 1100px){
    .crm-guest-hero,
    .crm-footer-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 860px){
    .crm-site-header-inner{
        padding:14px 0;
    }

    .crm-header-right{
        width:100%;
        justify-content:flex-start;
    }

    .crm-nav{
        width:100%;
        justify-content:flex-start;
    }

    .crm-user-chip{
        width:100%;
    }
}

@media (max-width: 767px){
    .crm-container{
        padding:0 12px;
    }

    .crm-main{
        padding:16px 0 24px;
    }

    .crm-page-header,
    .crm-page-body,
    .crm-guest-card,
    .crm-side-card,
    .crm-default-content{
        padding:16px;
    }

    .crm-page-header h1,
    .crm-guest-card h2{
        font-size:28px;
    }

    .crm-nav a,
    .crm-btn,
    .crm-btn-outline{
        width:100%;
    }

    .crm-footer-bottom{
        flex-direction:column;
        align-items:flex-start;
    }
}