:root {
    --bg: #eef3ef;
    --panel: rgba(255, 255, 255, 0.8);
    --panel-strong: #ffffff;
    --sidebar: #14261d;
    --sidebar-soft: rgba(255, 255, 255, 0.08);
    --ink: #17211c;
    --muted: #5f6e65;
    --line: rgba(23, 33, 28, 0.1);
    --accent: #1c9c5f;
    --accent-dark: #127848;
    --shadow: 0 24px 60px rgba(20, 38, 29, 0.12);
}

body {
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    font-size: 0.98rem;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(28, 156, 95, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(20, 38, 29, 0.12), transparent 32%),
        linear-gradient(160deg, #f3f7f4 0%, #e8efe9 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(31, 26, 23, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 26, 23, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 90%);
}

.sidebar-title,
.display-title {
    font-family: 'IBM Plex Serif', serif;
    letter-spacing: -0.025em;
}

.dashboard {
    max-width: 1560px;
}

.sidebar-column {
    align-self: stretch;
}

.sidebar-panel,
.hero-panel,
.app-card,
.flash-alert {
    backdrop-filter: blur(18px);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
}

.sidebar-panel,
.hero-panel,
.app-card,
.flash-alert,
.contact-card,
.empty-state {
    border-radius: 28px;
}

.sidebar-panel,
.hero-panel,
.app-card {
    animation: rise 600ms ease-out;
}

.eyebrow,
.section-kicker,
.metric-label {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
}

.sidebar-panel {
    background: linear-gradient(180deg, #1a3025 0%, var(--sidebar) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-title {
    color: #f5fbf6;
    font-size: 2.15rem;
    line-height: 1.02;
}

.sidebar-copy {
    color: rgba(245, 251, 246, 0.72);
    line-height: 1.7;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: var(--sidebar-soft);
    color: #f5fbf6;
    font-size: 0.78rem;
    font-weight: 600;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(245, 251, 246, 0.82);
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    font-weight: 600;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
    color: #fffdf8;
    background: linear-gradient(135deg, rgba(28, 156, 95, 0.95) 0%, rgba(18, 120, 72, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-stat {
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-stat .metric-label,
.sidebar-stat .metric-value {
    color: #f5fbf6;
}

.metric-value {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
}

.hero-panel {
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: '';
    position: absolute;
    inset: auto -10% -40% auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28, 156, 95, 0.18), transparent 70%);
    pointer-events: none;
}

.display-title {
    max-width: 13ch;
    font-size: clamp(2.35rem, 4.8vw, 4.5rem);
    line-height: 1.02;
}

.hero-copy {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--muted);
}

.summary-card {
    height: 100%;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(23, 33, 28, 0.08);
}

.summary-label,
.summary-note,
.template-note,
.empty-state span {
    color: var(--muted);
}

.summary-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.summary-value {
    display: block;
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 700;
}

.summary-note {
    display: block;
    margin-top: 0.45rem;
}

.shortcut-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
    border: 1px solid rgba(23, 33, 28, 0.08);
    background: rgba(255, 255, 255, 0.6);
}

.shortcut-card:hover {
    border-color: rgba(28, 156, 95, 0.22);
    background: rgba(255, 255, 255, 0.82);
}

.shortcut-icon {
    font-size: 2rem;
    color: var(--accent-dark);
}

.preview-card {
    min-width: 0;
    min-height: 0;
    padding: 1.2rem 1.25rem;
    border-radius: 22px;
    border: 1px solid rgba(23, 33, 28, 0.08);
    background: rgba(255, 255, 255, 0.72);
    overflow: auto;
}

.template-preview {
    margin: 0;
    max-width: 100%;
    font: inherit;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
}

.section-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(28, 156, 95, 0.1);
    color: var(--accent-dark);
    font-size: 1.2rem;
}

.import-panel {
    height: 100%;
    padding: 1.2rem 1.25rem;
    border-radius: 22px;
    border: 1px solid rgba(23, 33, 28, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

.form-control,
.form-control-lg {
    border-radius: 18px;
    border-color: var(--line);
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.98rem;
}

.form-control:focus {
    border-color: rgba(15, 157, 88, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(15, 157, 88, 0.15);
}

.app-textarea {
    min-height: 260px;
    resize: vertical;
}

.template-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(15, 157, 88, 0.22);
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #12af62 0%, #0b7842 100%);
    border-color: transparent;
}

.contact-card,
.empty-state {
    border: 1px solid var(--line);
    background: var(--panel-strong);
    padding: 1.1rem 1.2rem;
}

.contact-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(28, 156, 95, 0.14) 0%, rgba(18, 120, 72, 0.08) 100%);
    color: var(--accent-dark);
    font-weight: 700;
}

.h4,
.h5,
.form-label,
.btn,
.text-secondary,
p,
span,
small {
    letter-spacing: 0;
}

.form-label,
.btn {
    font-weight: 600;
}

.empty-state {
    min-height: 140px;
}

.contact-actions form {
    margin: 0;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .display-title {
        max-width: none;
        font-size: clamp(2.2rem, 13vw, 3.8rem);
    }

    .sidebar-panel,
    .hero-panel,
    .app-card,
    .flash-alert,
    .contact-card,
    .empty-state {
        border-radius: 22px;
    }

    .contact-meta {
        align-items: flex-start;
    }
}

@media (min-width: 768px) {
    .sidebar-panel {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

@media (max-width: 767.98px) {
    .sidebar-panel {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}
