:root {
    --bg: #f4f7fb;
    --sidebar: #1f2d3d;
    --sidebar-soft: #2a3a4d;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dbe3ee;
    --text: #213243;
    --muted: #6e7d90;
    --accent: #1f78d1;
    --accent-dark: #1561ab;
    --success: #1d8f68;
    --error: #cc4b4b;
    --warning: #df8b1d;
    --shadow: 0 10px 24px rgba(15, 34, 58, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.login-body {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(46, 162, 255, 0.18), transparent 28%),
        radial-gradient(circle at 86% 78%, rgba(29, 143, 104, 0.16), transparent 30%),
        linear-gradient(135deg, #edf4fb 0%, #dfeaf7 48%, #f8fbff 100%);
}

.login-shell {
    width: min(980px, calc(100vw - 80px));
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    min-height: 560px;
    max-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    overflow: hidden;
    border: 1px solid rgba(219, 227, 238, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 28px 70px rgba(15, 34, 58, 0.16);
    backdrop-filter: blur(18px);
    transform: translate(-50%, -50%);
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 42px;
    color: #f4f9ff;
    background:
        linear-gradient(145deg, rgba(31, 45, 61, 0.98) 0%, rgba(22, 34, 49, 0.98) 58%, rgba(31, 120, 209, 0.88) 100%),
        radial-gradient(circle at 70% 20%, rgba(122, 184, 243, 0.45), transparent 26%);
}

.login-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 42px solid rgba(255, 255, 255, 0.08);
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand strong {
    display: block;
    font-size: 20px;
}

.login-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.login-hero p {
    position: relative;
    z-index: 1;
    max-width: 430px;
    margin: 0;
    color: rgba(244, 249, 255, 0.78);
    font-size: 15px;
}

.login-feature-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-feature-list span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(244, 249, 255, 0.86);
    font-weight: 700;
    font-size: 12px;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    background: rgba(255, 255, 255, 0.94);
}

.login-card h2 {
    margin: 0 0 10px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.login-locale {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 30px;
}

.login-locale a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    background: #fff;
}

.login-locale a.is-active {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.login-submit {
    min-height: 46px;
    margin-top: 4px;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 232px;
    background: linear-gradient(180deg, var(--sidebar) 0%, #162231 100%);
    color: #e9f1f8;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 10px 0 24px rgba(16, 29, 44, 0.14);
    z-index: 30;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2ea2ff 0%, #1f78d1 100%);
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 10px 22px rgba(31, 120, 209, 0.26);
}

.sidebar-brand h1 {
    margin: 0;
    font-size: 17px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7ab8f3;
}

.sidebar-user {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user p {
    margin: 4px 0 0;
    color: #aab8c7;
}

.avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #c8d6e5;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateX(2px);
}

.nav-item.is-active {
    background: linear-gradient(90deg, rgba(46, 162, 255, 0.2) 0%, rgba(46, 162, 255, 0.08) 100%);
    color: #fff;
    border: 1px solid rgba(122, 184, 243, 0.2);
}

.nav-icon,
.button-icon,
.chip-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.sidebar-footer {
    margin-top: auto;
}

.nav-logout {
    color: #ffcfcb;
}

.main-shell {
    margin-left: 232px;
    width: calc(100% - 232px);
    min-height: 100vh;
}

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 232px;
    height: 72px;
    padding: 12px 20px;
    background: rgba(248, 251, 255, 0.92);
    border-bottom: 1px solid rgba(219, 227, 238, 0.9);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    z-index: 20;
}

.topbar-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.topbar-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef5fd;
    border: 1px solid #dbe9f7;
    color: #4573a0;
    font-weight: 700;
    font-size: 12px;
}

.topbar-chip:hover {
    background: #e6f0fb;
}

.chip-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.page-content {
    padding: 88px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 227, 238, 0.9);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.compact {
    padding: 12px;
}

.hero,
.section-head,
.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.muted {
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-1px);
    border-color: #adc7e5;
    box-shadow: 0 10px 22px rgba(31, 120, 209, 0.08);
}

.button.primary {
    background: linear-gradient(180deg, #2b8cf0 0%, var(--accent) 100%);
    border-color: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: linear-gradient(180deg, #247fda 0%, var(--accent-dark) 100%);
}

.button.small {
    padding: 7px 10px;
    font-size: 12px;
}

.button.danger {
    background: #fff5f5;
    color: var(--error);
    border-color: #f3cccc;
}

.button-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 12px;
    font-weight: 800;
}

.actions,
.actions-cell,
.form-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stats-grid,
.grid.two,
.guide-grid {
    display: grid;
    gap: 14px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-grid {
    align-items: start;
}

.reports-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.call-layout,
.customer-detail-grid {
    align-items: start;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.stat-card span {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
    line-height: 1.2;
    word-break: break-word;
}

.stack {
    display: grid;
    gap: 10px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(219, 227, 238, 0.9);
}

.list-row.no-border {
    border-bottom: 0;
    padding-bottom: 0;
}

.list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf5fd;
    color: #376f9f;
    font-size: 11px;
    font-weight: 800;
}

.tag-success {
    background: rgba(29, 143, 104, 0.12);
    color: var(--success);
}

.tag-warning {
    background: rgba(223, 139, 29, 0.14);
    color: #a76005;
}

.tag-danger {
    background: rgba(204, 75, 75, 0.12);
    color: var(--error);
}

.tag-info {
    background: rgba(31, 120, 209, 0.12);
    color: var(--accent-dark);
}

.tag-muted {
    background: rgba(110, 125, 144, 0.12);
    color: var(--muted);
}

.filters,
.form-grid {
    display: grid;
    gap: 12px;
}

.filters {
    grid-template-columns: 2fr 1fr auto;
    align-items: end;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.full {
    grid-column: 1 / -1;
}

label span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #49627c;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    min-height: 40px;
}

textarea {
    min-height: 96px;
}

textarea {
    resize: vertical;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid;
    font-size: 13px;
}

.alert p {
    margin: 0 0 8px;
}

.alert p:last-child {
    margin-bottom: 0;
}

.alert.success {
    color: var(--success);
    border-color: rgba(29, 143, 104, 0.22);
    background: rgba(29, 143, 104, 0.08);
}

.alert.error {
    color: var(--error);
    border-color: rgba(204, 75, 75, 0.24);
    background: rgba(204, 75, 75, 0.08);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(219, 227, 238, 0.9);
    vertical-align: top;
    font-size: 13px;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b8096;
}

.call-card {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #dde7f1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.call-summary-cell {
    max-width: 320px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.call-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.quick-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.quick-panel h3 {
    margin: 0 0 6px;
}

.quick-panel p {
    margin: 0;
}

.quick-panel-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: #edf5fd;
    border: 1px solid #d7e7f7;
}

.call-card-due {
    border-color: rgba(223, 139, 29, 0.45);
    box-shadow: 0 12px 26px rgba(223, 139, 29, 0.12);
}

.detail-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-list div {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fbff;
    border: 1px solid rgba(219, 227, 238, 0.9);
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-box {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(219, 227, 238, 0.9);
    background: #f8fbff;
}

.permission-box input {
    width: auto;
    margin: 0;
}

.permission-section h3 {
    margin-top: 0;
}

.permission-cloud {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.checkbox-list {
    display: grid;
    gap: 8px;
}

.label-text {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.input-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.company-subcategory-option[hidden] {
    display: none !important;
}

.dynamic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inline-assign-form {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}

.inline-assign-form .full {
    grid-column: 1 / -1;
}

.pagination-bar {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(219, 227, 238, 0.9);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-meta {
    color: var(--muted);
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-per-page {
    display: flex;
    gap: 8px;
    align-items: end;
}

.pagination-per-page label span {
    margin-bottom: 6px;
}

.pagination-per-page select {
    width: auto;
    min-width: 84px;
}

.pagination-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.notes-box {
    padding-top: 12px;
    border-top: 1px solid rgba(219, 227, 238, 0.9);
}

.notes-box p {
    margin-bottom: 0;
}

.notification-card {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid rgba(219, 227, 238, 0.95);
}

.notification-body {
    margin: 10px 0;
    white-space: normal;
}

.compact-form {
    gap: 10px;
}

.nested-stack {
    padding-top: 10px;
}

.task-card {
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.task-card-summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.task-card-summary::-webkit-details-marker {
    display: none;
}

.task-card-body {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(219, 227, 238, 0.95);
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.management-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,248,253,0.96) 100%);
    border: 1px solid rgba(219, 227, 238, 0.98);
    box-shadow: var(--shadow);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.management-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 34, 58, 0.1);
    border-color: rgba(31, 120, 209, 0.22);
}

.management-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.management-card strong {
    font-size: 16px;
}

.management-card p {
    margin: 0;
    color: var(--muted);
}

.queue-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #2b8cf0 0%, var(--accent) 100%);
    color: #fff;
    padding: 12px 14px;
    box-shadow: 0 14px 28px rgba(31, 120, 209, 0.24);
    display: inline-flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.queue-fab strong {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 34, 58, 0.42);
    backdrop-filter: blur(4px);
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-backdrop.is-open {
    display: grid;
}

.modal-card {
    width: min(900px, 100%);
    max-height: min(85vh, 900px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(219, 227, 238, 0.9);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 22px 48px rgba(15, 34, 58, 0.18);
}

.modal-card-narrow {
    width: min(720px, 100%);
}

.modal-stack {
    max-height: 60vh;
    overflow: auto;
    padding-right: 6px;
}

.mail-composer {
    border: 1px solid rgba(219, 227, 238, 0.9);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.mail-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    background: #f6faff;
    border-bottom: 1px solid rgba(219, 227, 238, 0.9);
}

.mail-editor-area {
    min-height: 220px;
    padding: 14px;
    outline: none;
    background: #fff;
}

.mail-editor-area:empty::before {
    content: "Mail içeriğini burada hazırlayabilirsin.";
    color: #8a9bb0;
}

.mail-deliverability-note {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff9ef;
    border: 1px solid rgba(223, 139, 29, 0.2);
}

.mail-deliverability-note strong,
.mail-deliverability-note p {
    margin: 0;
}

.mail-deliverability-note p {
    margin-top: 6px;
    color: #7b5f2a;
}

.mail-history-body {
    padding: 12px;
    border-radius: 12px;
    background: #fbfdff;
    border: 1px solid rgba(219, 227, 238, 0.9);
}

.mail-history-body p:first-child {
    margin-top: 0;
}

.mail-history-body p:last-child {
    margin-bottom: 0;
}

.mail-template-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.mail-template-sidebar {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 88px;
}

.mail-template-search {
    grid-template-columns: 1fr auto;
}

.mail-template-list {
    display: grid;
    gap: 8px;
    max-height: 68vh;
    overflow: auto;
    padding-right: 4px;
}

.mail-template-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(219, 227, 238, 0.9);
    background: #f9fbfe;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mail-template-item:hover {
    border-color: rgba(31, 120, 209, 0.3);
    background: #ffffff;
    transform: translateY(-1px);
}

.mail-template-item strong {
    font-size: 13px;
}

.mail-template-item span {
    color: var(--muted);
    font-size: 12px;
}

.mail-template-item.is-active {
    border-color: rgba(31, 120, 209, 0.35);
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    box-shadow: 0 10px 22px rgba(31, 120, 209, 0.1);
}

.mail-template-item-new {
    border-style: dashed;
}

.mail-template-editor {
    display: grid;
    gap: 14px;
}

.mail-template-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mail-template-language {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(219, 227, 238, 0.9);
    background: #fbfdff;
}

.mail-template-language-head {
    margin-bottom: 12px;
}

.mail-template-language-head strong,
.mail-template-language-head span {
    display: block;
}

.mail-template-help {
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef6ff;
    border: 1px solid rgba(31, 120, 209, 0.16);
}

.mail-template-help strong,
.mail-template-help p {
    margin: 0;
}

.mail-template-help p {
    margin-top: 6px;
    color: #46698b;
}

.toast {
    position: fixed;
    right: 18px;
    top: 84px;
    z-index: 50;
    width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(31, 120, 209, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(15, 34, 58, 0.14);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast p {
    margin: 8px 0 0;
}

@media (max-width: 1320px) {
    .stats-grid,
    .guide-grid,
    .report-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .sidebar {
        position: relative;
        inset: auto;
        width: 100%;
        box-shadow: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-shell {
        flex-direction: column;
    }

    .main-shell {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        position: sticky;
        left: 0;
        height: auto;
        min-height: 72px;
    }

    .page-content {
        padding-top: 24px;
    }

    .mail-template-shell,
    .mail-template-columns {
        grid-template-columns: 1fr;
    }

    .mail-template-sidebar {
        position: static;
    }
}

@media (max-width: 960px) {
    .login-body {
        padding: 16px;
    }

    .login-shell {
        position: static;
        top: auto;
        left: auto;
        width: min(460px, calc(100vw - 32px));
        min-height: auto;
        max-height: calc(100vh - 32px);
        grid-template-columns: 1fr;
        border-radius: 24px;
        overflow-y: auto;
        transform: none;
    }

    .login-hero {
        min-height: 205px;
        padding: 22px 24px;
        gap: 18px;
    }

    .login-hero h1 {
        font-size: 25px;
        max-width: 100%;
    }

    .login-hero p {
        font-size: 13px;
    }

    .login-card {
        padding: 22px 24px 24px;
    }

    .login-locale {
        justify-content: flex-start;
        margin-bottom: 18px;
    }

    .login-feature-list {
        gap: 6px;
    }

    .login-feature-list span {
        padding: 6px 8px;
        font-size: 11px;
    }

    .stats-grid,
    .grid.two,
    .guide-grid,
    .customer-tools-grid,
    .report-stats-grid,
    .reports-filters,
    .permission-grid,
    .filters,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .page-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero,
    .section-head,
    .modal-head,
    .quick-panel,
    .actions-cell,
    .form-actions,
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .queue-fab {
        right: 16px;
        left: 16px;
        bottom: 16px;
        justify-content: space-between;
    }

    .modal-card {
        padding: 18px;
    }
}
