:root {
    --deliverai-bg: #f6f7f9;
    --deliverai-border: #e7e9ee;
    --deliverai-soft: #eef1f5;
}

body {
    background: var(--deliverai-bg);
    color: #151515;
}

.navbar-brand {
    letter-spacing: -0.03em;
}

.card {
    border-color: var(--deliverai-border);
    border-radius: 1rem;
}

.card-header:first-child {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.badge-soft {
    background: var(--deliverai-soft);
    color: #343a40;
    border: 1px solid #dfe3ea;
}

.required:after {
    content: " *";
    color: #dc3545;
}

.stat-card {
    min-height: 112px;
}

.stat-number {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.email-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .92rem;
    background: #fff;
    margin: 0;
}

.auth-wrapper {
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.brand-login {
    font-size: 2rem;
    letter-spacing: -0.05em;
}

.form-control,
.form-select,
.btn {
    border-radius: .75rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.email-html-frame {
    width: 100%;
    min-height: 620px;
    border: 0;
    background: #fff;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.nav-pills .nav-link {
    border-radius: .65rem;
}

.btn i,
.nav-link i,
.dropdown-item i {
    line-height: 1;
    vertical-align: -0.125em;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-icon.btn-outline-secondary,
.btn-icon.btn-outline-primary,
.btn-icon.btn-outline-success,
.btn-icon.btn-dark {
    flex: 0 0 auto;
}

@media (max-width: 576px) {
    .btn-icon {
        width: 38px;
        height: 38px;
    }
}

.filter-card .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #4b5563;
}

.table-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .15rem;
}

.table-sort-link:hover {
    color: #111827;
    text-decoration: none;
}

.email-subject-cell {
    min-width: 260px;
    max-width: 520px;
}
