:root {
    --crm-primary: #2e7cf6;
    --crm-secondary: #5f6a86;
    --crm-muted: #8a94a7;
    --crm-surface: #ffffff;
    --crm-bg: #f7f8fa;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--crm-bg);
    color: #111827;
    font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.65;
}

.card-body img {
    max-width:100% !important;
    height:auto;
}

.base-shell {
    min-height: 100vh;
}

button:focus,
button:active,
.btn:focus,
.btn:active,
input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none !important;
    box-shadow: none !important;
}

.crm-shell {
    backdrop-filter: blur(2px);
}

header.navbar,
.navbar {
    background: var(--crm-surface);
}

.navbar-brand {
    letter-spacing: 0.1em;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 600;
    color: #343b4a;
}

.nav-link:hover,
.nav-link.active {
    color: var(--crm-primary);
}

.crm-utility-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
}

.crm-nav {
    border: 1px solid #e7ebf2;
}

.crm-nav .navbar-nav {
    gap: 0.2rem;
}

.crm-nav .nav-link {
    padding: 0.35rem 0.75rem;
    border-radius: 0.65rem;
    transition: all 0.15s ease;
}

.crm-nav .nav-link:hover,
.crm-nav .nav-link:focus {
    background: #f1f5fb;
    color: var(--crm-primary);
}

.crm-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2e7cf6 0%, #5b9dff 50%, #111827 100%);
    position: relative;
    box-shadow: 0 10px 25px rgba(46, 124, 246, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.crm-brand-mark::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.crm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e2ecff 0%, #f7f9ff 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--crm-primary);
}

.crm-nav-search .input-group,
.crm-nav-search .btn,
.crm-auth-actions .btn {
    height: 46px;
}

.crm-search-group {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    background: #f7f9fc;
}

.crm-nav-search .input-group-text {
    border: 0;
    background: transparent;
    color: var(--crm-muted);
}

.crm-nav-search .form-control {
    border: 0;
    background: transparent;
    padding-inline: 14px;
}

.crm-nav-search .btn,
.crm-auth-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 16px;
    white-space: nowrap;
}

.crm-nav-search .btn {
    border: 0;
    border-left: 1px solid #e5e7eb;
    background: var(--crm-primary);
    color: #fff;
    border-radius: 0;
}

.crm-auth-actions .btn {
    border-radius: 999px;
}

.crm-auth-actions .btn-link {
    height: auto;
}

main {
    min-height: 70vh;
}

.crm-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.crm-section-title .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--crm-primary);
    box-shadow: 0 0 0 8px rgba(46, 124, 246, 0.12);
}

.crm-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crm-chip {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: #f4f6fb;
    color: #374151;
    font-weight: 600;
    border: 1px solid #e3e8f0;
}

.crm-card,
.crm-article,
.crm-sidebar-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: var(--crm-surface);
    box-shadow: 0 14px 36px rgba(43, 69, 112, 0.06);
}

.crm-card + .crm-card,
.crm-card + .ad-slot,
.ad-slot + .crm-card {
    margin-top: 0.5rem;
}

.crm-hero {
    background: linear-gradient(135deg, rgba(46, 124, 246, 0.9) 0%, rgba(61, 140, 255, 0.96) 45%, rgba(17, 24, 39, 0.94) 100%);
    color: #fff;
    border-radius: 1.2rem;
    padding: clamp(1.5rem, 2vw, 2.6rem);
    position: relative;
    overflow: hidden;
}

.crm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18) 0, transparent 38%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15) 0, transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%);
    pointer-events: none;
}

.crm-hero .hero-slider-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.crm-hero .hero-slide {
    padding: 1rem;
    border-radius: 1rem;
    backdrop-filter: blur(2px);
}

.crm-hero h1 {
    font-weight: 800;
    margin-bottom: 0.35rem;
    line-height: 1.22;
}

.crm-hero p {
    color: #eaf2ff;
    margin-bottom: 0;
}

.crm-card-with-thumb {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: var(--crm-surface);
    height: 100%;
    box-shadow: 0 12px 32px rgba(43, 69, 112, 0.08);
}

.crm-card-with-thumb .thumb {
    position: relative;
    width: 100%;
    padding-top: 55%;
    border-radius: 0.85rem;
    background: #eef2f7;
    background-image: var(--thumb);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.crm-card-with-thumb .content .title {
    display: block;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    text-decoration: none;
    line-height: 1.35;
}

.crm-card-with-thumb .content .title:hover {
    color: var(--crm-primary);
}

.crm-card-with-thumb .content .excerpt {
    margin: 0.35rem 0 0;
    color: #475467;
    font-size: 0.95rem;
    line-height: 1.55;
}

.crm-card-with-thumb .meta {
    color: var(--crm-muted);
}

.crm-card-with-thumb.no-thumb {
    grid-template-columns: 1fr;
    background: linear-gradient(135deg, #f9fbff 0%, #f3f6fb 100%);
}

.crm-card-with-thumb.no-thumb .content {
    padding: 0.25rem;
}

.crm-article .title {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}

.crm-article .title:hover {
    color: var(--crm-primary);
}

.crm-article .meta {
    color: var(--crm-muted);
    font-size: 0.9rem;
}

.badge-soft-primary {
    color: var(--crm-primary);
    background: rgba(46, 124, 246, 0.12);
    border: 1px solid rgba(46, 124, 246, 0.2);
}

.badge-soft-success {
    color: #1f9d5f;
    background: rgba(28, 206, 123, 0.12);
    border: 1px solid rgba(28, 206, 123, 0.18);
}

.badge-soft-danger {
    color: #d1434b;
    background: rgba(209, 67, 75, 0.12);
    border: 1px solid rgba(209, 67, 75, 0.2);
}

.crm-list .list-group-item {
    border: none;
    padding: 1.1rem 0;
}

.crm-list .list-group-item .title {
    font-weight: 700;
    color: #0f172a;
}

.crm-list .list-group-item .title:hover {
    color: var(--crm-primary);
}

.crm-list .list-group-item + .list-group-item {
    border-top: 1px solid #edf0f5;
}

.crm-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #f0f4fa;
    color: #41526b;
    font-weight: 600;
    font-size: 0.85rem;
}

.crm-sidebar-card .card-header {
    background: transparent;
    border-bottom: 1px solid #edf0f5;
    font-weight: 700;
    padding: 1rem 1.1rem;
}

.crm-sidebar-card .list-group-item {
    border: none;
    padding: 0.95rem 1.1rem;
    color: #1f2937;
}

.crm-sidebar-card .list-group-item + .list-group-item {
    border-top: 1px dashed #e1e7f0;
}

.crm-footer {
    color: #374151;
}

.crm-footer .link-secondary {
    text-decoration: none;
}

.card-header,
.list-group-item,
.crm-card,
.crm-sidebar-card,
.crm-card-with-thumb {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.list-group-flush > .list-group-item {
    padding-left: 0;
    padding-right: 0;
}

.ad-slot {
    border: 1px dashed #d0d7e2;
    border-radius: 0.95rem;
    background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 10px, #f0f4fa 10px, #f0f4fa 20px);
    padding: 1.1rem;
}

.ad-slot-wide {
    min-height: 120px;
}

.ad-slot-vertical {
    min-height: 320px;
}

@media (max-width: 991.98px) {
    .navbar .input-group {
        width: 100%;
    }

    .navbar .d-flex.align-items-center.gap-2.ms-lg-3 {
        width: 100%;
        justify-content: flex-start;
    }

    .crm-card-with-thumb {
        padding: 1rem;
    }

    .crm-hero .hero-slide {
        padding: 0.75rem;
    }
}

@media (min-width: 768px) {
    .crm-card-with-thumb {
        grid-template-columns: 38% 1fr;
        align-items: stretch;
    }

    .crm-card-with-thumb .thumb {
        padding-top: 0;
        min-height: 150px;
    }
}
