/*
 * Otellum Mail — tasarım sistemi.
 *
 * Tailwind browser CDN'i @import ile harici dosya yükleyemediği için bileşen
 * katmanı burada saf CSS olarak durur. `otellum` katmanı Tailwind'in `base`
 * katmanından sonra, `utilities` katmanından önce gelir: preflight bileşenleri
 * ezmez, ama görünümlerdeki Tailwind yardımcı sınıfları bileşenleri ezebilir.
 */
@layer theme, base, otellum, components, utilities;

:root {
    color-scheme: light;
    --ot-primary: #f97316;
    --ot-primary-strong: #ea580c;
    --ot-primary-soft: #fff2e8;
    --ot-primary-ring: rgba(249, 115, 22, .28);

    --ot-bg: #f6f7f9;
    --ot-surface: #ffffff;
    --ot-surface-2: #fafbfc;
    --ot-surface-3: #f1f3f6;
    --ot-rail: #ffffff;

    --ot-text: #111827;
    --ot-text-soft: #4b5563;
    --ot-text-muted: #8b95a5;

    --ot-border: #e4e8ee;
    --ot-border-soft: #eef1f5;

    --ot-danger: #dc2626;
    --ot-danger-soft: #fef2f2;
    --ot-success: #059669;
    --ot-success-soft: #ecfdf5;
    --ot-warning: #b45309;
    --ot-warning-soft: #fffbeb;
    --ot-info: #2563eb;
    --ot-info-soft: #eff6ff;

    --ot-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --ot-shadow: 0 4px 16px -4px rgba(16, 24, 40, .1), 0 2px 6px -2px rgba(16, 24, 40, .05);
    --ot-shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);

    --ot-radius: 10px;
    --ot-radius-lg: 14px;
    --ot-rail-w: 250px;
    --ot-rail-w-mini: 68px;
    --ot-top-h: 58px;
}

html.dark {
    color-scheme: dark;
    --ot-primary: #fb8b3c;
    --ot-primary-strong: #f97316;
    --ot-primary-soft: #2a1a0d;
    --ot-primary-ring: rgba(251, 139, 60, .3);

    --ot-bg: #0b0d10;
    --ot-surface: #14171c;
    --ot-surface-2: #181c22;
    --ot-surface-3: #1e232a;
    --ot-rail: #101317;

    --ot-text: #e8ecf1;
    --ot-text-soft: #aeb8c4;
    --ot-text-muted: #7c8794;

    --ot-border: #262c34;
    --ot-border-soft: #1d222a;

    --ot-danger: #f87171;
    --ot-danger-soft: #2a1618;
    --ot-success: #34d399;
    --ot-success-soft: #10241d;
    --ot-warning: #fbbf24;
    --ot-warning-soft: #2a2110;
    --ot-info: #60a5fa;
    --ot-info-soft: #131f31;

    --ot-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --ot-shadow: 0 4px 16px -4px rgba(0, 0, 0, .5);
    --ot-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .65);
}

@layer otellum {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html,
    body {
        height: 100%;
    }

    body {
        margin: 0;
        background: var(--ot-bg);
        color: var(--ot-text);
        font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 14px;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
    }

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

    [hidden] {
        display: none !important;
    }

    [x-cloak] {
        display: none !important;
    }

    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--ot-text-muted) 35%, transparent);
        border-radius: 8px;
        border: 3px solid transparent;
        background-clip: content-box;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: color-mix(in srgb, var(--ot-text-muted) 55%, transparent);
        background-clip: content-box;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    /* ---------------------------------------------------------------- iskelet */

    .ot-body {
        display: flex;
        min-height: 100vh;
    }

    .ot-sidebar {
        width: var(--ot-rail-w);
        flex: 0 0 var(--ot-rail-w);
        background: var(--ot-rail);
        border-right: 1px solid var(--ot-border);
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 0;
        height: 100vh;
        z-index: 40;
        transition: width .16s ease, flex-basis .16s ease;
    }

    .ot-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        min-height: var(--ot-top-h);
        border-bottom: 1px solid var(--ot-border-soft);
    }

    .ot-brand img {
        border-radius: 8px;
        flex: 0 0 auto;
    }

    .ot-brand-name {
        font-weight: 700;
        letter-spacing: -.01em;
        line-height: 1.1;
    }

    .ot-brand-sub {
        font-size: 11px;
        color: var(--ot-text-muted);
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .ot-rail-body {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px 10px 8px;
    }

    .ot-compose {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 10px 14px;
        margin-bottom: 14px;
        border-radius: 999px;
        background: var(--ot-primary);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 6px 16px -6px var(--ot-primary-ring);
        transition: background .14s ease, transform .1s ease;
    }

    .ot-compose:hover {
        background: var(--ot-primary-strong);
    }

    .ot-compose:active {
        transform: translateY(1px);
    }

    .ot-nav {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .ot-nav > a,
    .ot-nav > button {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        border-radius: var(--ot-radius);
        color: var(--ot-text-soft);
        font-weight: 500;
        font-size: 13.5px;
        border: 0;
        background: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        transition: background .12s ease, color .12s ease;
    }

    .ot-nav > a > svg,
    .ot-nav > button > svg {
        flex: 0 0 auto;
        opacity: .8;
    }

    .ot-nav > a > span,
    .ot-nav > button > span {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ot-nav > a:hover,
    .ot-nav > button:hover {
        background: var(--ot-surface-3);
        color: var(--ot-text);
    }

    .ot-nav > a.is-active {
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        font-weight: 650;
    }

    .ot-nav > a.is-active > svg {
        opacity: 1;
    }

    .ot-nav-label {
        padding: 14px 12px 5px;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: var(--ot-text-muted);
    }

    .ot-badge {
        flex: 0 0 auto;
        min-width: 20px;
        padding: 1px 6px;
        border-radius: 999px;
        background: var(--ot-primary);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        text-align: center;
    }

    .ot-nav > a.is-active .ot-badge {
        background: var(--ot-primary-strong);
    }

    .ot-badge.is-soft {
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
    }

    .ot-rail-foot {
        border-top: 1px solid var(--ot-border-soft);
        padding: 10px 14px 12px;
    }

    .ot-quota-top {
        display: flex;
        justify-content: space-between;
        font-size: 11.5px;
        color: var(--ot-text-muted);
        margin-bottom: 5px;
    }

    .ot-quota-bar {
        height: 5px;
        border-radius: 999px;
        background: var(--ot-surface-3);
        overflow: hidden;
    }

    .ot-quota-fill {
        height: 100%;
        border-radius: 999px;
        background: var(--ot-primary);
        transition: width .3s ease;
    }

    .ot-quota-fill.is-warn {
        background: var(--ot-warning);
    }

    .ot-quota-fill.is-full {
        background: var(--ot-danger);
    }

    .ot-overlay {
        position: fixed;
        inset: 0;
        background: rgba(8, 11, 15, .45);
        backdrop-filter: blur(2px);
        z-index: 39;
        opacity: 0;
        pointer-events: none;
        transition: opacity .16s ease;
    }

    .ot-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .ot-wrap {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .ot-top {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: var(--ot-top-h);
        padding: 0 16px;
        background: color-mix(in srgb, var(--ot-surface) 88%, transparent);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--ot-border);
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .ot-page-title {
        margin: 0;
        font-size: 15.5px;
        font-weight: 650;
        letter-spacing: -.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ot-top-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .ot-main {
        flex: 1 1 auto;
        min-height: 0;
        padding: 20px;
    }

    .ot-main.is-flush {
        padding: 0;
        display: flex;
        flex-direction: column;
        height: calc(100vh - var(--ot-top-h));
    }

    /* -------------------------------------------------------------- düğmeler */

    .ot-btn,
    .ks-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 7px 13px;
        border-radius: var(--ot-radius);
        border: 1px solid var(--ot-border);
        background: var(--ot-surface);
        color: var(--ot-text);
        font: inherit;
        font-size: 13.5px;
        font-weight: 550;
        line-height: 1.2;
        cursor: pointer;
        white-space: nowrap;
        transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
    }

    .ot-btn:hover,
    .ks-btn:hover {
        background: var(--ot-surface-3);
        border-color: color-mix(in srgb, var(--ot-border) 60%, var(--ot-text-muted));
    }

    .ot-btn:focus-visible,
    .ks-btn:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 3px var(--ot-primary-ring);
    }

    .ot-btn:disabled,
    .ks-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

    .ot-btn.primary,
    .ks-btn.primary {
        background: var(--ot-primary);
        border-color: var(--ot-primary);
        color: #fff;
    }

    .ot-btn.primary:hover,
    .ks-btn.primary:hover {
        background: var(--ot-primary-strong);
        border-color: var(--ot-primary-strong);
    }

    .ot-btn.danger,
    .ks-btn.danger {
        color: var(--ot-danger);
        border-color: color-mix(in srgb, var(--ot-danger) 30%, var(--ot-border));
    }

    .ot-btn.danger:hover,
    .ks-btn.danger:hover {
        background: var(--ot-danger-soft);
        border-color: var(--ot-danger);
    }

    .ot-btn.danger-solid {
        background: var(--ot-danger);
        border-color: var(--ot-danger);
        color: #fff;
    }

    .ot-btn.danger-solid:hover {
        background: color-mix(in srgb, var(--ot-danger) 85%, #000);
    }

    .ot-btn.ghost,
    .ks-btn.ghost {
        background: transparent;
        border-color: transparent;
    }

    .ot-btn.ghost:hover,
    .ks-btn.ghost:hover {
        background: var(--ot-surface-3);
        border-color: transparent;
    }

    .ot-btn.sm,
    .ks-btn.sm {
        padding: 5px 10px;
        font-size: 12.5px;
        border-radius: 8px;
    }

    .ot-btn.lg {
        padding: 10px 18px;
        font-size: 14.5px;
    }

    .ot-btn.block {
        width: 100%;
    }

    .ot-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 9px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--ot-text-soft);
        cursor: pointer;
        transition: background .12s ease, color .12s ease;
    }

    .ot-icon-btn:hover {
        background: var(--ot-surface-3);
        color: var(--ot-text);
    }

    .ot-icon-btn:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 3px var(--ot-primary-ring);
    }

    .ot-icon-btn.is-on {
        color: var(--ot-primary);
        background: var(--ot-primary-soft);
    }

    .ot-avatar {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 0;
        background: var(--ot-primary);
        color: #fff;
        font-weight: 700;
        font-size: 13px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* ------------------------------------------------------------- form alanı */

    .ot-input,
    .ks-input,
    .ot-field input[type="text"],
    .ot-field input[type="email"],
    .ot-field input[type="password"],
    .ot-field input[type="search"],
    .ot-field input[type="date"],
    .ot-field input[type="number"],
    .ot-field input[type="datetime-local"],
    .ot-field select,
    .ot-field textarea {
        width: 100%;
        padding: 8px 11px;
        border-radius: var(--ot-radius);
        border: 1px solid var(--ot-border);
        background: var(--ot-surface);
        color: var(--ot-text);
        font: inherit;
        font-size: 13.5px;
        transition: border-color .12s ease, box-shadow .12s ease;
    }

    .ot-input::placeholder,
    .ks-input::placeholder {
        color: var(--ot-text-muted);
    }

    .ot-input:focus,
    .ks-input:focus,
    .ot-field input:focus,
    .ot-field select:focus,
    .ot-field textarea:focus {
        outline: 0;
        border-color: var(--ot-primary);
        box-shadow: 0 0 0 3px var(--ot-primary-ring);
    }

    textarea.ot-input,
    textarea.ks-input {
        min-height: 110px;
        resize: vertical;
    }

    select.ot-input,
    select.ks-input {
        appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, var(--ot-text-muted) 50%), linear-gradient(135deg, var(--ot-text-muted) 50%, transparent 50%);
        background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
        padding-right: 30px;
    }

    .ot-label,
    .ks-form-label {
        display: block;
        margin-bottom: 5px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-soft);
    }

    .ot-hint {
        font-size: 12px;
        color: var(--ot-text-muted);
        margin-top: 4px;
    }

    .ot-check,
    .ks-form-check {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13.5px;
        cursor: pointer;
        user-select: none;
    }

    .ot-check input[type="checkbox"],
    .ot-check input[type="radio"],
    input.ot-box[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--ot-primary);
        cursor: pointer;
        margin: 0;
    }

    .ot-switch {
        position: relative;
        display: inline-block;
        width: 38px;
        height: 22px;
        flex: 0 0 auto;
    }

    .ot-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .ot-switch span {
        position: absolute;
        inset: 0;
        border-radius: 999px;
        background: var(--ot-surface-3);
        border: 1px solid var(--ot-border);
        transition: background .15s ease;
    }

    .ot-switch span::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 999px;
        background: #fff;
        box-shadow: var(--ot-shadow-sm);
        transition: transform .15s ease;
    }

    .ot-switch input:checked + span {
        background: var(--ot-primary);
        border-color: var(--ot-primary);
    }

    .ot-switch input:checked + span::after {
        transform: translateX(16px);
    }

    .mb-3 {
        margin-bottom: 14px;
    }

    /* ------------------------------------------------------------------ kart */

    .ot-card,
    .ks-card {
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        box-shadow: var(--ot-shadow-sm);
    }

    .ot-card-body,
    .ks-card-body {
        padding: 18px;
    }

    .ot-card-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 18px;
        border-bottom: 1px solid var(--ot-border-soft);
    }

    .ot-card-title,
    .ks-card-title {
        margin: 0;
        font-size: 14.5px;
        font-weight: 650;
    }

    .ot-page-head,
    .ks-page-head {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        flex-wrap: wrap;
        margin-bottom: 18px;
    }

    .ot-page-title,
    .ks-page-title {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 19px;
        font-weight: 700;
        letter-spacing: -.02em;
    }

    .ot-page-title svg {
        color: var(--ot-primary);
    }

    .ot-page-sub,
    .ks-page-subtitle {
        margin-top: 3px;
        font-size: 13px;
        color: var(--ot-text-muted);
    }

    .ot-grid {
        display: grid;
        gap: 14px;
    }

    .ot-grid.cols-2 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .ot-grid.cols-3 {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    }

    .ot-stat {
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        padding: 15px 16px;
    }

    .ot-stat-label {
        font-size: 12px;
        color: var(--ot-text-muted);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .ot-stat-value {
        font-size: 24px;
        font-weight: 750;
        letter-spacing: -.02em;
        margin-top: 3px;
    }

    /* ---------------------------------------------------------------- rozet */

    .ot-pill,
    .ks-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 2px 9px;
        border-radius: 999px;
        font-size: 11.5px;
        font-weight: 650;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
        border: 1px solid transparent;
        white-space: nowrap;
    }

    .ot-pill.ok {
        background: var(--ot-success-soft);
        color: var(--ot-success);
    }

    .ot-pill.warn {
        background: var(--ot-warning-soft);
        color: var(--ot-warning);
    }

    .ot-pill.bad {
        background: var(--ot-danger-soft);
        color: var(--ot-danger);
    }

    .ot-pill.info {
        background: var(--ot-info-soft);
        color: var(--ot-info);
    }

    .ot-pill.brand {
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
    }

    /* ---------------------------------------------------------------- tablo */

    .ot-table,
    .ks-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13.5px;
    }

    .ot-table th,
    .ks-table th {
        text-align: left;
        font-weight: 650;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--ot-text-muted);
        padding: 9px 12px;
        border-bottom: 1px solid var(--ot-border);
        white-space: nowrap;
    }

    .ot-table td,
    .ks-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--ot-border-soft);
        vertical-align: middle;
    }

    .ot-table tbody tr:last-child td,
    .ks-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .ot-table tbody tr:hover {
        background: var(--ot-surface-2);
    }

    .ot-table-wrap {
        overflow-x: auto;
        border-radius: var(--ot-radius-lg);
    }

    code,
    .ot-code {
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 12.5px;
        background: var(--ot-surface-3);
        padding: 1.5px 6px;
        border-radius: 6px;
        word-break: break-all;
    }

    kbd {
        font-family: inherit;
        font-size: 11px;
        font-weight: 650;
        padding: 1.5px 6px;
        border-radius: 6px;
        border: 1px solid var(--ot-border);
        border-bottom-width: 2px;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
    }

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

    /* ---------------------------------------------------------------- uyarı */

    .ot-alert,
    .ks-alert {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        padding: 11px 14px;
        border-radius: var(--ot-radius);
        font-size: 13.5px;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
        border: 1px solid var(--ot-border-soft);
        margin-bottom: 14px;
    }

    .ot-alert svg,
    .ks-alert svg {
        flex: 0 0 auto;
        margin-top: 1px;
    }

    .ot-alert.success,
    .ks-alert.success {
        background: var(--ot-success-soft);
        color: var(--ot-success);
        border-color: color-mix(in srgb, var(--ot-success) 25%, transparent);
    }

    .ot-alert.danger,
    .ks-alert.danger {
        background: var(--ot-danger-soft);
        color: var(--ot-danger);
        border-color: color-mix(in srgb, var(--ot-danger) 25%, transparent);
    }

    .ot-alert.warning,
    .ks-alert.warning {
        background: var(--ot-warning-soft);
        color: var(--ot-warning);
        border-color: color-mix(in srgb, var(--ot-warning) 25%, transparent);
    }

    .ot-alert.info {
        background: var(--ot-info-soft);
        color: var(--ot-info);
        border-color: color-mix(in srgb, var(--ot-info) 25%, transparent);
    }

    /* ------------------------------------------------------------- açılır menü */

    .ot-drop {
        position: relative;
        display: inline-flex;
    }

    .ot-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 190px;
        max-height: 70vh;
        overflow-y: auto;
        padding: 5px;
        border-radius: var(--ot-radius-lg);
        border: 1px solid var(--ot-border);
        background: var(--ot-surface);
        box-shadow: var(--ot-shadow);
        z-index: 60;
    }

    .ot-menu.to-right {
        left: auto;
        right: 0;
    }

    .ot-menu > button,
    .ot-menu > a {
        display: flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        padding: 7px 10px;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--ot-text);
        font: inherit;
        font-size: 13.5px;
        text-align: left;
        cursor: pointer;
    }

    .ot-menu > button:hover,
    .ot-menu > a:hover {
        background: var(--ot-surface-3);
    }

    .ot-menu > .is-danger,
    .ot-menu > a.is-danger {
        color: var(--ot-danger);
    }

    .ot-menu-sep {
        height: 1px;
        margin: 5px 2px;
        background: var(--ot-border-soft);
    }

    .ot-menu-label {
        padding: 7px 10px 3px;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--ot-text-muted);
    }

    .ot-user-mail {
        padding: 8px 10px;
        font-size: 12.5px;
        color: var(--ot-text-muted);
        border-bottom: 1px solid var(--ot-border-soft);
        margin-bottom: 4px;
        word-break: break-all;
    }

    /* ------------------------------------------------------------------ toast */

    .ot-toasts {
        position: fixed;
        right: 16px;
        bottom: 16px;
        z-index: 90;
        display: flex;
        flex-direction: column;
        gap: 9px;
        max-width: min(380px, calc(100vw - 32px));
    }

    .ot-toast {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 11px 13px;
        border-radius: var(--ot-radius-lg);
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        box-shadow: var(--ot-shadow);
        font-size: 13.5px;
        animation: ot-toast-in .18s ease;
    }

    .ot-toast .ot-toast-ico {
        flex: 0 0 auto;
        margin-top: 1px;
    }

    .ot-toast.ok .ot-toast-ico {
        color: var(--ot-success);
    }

    .ot-toast.err .ot-toast-ico {
        color: var(--ot-danger);
    }

    .ot-toast.warn .ot-toast-ico {
        color: var(--ot-warning);
    }

    .ot-toast-msg {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ot-toast-act {
        flex: 0 0 auto;
        border: 0;
        background: none;
        color: var(--ot-primary);
        font: inherit;
        font-weight: 650;
        font-size: 13px;
        cursor: pointer;
        padding: 0 2px;
    }

    @keyframes ot-toast-in {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
    }

    /* ------------------------------------------------------------------ modal */

    .ot-modal {
        position: fixed;
        inset: 0;
        z-index: 80;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(8, 11, 15, .5);
        backdrop-filter: blur(3px);
    }

    .ot-modal-card {
        width: 100%;
        max-width: 480px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: 16px;
        box-shadow: var(--ot-shadow-lg);
        animation: ot-modal-in .16s ease;
    }

    .ot-modal-card.wide {
        max-width: 720px;
    }

    .ot-modal-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 15px 18px;
        border-bottom: 1px solid var(--ot-border-soft);
    }

    .ot-modal-head h3 {
        margin: 0;
        font-size: 15.5px;
        font-weight: 650;
    }

    .ot-modal-body {
        padding: 18px;
    }

    .ot-modal-foot {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 13px 18px;
        border-top: 1px solid var(--ot-border-soft);
    }

    @keyframes ot-modal-in {
        from {
            opacity: 0;
            transform: scale(.97) translateY(6px);
        }
    }

    /* -------------------------------------------------------- komut paleti */

    .ot-palette {
        position: fixed;
        inset: 0;
        z-index: 85;
        display: flex;
        justify-content: center;
        padding: 12vh 18px 18px;
        background: rgba(8, 11, 15, .5);
        backdrop-filter: blur(3px);
    }

    .ot-palette-card {
        width: 100%;
        max-width: 560px;
        height: fit-content;
        max-height: 70vh;
        display: flex;
        flex-direction: column;
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: 16px;
        box-shadow: var(--ot-shadow-lg);
        overflow: hidden;
    }

    .ot-palette-input {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 16px;
        border-bottom: 1px solid var(--ot-border-soft);
        color: var(--ot-text-muted);
    }

    .ot-palette-input input {
        flex: 1 1 auto;
        border: 0;
        background: none;
        outline: 0;
        font: inherit;
        font-size: 15px;
        color: var(--ot-text);
    }

    .ot-palette-list {
        overflow-y: auto;
        padding: 6px;
    }

    .ot-palette-list button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 11px;
        border: 0;
        border-radius: 9px;
        background: none;
        color: var(--ot-text);
        font: inherit;
        font-size: 13.5px;
        text-align: left;
        cursor: pointer;
    }

    .ot-palette-list button.is-on,
    .ot-palette-list button:hover {
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
    }

    .ot-palette-list .k {
        margin-left: auto;
        font-size: 11px;
        color: var(--ot-text-muted);
    }

    .ot-palette-empty {
        padding: 22px;
        text-align: center;
        color: var(--ot-text-muted);
        font-size: 13.5px;
    }

    /* ------------------------------------------------------------ posta ekranı */

    .mail-shell {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    .mail-toolbar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
        flex-wrap: wrap;
    }

    .mail-toolbar-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
    }

    .mail-toolbar-sep {
        width: 1px;
        height: 20px;
        margin: 0 3px;
        background: var(--ot-border);
    }

    .mail-search {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1 1 240px;
        min-width: 180px;
    }

    .mail-search-box {
        display: flex;
        align-items: center;
        gap: 7px;
        flex: 1 1 auto;
        padding: 0 10px;
        border-radius: 999px;
        border: 1px solid var(--ot-border);
        background: var(--ot-surface-3);
        color: var(--ot-text-muted);
        transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
    }

    .mail-search-box:focus-within {
        background: var(--ot-surface);
        border-color: var(--ot-primary);
        box-shadow: 0 0 0 3px var(--ot-primary-ring);
    }

    .mail-search-box input {
        flex: 1 1 auto;
        min-width: 0;
        border: 0;
        background: none;
        outline: 0;
        padding: 7px 0;
        font: inherit;
        font-size: 13.5px;
        color: var(--ot-text);
    }

    .mail-advanced {
        padding: 10px 12px;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface-2);
    }

    .mail-adv-check {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 34px;
        padding: 0 10px;
        border: 1px solid var(--ot-border);
        border-radius: 8px;
        background: var(--ot-surface);
        font-size: 13px;
        color: var(--ot-text);
        cursor: pointer;
        user-select: none;
    }

    .mail-adv-check:hover {
        border-color: var(--ot-primary);
    }

    .mail-adv-check input {
        accent-color: var(--ot-primary);
    }

    .mail-panes {
        flex: 1 1 auto;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(300px, 400px) 1fr;
    }

    .mail-list {
        overflow-y: auto;
        border-right: 1px solid var(--ot-border);
        background: var(--ot-surface);
        display: flex;
        flex-direction: column;
    }

    .mail-row {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 9px 12px;
        border-bottom: 1px solid var(--ot-border-soft);
        cursor: pointer;
        position: relative;
        transition: background .1s ease;
    }

    .mail-row:hover {
        background: var(--ot-surface-2);
    }

    .mail-row.is-active {
        background: var(--ot-primary-soft);
    }

    .mail-row.is-active::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--ot-primary);
    }

    .mail-row.is-kb {
        box-shadow: inset 0 0 0 2px var(--ot-primary-ring);
    }

    .mail-row.is-unread .who,
    .mail-row.is-unread .subj {
        font-weight: 700;
        color: var(--ot-text);
    }

    .mail-row.is-unread .mail-dot {
        background: var(--ot-primary);
    }

    .mail-dot {
        flex: 0 0 auto;
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: transparent;
    }

    .mail-check {
        flex: 0 0 auto;
        width: 15px;
        height: 15px;
        accent-color: var(--ot-primary);
        cursor: pointer;
        margin: 0;
    }

    .mail-star {
        flex: 0 0 auto;
        border: 0;
        background: none;
        padding: 2px;
        cursor: pointer;
        color: var(--ot-text-muted);
        display: inline-flex;
        line-height: 0;
    }

    .mail-star:hover {
        color: var(--ot-warning);
    }

    .mail-star.is-on {
        color: #f5a524;
    }

    .mail-star.is-on svg {
        fill: #f5a524;
    }

    .mail-row-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mail-row-main .who {
        font-size: 13.5px;
        font-weight: 550;
        color: var(--ot-text-soft);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mail-row-main .subj {
        font-size: 13px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mail-row-main .snippet {
        font-size: 12.5px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        opacity: .85;
    }

    .mail-row-tags {
        display: flex;
        gap: 4px;
        margin-top: 3px;
        flex-wrap: wrap;
    }

    .mail-tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 0 7px;
        height: 17px;
        border-radius: 999px;
        font-size: 10.5px;
        font-weight: 650;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
    }

    .mail-tag i {
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: currentColor;
        display: inline-block;
    }

    .mail-attach {
        flex: 0 0 auto;
        color: var(--ot-text-muted);
        line-height: 0;
    }

    .mail-attach.is-empty {
        visibility: hidden;
    }

    .mail-row .when {
        flex: 0 0 auto;
        font-size: 11.5px;
        color: var(--ot-text-muted);
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    .mail-count {
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 700;
        color: var(--ot-text-muted);
        background: var(--ot-surface-3);
        border-radius: 999px;
        padding: 0 6px;
    }

    .mail-empty,
    .mail-read-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 48px 20px;
        color: var(--ot-text-muted);
        font-size: 13.5px;
        text-align: center;
        flex: 1 1 auto;
    }

    .mail-read-empty svg {
        opacity: .35;
    }

    .mail-pager {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 12px;
        margin-top: auto;
        border-top: 1px solid var(--ot-border-soft);
        flex-wrap: wrap;
    }

    .mail-pager a,
    .mail-pager span {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-soft);
    }

    .mail-pager a:hover {
        background: var(--ot-surface-3);
    }

    .mail-pager .is-on {
        background: var(--ot-primary);
        color: #fff;
    }

    .mail-pager .gap {
        color: var(--ot-text-muted);
        min-width: 18px;
    }

    .mail-read {
        overflow-y: auto;
        background: var(--ot-surface-2);
        display: flex;
        flex-direction: column;
    }

    .mail-read-inner {
        padding: 18px 22px 40px;
    }

    .mail-head h2 {
        margin: 0 0 10px;
        font-size: 19px;
        font-weight: 700;
        letter-spacing: -.02em;
        line-height: 1.3;
    }

    .mail-meta {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        font-size: 13px;
        color: var(--ot-text-soft);
        margin-bottom: 14px;
    }

    .mail-meta-avatar {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        border-radius: 999px;
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 15px;
    }

    .mail-meta-lines {
        min-width: 0;
        flex: 1 1 auto;
    }

    .mail-meta-lines .l1 {
        font-weight: 650;
        color: var(--ot-text);
    }

    .mail-meta-lines .l2 {
        font-size: 12.5px;
        color: var(--ot-text-muted);
        word-break: break-word;
    }

    .mail-meta-date {
        flex: 0 0 auto;
        font-size: 12px;
        color: var(--ot-text-muted);
        white-space: nowrap;
    }

    .mail-actions {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }

    .mail-files {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        padding: 11px;
        margin-bottom: 14px;
        border-radius: var(--ot-radius);
        background: var(--ot-surface);
        border: 1px solid var(--ot-border-soft);
    }

    .mail-file {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        border-radius: 9px;
        border: 1px solid var(--ot-border);
        background: var(--ot-surface-2);
        font-size: 12.5px;
        max-width: 260px;
    }

    .mail-file .nm {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mail-file .sz {
        color: var(--ot-text-muted);
        font-size: 11.5px;
        white-space: nowrap;
    }

    .mail-html {
        background: var(--ot-surface);
        border: 1px solid var(--ot-border-soft);
        border-radius: var(--ot-radius);
        padding: 16px;
        overflow-x: auto;
    }

    .mail-html iframe {
        width: 100%;
        min-height: 320px;
        border: 0;
        display: block;
        background: #fff;
        border-radius: 6px;
    }

    .mail-plain {
        white-space: pre-wrap;
        word-break: break-word;
        line-height: 1.65;
        font-size: 13.5px;
    }

    .mail-thread {
        margin-top: 18px;
    }

    .mail-thread-head {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--ot-text-muted);
        margin-bottom: 8px;
    }

    .mail-thread-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: var(--ot-radius);
        border: 1px solid var(--ot-border-soft);
        background: var(--ot-surface);
        margin-bottom: 6px;
        font-size: 13px;
    }

    .mail-thread-item:hover {
        border-color: var(--ot-primary);
    }

    .mail-thread-item.is-current {
        border-color: var(--ot-primary);
        background: var(--ot-primary-soft);
    }

    .mail-thread-item .who {
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }

    .mail-thread-item .sn {
        flex: 1 1 auto;
        min-width: 0;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mail-thread-item .dt {
        flex: 0 0 auto;
        font-size: 11.5px;
        color: var(--ot-text-muted);
    }

    .mail-preview {
        position: fixed;
        inset: 0;
        z-index: 82;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(8, 11, 15, .6);
    }

    .mail-preview-card {
        width: 100%;
        max-width: 900px;
        height: 82vh;
        display: flex;
        flex-direction: column;
        background: var(--ot-surface);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--ot-shadow-lg);
    }

    .mail-preview-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--ot-border-soft);
    }

    .mail-preview-head strong {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .mail-preview iframe {
        flex: 1 1 auto;
        width: 100%;
        border: 0;
        background: var(--ot-surface-3);
    }

    .mail-help-list {
        list-style: none;
        margin: 0 0 14px;
        padding: 0;
        display: grid;
        gap: 7px;
        font-size: 13px;
        color: var(--ot-text-soft);
    }

    /* ------------------------------------------------------------- yazma ekranı */

    .mail-compose-toolbar {
        display: flex;
        align-items: center;
        gap: 2px;
        flex-wrap: wrap;
        padding: 5px;
        border: 1px solid var(--ot-border);
        border-bottom: 0;
        border-radius: var(--ot-radius) var(--ot-radius) 0 0;
        background: var(--ot-surface-2);
    }

    .mail-compose-toolbar button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: 0;
        border-radius: 7px;
        background: none;
        color: var(--ot-text-soft);
        cursor: pointer;
    }

    .mail-compose-toolbar button:hover {
        background: var(--ot-surface-3);
        color: var(--ot-text);
    }

    .mail-compose-toolbar button.is-on {
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
    }

    .mail-compose-toolbar .sep {
        width: 1px;
        height: 18px;
        margin: 0 3px;
        background: var(--ot-border);
    }

    .mail-editor {
        min-height: 260px;
        max-height: 55vh;
        overflow-y: auto;
        padding: 14px 16px;
        border: 1px solid var(--ot-border);
        border-radius: 0 0 var(--ot-radius) var(--ot-radius);
        background: var(--ot-surface);
        font-size: 14px;
        line-height: 1.65;
        outline: 0;
    }

    .mail-editor:focus {
        border-color: var(--ot-primary);
        box-shadow: 0 0 0 3px var(--ot-primary-ring);
    }

    .mail-editor blockquote {
        margin: 8px 0;
        padding-left: 12px;
        border-left: 3px solid var(--ot-border);
        color: var(--ot-text-soft);
    }

    .mail-editor img {
        max-width: 100%;
        height: auto;
    }

    .mail-editor table {
        border-collapse: collapse;
    }

    .mail-editor table td,
    .mail-editor table th {
        border: 1px solid var(--ot-border);
        padding: 5px 8px;
    }

    .mail-drop {
        border: 1.5px dashed var(--ot-border);
        border-radius: var(--ot-radius);
        padding: 16px;
        text-align: center;
        color: var(--ot-text-muted);
        font-size: 13px;
        cursor: pointer;
        transition: border-color .12s ease, background .12s ease;
    }

    .mail-drop:hover,
    .mail-drop.is-over {
        border-color: var(--ot-primary);
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
    }

    .mail-att-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 10px;
    }

    .mail-att {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 7px 10px;
        border-radius: 9px;
        border: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
        font-size: 13px;
    }

    .mail-att .nm {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mail-att .sz {
        flex: 0 0 auto;
        font-size: 11.5px;
        color: var(--ot-text-muted);
    }

    .mail-att.is-bad {
        border-color: color-mix(in srgb, var(--ot-danger) 40%, transparent);
        background: var(--ot-danger-soft);
        color: var(--ot-danger);
    }

    .mail-compose-note {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        color: var(--ot-text-muted);
        margin-bottom: 12px;
    }

    /* ------------------------------------------------------------------ takvim */

    .cal-wrap {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    .cal-toolbar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
        flex-wrap: wrap;
    }

    .cal-title {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: -.01em;
        min-width: 165px;
    }

    .cal-seg {
        display: inline-flex;
        border: 1px solid var(--ot-border);
        border-radius: 9px;
        overflow: hidden;
    }

    .cal-seg button {
        border: 0;
        background: var(--ot-surface);
        color: var(--ot-text-soft);
        font: inherit;
        font-size: 12.5px;
        font-weight: 600;
        padding: 6px 12px;
        cursor: pointer;
    }

    .cal-seg button + button {
        border-left: 1px solid var(--ot-border);
    }

    .cal-seg button.is-on {
        background: var(--ot-primary);
        color: #fff;
    }

    .cal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        padding: 12px 14px 20px;
    }

    .cal-dow {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
        margin-bottom: 6px;
    }

    .cal-dow div {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--ot-text-muted);
        text-align: center;
    }

    .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }

    .cal-cell {
        min-height: 104px;
        padding: 6px;
        border-radius: var(--ot-radius);
        border: 1px solid var(--ot-border-soft);
        background: var(--ot-surface);
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .cal-cell.is-out {
        background: var(--ot-surface-2);
        opacity: .6;
    }

    .cal-cell.is-today {
        border-color: var(--ot-primary);
    }

    .cal-cell.is-over {
        background: var(--ot-primary-soft);
    }

    .cal-cell .d {
        font-size: 12px;
        font-weight: 650;
        color: var(--ot-text-soft);
        align-self: flex-end;
    }

    .cal-cell.is-today .d {
        background: var(--ot-primary);
        color: #fff;
        width: 21px;
        height: 21px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .cal-ev {
        display: block;
        width: 100%;
        text-align: left;
        border: 0;
        border-radius: 6px;
        padding: 3px 6px;
        font-size: 11.5px;
        font-weight: 550;
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        cursor: pointer;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cal-ev:hover {
        background: var(--ot-primary);
        color: #fff;
    }

    .cal-week {
        display: grid;
        grid-template-columns: 56px repeat(7, 1fr);
        gap: 0;
        min-width: 720px;
    }

    .cal-week .hcell {
        height: 44px;
        border-top: 1px solid var(--ot-border-soft);
        border-right: 1px solid var(--ot-border-soft);
        position: relative;
    }

    .cal-week .hlabel {
        height: 44px;
        border-top: 1px solid transparent;
        font-size: 11px;
        color: var(--ot-text-muted);
        text-align: right;
        padding-right: 7px;
        transform: translateY(-7px);
    }

    .cal-week .dayhead {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--ot-surface);
        padding: 7px 4px;
        text-align: center;
        font-size: 12px;
        font-weight: 650;
        border-bottom: 1px solid var(--ot-border);
    }

    .cal-week .dayhead.is-today {
        color: var(--ot-primary-strong);
    }

    .cal-wev {
        position: absolute;
        left: 2px;
        right: 2px;
        border-radius: 6px;
        padding: 2px 6px;
        font-size: 11px;
        font-weight: 600;
        background: var(--ot-primary);
        color: #fff;
        overflow: hidden;
        cursor: pointer;
        border: 0;
        text-align: left;
        z-index: 1;
    }

    .cal-agenda-day {
        margin-bottom: 16px;
    }

    .cal-agenda-day h4 {
        margin: 0 0 7px;
        font-size: 12.5px;
        font-weight: 700;
        color: var(--ot-text-muted);
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .cal-agenda-item {
        display: flex;
        gap: 12px;
        align-items: center;
        padding: 10px 12px;
        border-radius: var(--ot-radius);
        border: 1px solid var(--ot-border-soft);
        background: var(--ot-surface);
        margin-bottom: 6px;
        cursor: pointer;
        width: 100%;
        text-align: left;
        font: inherit;
    }

    .cal-agenda-item:hover {
        border-color: var(--ot-primary);
    }

    .cal-agenda-item .t {
        flex: 0 0 92px;
        font-size: 12.5px;
        color: var(--ot-text-muted);
        font-variant-numeric: tabular-nums;
    }

    /* ------------------------------------------------------------------ rehber */

    .ab-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 10px;
    }

    .ab-card {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 12px;
        border-radius: var(--ot-radius-lg);
        border: 1px solid var(--ot-border);
        background: var(--ot-surface);
        transition: border-color .12s ease, box-shadow .12s ease;
    }

    .ab-card:hover {
        border-color: var(--ot-primary);
        box-shadow: var(--ot-shadow-sm);
    }

    .ab-av {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 999px;
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

    .ab-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ab-info .nm {
        font-weight: 650;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ab-info .em {
        font-size: 12.5px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ab-acts {
        display: flex;
        gap: 2px;
        flex: 0 0 auto;
    }

    /* ------------------------------------------------------------ kural kartı */

    .rule-card {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        background: var(--ot-surface);
        padding: 14px;
        margin-bottom: 10px;
    }

    .rule-head {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }

    .rule-name {
        font-weight: 650;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rule-line {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 7px;
    }

    .rule-line > * {
        flex: 0 1 auto;
    }

    .rule-sum {
        font-size: 12.5px;
        color: var(--ot-text-muted);
    }

    /* ------------------------------------------------------------------- sekme */

    .ot-tabs {
        display: flex;
        gap: 2px;
        border-bottom: 1px solid var(--ot-border);
        margin-bottom: 18px;
        overflow-x: auto;
    }

    .ot-tabs a,
    .ot-tabs button {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 14px;
        border: 0;
        border-bottom: 2px solid transparent;
        background: none;
        color: var(--ot-text-muted);
        font: inherit;
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
    }

    .ot-tabs a:hover,
    .ot-tabs button:hover {
        color: var(--ot-text);
    }

    .ot-tabs a.is-active,
    .ot-tabs button.is-active {
        color: var(--ot-primary-strong);
        border-bottom-color: var(--ot-primary);
    }

    /* ------------------------------------------------------------------ giriş */

    .lg-wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 100vh;
        width: 100%;
    }

    .lg-hero {
        position: relative;
        overflow: hidden;
        background: linear-gradient(150deg, #1c1207 0%, #2a1608 45%, #0c0d10 100%);
        color: #fff;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 42px;
    }

    .lg-hero::before {
        content: "";
        position: absolute;
        width: 620px;
        height: 620px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(249, 115, 22, .35), transparent 62%);
        top: -180px;
        right: -190px;
        pointer-events: none;
    }

    .lg-hero::after {
        content: "";
        position: absolute;
        width: 460px;
        height: 460px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(249, 115, 22, .18), transparent 65%);
        bottom: -180px;
        left: -140px;
        pointer-events: none;
    }

    .lg-hero > * {
        position: relative;
        z-index: 1;
    }

    .lg-hero h1 {
        font-size: 34px;
        font-weight: 750;
        letter-spacing: -.03em;
        line-height: 1.15;
        margin: 0 0 14px;
    }

    .lg-hero p {
        margin: 0;
        color: rgba(255, 255, 255, .68);
        font-size: 15px;
        max-width: 420px;
        line-height: 1.6;
    }

    .lg-feats {
        display: grid;
        gap: 12px;
        margin-top: 28px;
    }

    .lg-feat {
        display: flex;
        gap: 11px;
        align-items: flex-start;
        font-size: 13.5px;
        color: rgba(255, 255, 255, .82);
    }

    .lg-feat svg {
        flex: 0 0 auto;
        color: var(--ot-primary);
        margin-top: 1px;
    }

    .lg-side {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px;
        background: var(--ot-bg);
    }

    .lg-card {
        width: 100%;
        max-width: 384px;
    }

    .lg-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 26px;
    }

    @media (max-width: 900px) {
        .lg-wrap {
            grid-template-columns: 1fr;
        }

        .lg-hero {
            display: none;
        }
    }

    /* --------------------------------------------------------------- responsive */

    .ot-only-mobile {
        display: none;
    }

    @media (max-width: 1024px) {
        .ot-sidebar {
            position: fixed;
            left: 0;
            top: 0;
            transform: translateX(-100%);
            transition: transform .18s ease;
            box-shadow: var(--ot-shadow-lg);
        }

        .ot-sidebar.is-open {
            transform: none;
        }

        .ot-body {
            display: block;
        }

        .ot-wrap {
            min-height: 100vh;
        }

        .ot-only-mobile {
            display: inline-flex;
        }
    }

    @media (max-width: 940px) {
        .mail-panes {
            grid-template-columns: 1fr;
        }

        .mail-panes .mail-read {
            display: none;
        }

        .mail-shell.is-reading .mail-panes .mail-list {
            display: none;
        }

        .mail-shell.is-reading .mail-panes .mail-read {
            display: flex;
        }
    }

    @media (max-width: 640px) {
        .ot-main {
            padding: 14px;
        }

        .mail-read-inner {
            padding: 14px 14px 34px;
        }

        .ot-toasts {
            left: 12px;
            right: 12px;
            bottom: 12px;
            max-width: none;
        }

        .cal-cell {
            min-height: 74px;
        }
    }

    @media print {
        .ot-sidebar,
        .ot-top,
        .mail-toolbar,
        .mail-actions,
        .ot-toasts {
            display: none !important;
        }

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

        .mail-list {
            display: none;
        }
    }
}

/* --------------------------------------------------------------------------
 * Aşama 2-6 bileşenleri: okuma paneli, yazma, ayarlar, kurallar, takvim,
 * rehber ve hosting. Aynı katmanda sonra geldiği için üsttekileri tamamlar.
 * ----------------------------------------------------------------------- */
@layer otellum {
    .hidden { display: none !important; }
    .ot-spacer { flex: 1 1 auto; }
    .nowrap { white-space: nowrap; }
    .right { text-align: right; }

    .ot-spinner {
        width: 22px;
        height: 22px;
        border: 2.5px solid var(--ot-border);
        border-top-color: var(--ot-primary);
        border-radius: 50%;
        animation: ot-spin .7s linear infinite;
        margin: 18px auto;
    }

    @keyframes ot-spin { to { transform: rotate(360deg); } }

    .ot-grid-2 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 14px;
    }

    .ot-card-foot {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 18px;
        border-top: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
        border-radius: 0 0 var(--ot-radius-lg) var(--ot-radius-lg);
    }

    .ot-card-body.no-pad { padding: 0; }
    .ot-card-head h2, .ot-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }

    .ot-btn.ghost.sm, .ot-btn.sm.ghost { padding: 4px 9px; }
    .ot-icon-btn.sm { width: 28px; height: 28px; }

    .ot-input.flat {
        border-color: transparent;
        background: transparent;
    }
    .ot-input.flat:focus { border-color: var(--ot-primary); background: var(--ot-surface); }
    .ot-input.sm { padding: 5px 9px; font-size: 13px; }
    .ot-input.grow { flex: 1 1 auto; min-width: 120px; }

    .ot-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13.5px;
    }
    .ot-table th {
        text-align: left;
        font-size: 11.5px;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--ot-text-muted);
        padding: 10px 14px;
        border-bottom: 1px solid var(--ot-border);
    }
    .ot-table td {
        padding: 11px 14px;
        border-bottom: 1px solid var(--ot-border-soft);
        vertical-align: middle;
    }
    .ot-table tr:last-child td { border-bottom: 0; }
    .ot-table td.empty {
        text-align: center;
        color: var(--ot-text-muted);
        padding: 26px;
    }

    .ot-menu.up { bottom: calc(100% + 6px); top: auto; }
    .ot-menu-field { display: flex; gap: 6px; padding: 8px 10px; }
    .ot-menu-field .ot-input { flex: 1; }
    .ot-menu button.is-danger, .ot-menu a.is-danger { color: var(--ot-danger); }

    .ot-modal-card.lg { max-width: 900px; width: 92vw; }
    .ot-modal-body.preview { padding: 0; background: var(--ot-surface-3); }
    .ot-modal-body.preview img { display: block; max-width: 100%; margin: 0 auto; }
    .ot-modal-body.preview iframe { width: 100%; height: 70vh; border: 0; }

    /* ---------------------------------------------------------- posta listesi */

    .mail-row.is-picked { background: var(--ot-primary-soft); }
    .mail-row.is-cursor { box-shadow: inset 2px 0 0 var(--ot-primary); }
    .mail-row .when { font-variant-numeric: tabular-nums; }

    .mail-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: inline-grid;
        place-items: center;
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        font-weight: 700;
        font-size: 14px;
        flex: 0 0 auto;
    }
    .mail-avatar.sm { width: 26px; height: 26px; font-size: 11px; }

    .mail-pager {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 14px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .mail-pager a, .mail-pager span.is-on {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        border-radius: 8px;
        display: inline-grid;
        place-items: center;
        font-size: 13px;
        font-weight: 600;
        color: var(--ot-text-soft);
        text-decoration: none;
        border: 1px solid transparent;
    }
    .mail-pager a:hover { background: var(--ot-surface-3); }
    .mail-pager span.is-on {
        background: var(--ot-primary);
        color: #fff;
    }
    .mail-pager .gap { color: var(--ot-text-muted); font-size: 12.5px; padding: 0 4px; }

    /* ------------------------------------------------------------ okuma paneli */

    .mail-msg {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 20px 24px 40px;
        overflow-y: auto;
        height: 100%;
    }
    .mail-msg-head { display: flex; flex-direction: column; gap: 12px; }
    .mail-msg-title {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }
    .mail-msg-title h2 {
        margin: 0;
        font-size: 19px;
        font-weight: 700;
        line-height: 1.35;
        flex: 1 1 260px;
    }
    .mail-msg-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
    .mail-msg-meta { display: flex; align-items: flex-start; gap: 12px; }
    .mail-msg-who { flex: 1; min-width: 0; }
    .mail-msg-who .n { font-weight: 650; font-size: 14px; }
    .mail-msg-who .a {
        font-size: 12.5px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mail-msg-date { font-size: 12.5px; color: var(--ot-text-muted); white-space: nowrap; }

    .mail-remote {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: var(--ot-radius);
        background: var(--ot-warning-soft);
        color: var(--ot-warning);
        font-size: 13px;
    }

    .mail-atts {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius);
        overflow: hidden;
    }
    .mail-atts-head {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 9px 12px;
        background: var(--ot-surface-2);
        border-bottom: 1px solid var(--ot-border-soft);
        font-size: 12.5px;
        color: var(--ot-text-soft);
        font-weight: 600;
    }
    .mail-atts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 8px;
        padding: 10px;
    }
    .mail-att, .compose-att {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 8px 10px;
        border: 1px solid var(--ot-border-soft);
        border-radius: 9px;
        background: var(--ot-surface);
    }
    .mail-att-ico {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
        flex: 0 0 auto;
    }
    .mail-att-info { flex: 1; min-width: 0; }
    .mail-att-info .n {
        font-size: 12.8px;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mail-att-info .s { font-size: 11.5px; color: var(--ot-text-muted); }

    .mail-body {
        font-size: 14.5px;
        line-height: 1.65;
        color: var(--ot-text);
        overflow-wrap: anywhere;
    }
    .mail-body img { max-width: 100%; height: auto; }
    .mail-body a { color: var(--ot-primary-strong); }
    .mail-body blockquote {
        border-left: 3px solid var(--ot-border);
        margin: 10px 0;
        padding: 2px 0 2px 14px;
        color: var(--ot-text-soft);
    }
    .mail-body table { max-width: 100%; }
    .mail-body pre {
        background: var(--ot-surface-3);
        padding: 10px 12px;
        border-radius: 8px;
        overflow-x: auto;
    }

    .mail-thread-row {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 12px;
        background: none;
        border: 0;
        cursor: pointer;
        text-align: left;
        color: inherit;
        font: inherit;
    }
    .mail-thread-row:hover { background: var(--ot-surface-2); }
    .mail-thread-row .who { font-weight: 620; font-size: 13px; white-space: nowrap; }
    .mail-thread-row .subj {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mail-thread-row time { font-size: 12px; color: var(--ot-text-muted); }
    .mail-thread-body {
        padding: 4px 14px 16px 48px;
        font-size: 13.8px;
        line-height: 1.6;
        border-bottom: 1px solid var(--ot-border-soft);
    }
    .mail-thread-body img { max-width: 100%; }

    .mail-quick-reply { display: flex; gap: 8px; flex-wrap: wrap; }

    /* --------------------------------------------------------------- yazma */

    .compose { position: relative; max-width: 960px; margin: 0 auto; }
    .compose-card {
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        box-shadow: var(--ot-shadow-sm);
        overflow: hidden;
    }
    .compose-head {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
    }
    .compose-state { font-size: 12px; color: var(--ot-text-muted); }

    .compose-fields { padding: 4px 16px; }
    .compose-row {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid var(--ot-border-soft);
        padding: 2px 0;
    }
    .compose-row > span:first-child {
        width: 92px;
        flex: 0 0 92px;
        font-size: 12.5px;
        color: var(--ot-text-muted);
        font-weight: 600;
    }
    .compose-row .ot-input { flex: 1; min-width: 0; }
    .compose-static { font-size: 13.5px; padding: 9px 0; }
    .compose-toggle {
        background: none;
        border: 0;
        color: var(--ot-primary-strong);
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
    }
    .compose-sug {
        position: absolute;
        top: 100%;
        left: 92px;
        right: 0;
        z-index: 30;
        background: var(--ot-surface);
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius);
        box-shadow: var(--ot-shadow);
        overflow: hidden;
    }
    .compose-sug button {
        display: block;
        width: 100%;
        text-align: left;
        padding: 8px 12px;
        border: 0;
        background: none;
        font-size: 13px;
        cursor: pointer;
        color: var(--ot-text);
    }
    .compose-sug button:hover, .compose-sug button.is-on { background: var(--ot-primary-soft); }

    .editor-bar {
        display: flex;
        align-items: center;
        gap: 2px;
        flex-wrap: wrap;
        padding: 8px 12px;
        border-bottom: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
    }
    .editor-sep {
        width: 1px;
        height: 20px;
        background: var(--ot-border);
        margin: 0 5px;
    }
    .editor-select {
        height: 28px;
        border: 1px solid var(--ot-border);
        border-radius: 7px;
        background: var(--ot-surface);
        color: var(--ot-text);
        font-size: 12.5px;
        padding: 0 6px;
    }
    .editor-colors {
        display: grid;
        grid-template-columns: repeat(4, 26px);
        gap: 6px;
        padding: 10px;
    }
    .editor-colors button {
        width: 26px;
        height: 26px;
        border-radius: 7px;
        border: 1px solid rgba(0, 0, 0, .12);
        cursor: pointer;
    }

    .editor {
        min-height: 300px;
        padding: 18px 20px;
        font-size: 14.5px;
        line-height: 1.65;
        outline: none;
        overflow-y: auto;
    }
    .editor.sm { min-height: 110px; padding: 12px 14px; border: 1px solid var(--ot-border); border-radius: var(--ot-radius); }
    .editor:focus { background: var(--ot-surface); }
    .editor img { max-width: 100%; height: auto; }
    .editor blockquote {
        border-left: 3px solid var(--ot-border);
        padding-left: 12px;
        color: var(--ot-text-soft);
        margin: 8px 0;
    }
    .editor pre {
        background: var(--ot-surface-3);
        padding: 10px 12px;
        border-radius: 8px;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 13px;
    }
    .editor .otellum-imza { color: var(--ot-text-soft); }

    .compose-atts { padding: 0 16px 12px; }
    .compose-atts-head {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        color: var(--ot-text-soft);
        padding: 8px 0;
    }
    .compose-limit { color: var(--ot-text-muted); font-size: 11.5px; }
    .compose-limit.is-over { color: var(--ot-danger); font-weight: 600; }
    .compose-atts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 8px;
    }

    .compose-foot {
        display: flex;
        align-items: center;
        gap: 9px;
        flex-wrap: wrap;
        padding: 14px 16px;
        border-top: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
    }

    .compose-queue {
        margin-top: 16px;
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        overflow: hidden;
        background: var(--ot-surface);
    }
    .compose-queue-head {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 10px 14px;
        background: var(--ot-surface-2);
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-soft);
        border-bottom: 1px solid var(--ot-border-soft);
    }
    .compose-queue-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        border-bottom: 1px solid var(--ot-border-soft);
    }
    .compose-queue-row:last-child { border-bottom: 0; }
    .compose-queue-row .n { font-size: 13.5px; font-weight: 600; }
    .compose-queue-row .s { font-size: 12px; color: var(--ot-text-muted); }
    .compose-queue-row > div:first-child { flex: 1; min-width: 0; }

    .compose-drop {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: grid;
        place-items: center;
        background: rgba(249, 115, 22, .1);
        backdrop-filter: blur(2px);
    }
    .compose-drop > div {
        background: var(--ot-surface);
        border: 2px dashed var(--ot-primary);
        border-radius: var(--ot-radius-lg);
        padding: 40px 60px;
        text-align: center;
        color: var(--ot-primary-strong);
        font-weight: 600;
        display: grid;
        gap: 10px;
        justify-items: center;
    }

    /* -------------------------------------------------------------- ayarlar */

    .sig-item {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        margin-bottom: 14px;
        overflow: hidden;
    }
    .sig-item-head {
        display: flex;
        align-items: center;
        gap: 9px;
        flex-wrap: wrap;
        padding: 10px 12px;
        background: var(--ot-surface-2);
        border-bottom: 1px solid var(--ot-border-soft);
    }
    .sig-item-head .ot-input { width: auto; flex: 1 1 160px; }
    .sig-toolbar {
        display: flex;
        gap: 2px;
        padding: 6px 10px 0;
    }
    .sig-item .editor.sm { margin: 8px 12px 12px; border-color: var(--ot-border-soft); }

    .label-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid var(--ot-border-soft);
    }
    .label-row .ot-input[type="text"] { flex: 1; }
    .label-row select { width: 130px; }
    .label-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }

    .vac-preview { margin-top: 16px; }
    .vac-mail {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius);
        padding: 14px 16px;
        background: var(--ot-surface-2);
    }
    .vac-mail .s { font-weight: 700; margin-bottom: 6px; }
    .vac-mail .b { white-space: pre-wrap; font-size: 13.5px; color: var(--ot-text-soft); }

    .pw-meter { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-size: 12px; color: var(--ot-text-muted); }
    .pw-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--ot-surface-3); overflow: hidden; }
    .pw-bar > div { height: 100%; transition: width .2s; }
    .pw-bar .is-low { background: var(--ot-danger); }
    .pw-bar .is-mid { background: #f59e0b; }
    .pw-bar .is-ok { background: var(--ot-success); }

    .setup-grid { display: grid; gap: 8px; }
    .setup-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--ot-border-soft);
        border-radius: var(--ot-radius);
        background: var(--ot-surface-2);
        flex-wrap: wrap;
    }
    .setup-row .k { width: 150px; font-size: 12.5px; font-weight: 600; color: var(--ot-text-soft); }
    .setup-row code { flex: 1; min-width: 180px; font-size: 13px; user-select: all; overflow-wrap: anywhere; }
    .setup-row .n { font-size: 11.5px; color: var(--ot-text-muted); }
    .setup-steps { margin: 0; padding-left: 18px; font-size: 13.2px; line-height: 1.75; color: var(--ot-text-soft); }

    /* -------------------------------------------------------------- kurallar */

    .rule {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        margin-bottom: 10px;
        background: var(--ot-surface);
        overflow: hidden;
    }
    .rule.is-off { opacity: .58; }
    .rule-head {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 9px 12px;
        background: var(--ot-surface-2);
        flex-wrap: wrap;
    }
    .rule-head .rule-name { width: 170px; flex: 0 0 auto; font-weight: 620; }
    .rule-sum {
        flex: 1;
        min-width: 140px;
        font-size: 12.3px;
        color: var(--ot-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .rule-body {
        padding: 12px 14px 14px;
        border-top: 1px solid var(--ot-border-soft);
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .rule-line {
        display: flex;
        align-items: center;
        gap: 7px;
        flex-wrap: wrap;
        width: 100%;
    }
    .rule-lbl {
        width: 62px;
        flex: 0 0 62px;
        font-size: 12px;
        color: var(--ot-text-muted);
        text-align: right;
    }
    .rule-empty, .cal-empty {
        display: grid;
        justify-items: center;
        gap: 10px;
        padding: 42px 20px;
        color: var(--ot-text-muted);
        font-size: 13.5px;
    }

    .policy-add { display: flex; gap: 8px; margin: 10px 0 14px; }
    .policy-add .ot-input { flex: 1; }
    .policy-list { display: grid; gap: 4px; }
    .policy-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 10px;
        border-radius: 8px;
        background: var(--ot-surface-2);
    }
    .policy-row code { flex: 1; font-size: 12.8px; }

    /* --------------------------------------------------------------- takvim */

    .cal { display: flex; flex-direction: column; height: 100%; min-height: 0; }
    .cal-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
        flex-wrap: wrap;
    }
    .cal-bar .cal-title { margin: 0; font-size: 16px; font-weight: 700; }
    .cal-views {
        display: inline-flex;
        border: 1px solid var(--ot-border);
        border-radius: 9px;
        overflow: hidden;
    }
    .cal-views button {
        border: 0;
        background: var(--ot-surface);
        color: var(--ot-text-soft);
        font-size: 12.5px;
        font-weight: 600;
        padding: 6px 12px;
        cursor: pointer;
    }
    .cal-views button + button { border-left: 1px solid var(--ot-border); }
    .cal-views button.is-on { background: var(--ot-primary); color: #fff; }
    .cal-loading { padding: 8px; }

    .cal-month { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    .cal-dow {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface-2);
    }
    .cal-dow > div {
        padding: 7px 10px;
        font-size: 11.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--ot-text-muted);
    }
    .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-auto-rows: minmax(92px, 1fr);
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }
    .cal-cell {
        border-right: 1px solid var(--ot-border-soft);
        border-bottom: 1px solid var(--ot-border-soft);
        padding: 5px 6px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }
    .cal-cell.is-other { background: var(--ot-surface-2); }
    .cal-cell.is-other .cal-cell-day { color: var(--ot-text-muted); }
    .cal-cell-day { font-size: 12px; font-weight: 650; color: var(--ot-text-soft); }
    .cal-cell.is-today .cal-cell-day {
        background: var(--ot-primary);
        color: #fff;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: grid;
        place-items: center;
    }
    .cal-chip {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 2px 6px;
        border-radius: 6px;
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        font-size: 11.8px;
        font-weight: 600;
        cursor: pointer;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .cal-chip.is-allday { background: var(--ot-info-soft); color: var(--ot-info); }
    .cal-chip .t { opacity: .75; font-variant-numeric: tabular-nums; }
    .cal-more { font-size: 11px; color: var(--ot-text-muted); cursor: pointer; padding-left: 4px; }

    .cal-time { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    .cal-time-head {
        display: flex;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface-2);
    }
    .cal-time-head .cal-gutter { width: 58px; flex: 0 0 58px; }
    .cal-time-day {
        flex: 1;
        text-align: center;
        padding: 7px 4px;
        font-size: 12px;
        color: var(--ot-text-muted);
        border-left: 1px solid var(--ot-border-soft);
    }
    .cal-time-day strong { display: block; font-size: 16px; color: var(--ot-text); }
    .cal-time-day.is-today strong { color: var(--ot-primary-strong); }
    .cal-time-body { display: flex; flex: 1; min-height: 0; overflow-y: auto; }
    .cal-time-body .cal-gutter { width: 58px; flex: 0 0 58px; }
    .cal-hour, .cal-slot { height: 46px; border-bottom: 1px solid var(--ot-border-soft); }
    .cal-hour {
        font-size: 10.5px;
        color: var(--ot-text-muted);
        text-align: right;
        padding-right: 7px;
    }
    .cal-col { flex: 1; position: relative; border-left: 1px solid var(--ot-border-soft); }
    .cal-block {
        position: absolute;
        left: 3px;
        right: 3px;
        border-radius: 7px;
        background: var(--ot-primary);
        color: #fff;
        padding: 3px 7px;
        font-size: 11.5px;
        overflow: hidden;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        line-height: 1.35;
    }
    .cal-block strong { font-weight: 650; }
    .cal-block span { opacity: .85; }

    .cal-agenda { flex: 1; overflow-y: auto; padding: 12px 16px 40px; }
    .cal-agenda-day { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ot-border-soft); }
    .cal-agenda-day .d {
        width: 150px;
        flex: 0 0 150px;
        font-size: 12.8px;
        font-weight: 700;
        color: var(--ot-text-soft);
    }
    .cal-agenda-day .l { flex: 1; display: grid; gap: 4px; }
    .cal-agenda-row {
        display: flex;
        gap: 12px;
        align-items: baseline;
        width: 100%;
        text-align: left;
        border: 0;
        background: none;
        cursor: pointer;
        padding: 6px 8px;
        border-radius: 8px;
        color: inherit;
        font: inherit;
    }
    .cal-agenda-row:hover { background: var(--ot-surface-2); }
    .cal-agenda-row .t { width: 105px; flex: 0 0 105px; font-size: 12.3px; color: var(--ot-text-muted); font-variant-numeric: tabular-nums; }
    .cal-agenda-row .n { flex: 1; font-size: 13.6px; font-weight: 600; }
    .cal-agenda-row .p { font-size: 12px; color: var(--ot-text-muted); }

    /* --------------------------------------------------------------- rehber */

    .ab { display: flex; flex-direction: column; height: 100%; min-height: 0; }
    .ab-bar {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 10px 16px;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
    }
    .ab-bar .mail-search-box { max-width: 340px; flex: 1; }
    .ab-panes { display: flex; flex: 1; min-height: 0; }
    .ab-groups {
        width: 220px;
        flex: 0 0 220px;
        border-right: 1px solid var(--ot-border);
        padding: 12px 10px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow-y: auto;
    }
    .ab-groups button {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 10px;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--ot-text-soft);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
    }
    .ab-groups button span:last-child { margin-left: auto; color: var(--ot-text-muted); font-size: 11.5px; }
    .ab-groups button:hover { background: var(--ot-surface-2); }
    .ab-groups button.is-on { background: var(--ot-primary-soft); color: var(--ot-primary-strong); }
    .ab-list {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 14px 16px 40px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 10px;
        align-content: start;
    }
    .ab-card {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 11px 13px;
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        background: var(--ot-surface);
        cursor: pointer;
    }
    .ab-card:hover { border-color: var(--ot-primary); box-shadow: var(--ot-shadow-sm); }
    .ab-info { flex: 1; min-width: 0; }
    .ab-info .n { font-size: 13.8px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ab-info .e, .ab-info .o { font-size: 12.2px; color: var(--ot-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ab-actions { display: flex; gap: 2px; }

    /* -------------------------------------------------------------- hosting */

    .host-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
        margin-bottom: 18px;
    }
    .host-stat {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        background: var(--ot-surface);
        color: var(--ot-primary-strong);
    }
    .host-stat strong { display: block; font-size: 18px; color: var(--ot-text); line-height: 1.2; }
    .host-stat span { font-size: 12px; color: var(--ot-text-muted); }

    .host-preview {
        font-size: 20px;
        font-weight: 800;
        letter-spacing: -.01em;
        color: var(--ot-primary-strong);
        margin-bottom: 14px;
        overflow-wrap: anywhere;
    }
    .host-preview i { color: var(--ot-text-muted); font-style: normal; }

    .host-form {
        display: flex;
        align-items: flex-end;
        gap: 12px;
        flex-wrap: wrap;
    }
    .host-form > label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 190px; }
    .host-pw { display: flex; gap: 6px; }
    .host-pw .ot-input { flex: 1; }
    .host-suffix { display: flex; align-items: center; gap: 4px; }
    .host-suffix .ot-input { flex: 1; min-width: 90px; }
    .host-suffix i { font-style: normal; font-size: 13px; color: var(--ot-text-muted); white-space: nowrap; }

    .host-section { font-size: 14px; font-weight: 700; margin: 24px 0 10px; }
    .host-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 14px;
    }
    .host-card {
        border: 1px solid var(--ot-border);
        border-radius: var(--ot-radius-lg);
        background: var(--ot-surface);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .host-card-head {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 13px 15px 8px;
    }
    .host-card-head a {
        font-size: 15px;
        font-weight: 700;
        color: var(--ot-text);
        text-decoration: none;
        flex: 1;
        overflow-wrap: anywhere;
    }
    .host-card-head a:hover { color: var(--ot-primary-strong); }
    .host-card-badges { display: flex; gap: 6px; padding: 0 15px 10px; flex-wrap: wrap; }
    .host-quota { padding: 0 15px 12px; display: grid; gap: 5px; }
    .host-quota.wide { padding: 0 0 16px; max-width: 420px; }
    .host-quota span { font-size: 11.5px; color: var(--ot-text-muted); }
    .ot-quota-bar.sm { height: 4px; margin-bottom: 3px; }
    .host-boxes { list-style: none; margin: 0; padding: 0 0 6px; border-top: 1px solid var(--ot-border-soft); flex: 1; }
    .host-boxes li {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 15px;
        font-size: 12.8px;
    }
    .host-boxes a { color: inherit; text-decoration: none; flex: 1; overflow-wrap: anywhere; }
    .host-boxes a:hover { color: var(--ot-primary-strong); }
    .host-boxes li.more a { color: var(--ot-primary-strong); font-weight: 600; }
    .host-empty { padding: 16px 15px; color: var(--ot-text-muted); font-size: 12.8px; border-top: 1px solid var(--ot-border-soft); flex: 1; }
    .host-card-foot {
        display: flex;
        gap: 8px;
        padding: 11px 15px;
        border-top: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
    }

    .host-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
    .host-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 800; }
    .host-head-sub {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 6px;
        font-size: 12.5px;
        color: var(--ot-text-muted);
    }

    .dns-list { display: grid; gap: 10px; }
    .dns-row {
        border: 1px solid var(--ot-border);
        border-left: 3px solid var(--ot-border);
        border-radius: var(--ot-radius);
        padding: 11px 13px;
        background: var(--ot-surface-2);
    }
    .dns-row.is-ok { border-left-color: var(--ot-success); }
    .dns-row.is-yok { border-left-color: var(--ot-danger); }
    .dns-row.is-farkli { border-left-color: #f59e0b; }
    .dns-top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
    .dns-tip {
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: .05em;
        padding: 2px 7px;
        border-radius: 5px;
        background: var(--ot-surface-3);
        color: var(--ot-text-soft);
    }
    .dns-ad { font-size: 12.8px; font-weight: 600; overflow-wrap: anywhere; }
    .dns-state { font-size: 11.5px; font-weight: 700; }
    .dns-row.is-ok .dns-state { color: var(--ot-success); }
    .dns-row.is-yok .dns-state { color: var(--ot-danger); }
    .dns-row.is-farkli .dns-state { color: #b45309; }
    .dns-val {
        display: block;
        font-size: 12.4px;
        background: var(--ot-surface);
        border: 1px solid var(--ot-border-soft);
        border-radius: 7px;
        padding: 7px 9px;
        user-select: all;
        overflow-wrap: anywhere;
    }
    .dns-note { font-size: 11.5px; color: var(--ot-text-muted); margin-top: 5px; }
    .dns-found { font-size: 11.5px; color: var(--ot-text-muted); margin-top: 5px; overflow-wrap: anywhere; }

    @media (max-width: 900px) {
        .ab-groups { display: none; }
        .cal-agenda-day { flex-direction: column; gap: 4px; }
        .cal-agenda-day .d { width: auto; flex: none; }
        .compose-row { flex-wrap: wrap; }
        .compose-sug { left: 0; }
        .rule-lbl { text-align: left; }
    }
}

/* ==========================================================================
   Outlook tarzı şerit, yoğunluk modları, yan panel ve konuşma görünümü.
   Bu katman posta ekranının düzenini belirler; üstteki temel kuralları ezer.
   ========================================================================== */
@layer otellum {

    /* ------------------------------------------------------------- şerit */

    .mail-ribbon {
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
        flex: 0 0 auto;
    }

    .rb-tabs {
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 4px 10px 0;
    }

    .rb-tabs > button {
        appearance: none;
        border: 0;
        background: transparent;
        padding: 5px 11px;
        border-radius: 7px 7px 0 0;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-muted);
        cursor: pointer;
        position: relative;
    }
    .rb-tabs > button:hover { color: var(--ot-text); background: var(--ot-surface-2); }
    .rb-tabs > button.is-on { color: var(--ot-primary-strong); background: var(--ot-surface-2); }
    .rb-tabs > button.is-on::after {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 0;
        height: 2px;
        background: var(--ot-primary);
        border-radius: 2px;
    }

    .rb-tabs .mail-search { margin-left: auto; }
    .rb-collapse { margin-left: 2px; }

    /* Şerit gövdesi tek satırlık kompakt bir araç çubuğudur: gruplar ince
       ayraçlarla ayrılır, düğmeler ikon + etiket olarak yan yana dizilir. */
    .rb-body {
        display: flex;
        align-items: center;
        gap: 0;
        padding: 4px 8px;
        background: var(--ot-surface-2);
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .rb-body::-webkit-scrollbar { height: 5px; }

    .rb-group {
        display: flex;
        align-items: center;
        padding: 0 6px;
        border-right: 1px solid var(--ot-border-soft);
        flex: 0 0 auto;
    }
    .rb-group:last-child { border-right: 0; }

    .rb-items { display: flex; align-items: center; gap: 1px; }

    /* Grup başlıkları kompakt şeritte gizlenir; gruplama ayraçtan okunur. */
    .rb-title { display: none; }

    .rb-stack { display: flex; align-items: center; gap: 1px; }

    .rb-btn,
    a.rb-btn,
    .rb-mini,
    a.rb-mini {
        appearance: none;
        border: 1px solid transparent;
        background: transparent;
        border-radius: 7px;
        height: 30px;
        padding: 0 9px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        color: var(--ot-text-soft);
        text-decoration: none;
        font-size: 12.5px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
    }
    .rb-btn svg,
    .rb-mini svg { flex: 0 0 auto; opacity: .85; }

    .rb-btn:hover:not(:disabled),
    .rb-mini:hover:not(:disabled) { background: var(--ot-surface-3); color: var(--ot-text); }
    .rb-btn:hover svg,
    .rb-mini:hover svg { opacity: 1; }

    .rb-btn.is-on,
    .rb-mini.is-on {
        background: var(--ot-primary-soft);
        color: var(--ot-primary-strong);
        border-color: var(--ot-primary-ring);
    }
    .rb-btn:disabled,
    .rb-mini:disabled { opacity: .35; cursor: default; }
    .rb-mini.is-danger { color: var(--ot-danger, #e5484d); }

    .rb-group .ot-drop { display: flex; }

    /* Dar ekranda etiketler düşer, ikonlar kalır. */
    @media (max-width: 1320px) {
        .rb-stack .rb-mini span { display: none; }
        .rb-stack .rb-mini { padding: 0 7px; }
    }

    /* ------------------------------------------------------- seçim şeridi */

    .mail-selbar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 14px;
        background: var(--ot-primary-soft);
        border-bottom: 1px solid var(--ot-border);
        flex-wrap: wrap;
        flex: 0 0 auto;
    }

    /* ----------------------------------------------- sahne ve okuma bölmesi */

    .mail-stage {
        flex: 1 1 auto;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
    }
    .mail-shell.has-side .mail-stage { grid-template-columns: 1fr 292px; }

    .mail-panes { min-width: 0; }
    .mail-list-wrap {
        display: flex;
        flex-direction: column;
        min-height: 0;
        min-width: 0;
        border-right: 1px solid var(--ot-border);
    }
    .mail-list { border-right: 0; flex: 1 1 auto; }

    /* Okuma bölmesi sağda (varsayılan) */
    .mail-shell.pane-sag .mail-panes {
        grid-template-columns: minmax(320px, 420px) 1fr;
        grid-template-rows: 1fr;
    }

    /* Okuma bölmesi altta */
    .mail-shell.pane-alt .mail-panes {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(160px, 45%) 1fr;
    }
    .mail-shell.pane-alt .mail-list-wrap { border-right: 0; border-bottom: 1px solid var(--ot-border); }

    /* Okuma bölmesi kapalı: liste tam genişlik, ileti seçilince yerini alır */
    .mail-shell.pane-kapali .mail-panes { grid-template-columns: 1fr; grid-template-rows: 1fr; }
    .mail-shell.pane-kapali .mail-read { display: none; }
    .mail-shell.pane-kapali .mail-list-wrap { border-right: 0; }
    .mail-shell.pane-kapali.is-reading .mail-list-wrap { display: none; }
    .mail-shell.pane-kapali.is-reading .mail-read { display: flex; }

    /* --------------------------------------------- öncelikli / diğer sekmesi */

    .mail-tabs {
        display: flex;
        gap: 2px;
        padding: 6px 10px 0;
        border-bottom: 1px solid var(--ot-border);
        background: var(--ot-surface);
        flex: 0 0 auto;
    }
    .mail-tabs a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-muted);
        text-decoration: none;
        border-bottom: 2px solid transparent;
    }
    .mail-tabs a:hover { color: var(--ot-text); }
    .mail-tabs a.is-on { color: var(--ot-primary-strong); border-bottom-color: var(--ot-primary); }
    .mail-tabs .n {
        font-size: 10.5px;
        padding: 1px 6px;
        border-radius: 999px;
        background: var(--ot-surface-3);
        color: var(--ot-text-muted);
    }
    .mail-tabs a.is-on .n { background: var(--ot-primary-soft); color: var(--ot-primary-strong); }

    /* -------------------------------------------------------- liste satırı */

    .mail-row { align-items: flex-start; }
    .mail-row-main { display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
    .mail-row-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
    .mail-row-top .who { min-width: 0; }
    .mail-row-side {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        padding-top: 2px;
    }

    .mail-thread-n {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        flex: 0 0 auto;
        font-size: 10.5px;
        font-weight: 700;
        padding: 1px 5px;
        border-radius: 999px;
        background: var(--ot-surface-3);
        color: var(--ot-text-muted);
    }

    /* Gönderene göre sabit renk; --h satırda üretilir. */
    .mail-avatar {
        background: hsl(var(--h, 210) 70% 92%);
        color: hsl(var(--h, 210) 62% 32%);
        letter-spacing: .01em;
    }
    .dark .mail-avatar {
        background: hsl(var(--h, 210) 42% 24%);
        color: hsl(var(--h, 210) 78% 82%);
    }
    .mail-row .mail-avatar { width: 34px; height: 34px; font-size: 12.5px; }
    .mail-shell:not(.has-avatar) .mail-row .mail-avatar { display: none; }
    .mail-shell:not(.has-snippet) .mail-row .snippet { display: none; }

    /* Satır üstü hızlı işlemler */
    .mail-row-quick {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        display: none;
        align-items: center;
        gap: 2px;
        padding: 2px;
        border-radius: 8px;
        background: var(--ot-surface);
        box-shadow: 0 2px 10px rgb(0 0 0 / .14);
    }
    .mail-row:hover .mail-row-quick { display: flex; }
    .mail-row-quick button {
        appearance: none;
        border: 0;
        background: transparent;
        width: 27px;
        height: 27px;
        border-radius: 6px;
        display: grid;
        place-items: center;
        cursor: pointer;
        color: var(--ot-text-muted);
    }
    .mail-row-quick button:hover { background: var(--ot-surface-3); color: var(--ot-text); }
    .mail-row-quick button.is-danger:hover { background: color-mix(in srgb, var(--ot-danger, #e5484d) 14%, transparent); color: var(--ot-danger, #e5484d); }
    @media (hover: none) { .mail-row-quick { display: none !important; } }

    /* Sürükle-bırak */
    body.is-dragging-mail .mail-row { cursor: grabbing; }
    .ot-nav a.is-drop {
        background: var(--ot-primary-soft) !important;
        outline: 2px dashed var(--ot-primary);
        outline-offset: -2px;
    }

    .mail-more { display: flex; justify-content: center; padding: 8px 0; }
    .mail-more:empty { padding: 0; }

    /* ------------------------------------------------------ yoğunluk modu */

    .mail-shell.dens-rahat .mail-row { padding: 11px 12px; }
    .mail-shell.dens-rahat .mail-row-main .snippet {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        white-space: normal;
    }

    .mail-shell.dens-sik .mail-row { padding: 4px 12px; align-items: center; }
    .mail-shell.dens-sik .mail-row-main { flex-direction: row; align-items: baseline; gap: 8px; }
    .mail-shell.dens-sik .mail-row-main .who { flex: 0 0 150px; }
    .mail-shell.dens-sik .mail-row-main .subj { flex: 1 1 auto; }
    .mail-shell.dens-sik .mail-row .snippet,
    .mail-shell.dens-sik .mail-row .mail-avatar,
    .mail-shell.dens-sik .mail-row-tags { display: none; }
    .mail-shell.dens-sik .mail-row-side { padding-top: 0; }

    /* ---------------------------------------------------------- yan panel */

    .mail-side {
        border-left: 1px solid var(--ot-border);
        background: var(--ot-surface);
        overflow-y: auto;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-width: 0;
    }

    .mside-card {
        border: 1px solid var(--ot-border);
        border-radius: 10px;
        background: var(--ot-surface-2);
        padding: 9px;
    }

    .mside-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        font-size: 12.5px;
        margin-bottom: 7px;
    }
    .mside-head strong { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; }

    .mside-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
    .mside-cal-h {
        text-align: center;
        font-size: 10px;
        font-weight: 700;
        color: var(--ot-text-muted);
        padding-bottom: 3px;
    }
    .mside-cal button {
        appearance: none;
        border: 0;
        background: transparent;
        aspect-ratio: 1;
        border-radius: 6px;
        font-size: 11.5px;
        color: var(--ot-text-soft);
        cursor: pointer;
        position: relative;
    }
    .mside-cal button:hover { background: var(--ot-surface-3); }
    .mside-cal button.is-out { opacity: .32; }
    .mside-cal button.is-today { font-weight: 800; color: var(--ot-primary-strong); }
    .mside-cal button.is-on { background: var(--ot-primary); color: #fff; }
    .mside-cal button.has-dot::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 3px;
        width: 3px;
        height: 3px;
        border-radius: 50%;
        transform: translateX(-50%);
        background: var(--ot-primary);
    }
    .mside-cal button.is-on.has-dot::after { background: #fff; }

    .mside-agenda { margin-top: 8px; border-top: 1px solid var(--ot-border-soft); padding-top: 7px; }
    .mside-sub { font-size: 11px; font-weight: 700; color: var(--ot-text-muted); margin-bottom: 5px; }
    .mside-ev {
        display: flex;
        gap: 7px;
        padding: 5px 6px;
        border-radius: 7px;
        text-decoration: none;
        font-size: 12px;
        color: var(--ot-text-soft);
    }
    .mside-ev:hover { background: var(--ot-surface-3); }
    .mside-ev-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--ot-primary-strong); font-weight: 650; }
    .mside-ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mside-mini-empty { font-size: 11.5px; color: var(--ot-text-muted); padding: 5px 2px; }

    .mside-add { display: flex; gap: 5px; margin-bottom: 7px; }
    .mside-add .ot-input { flex: 1 1 auto; min-width: 0; font-size: 12.5px; padding: 6px 8px; }

    .mside-tasks { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; }
    .mside-task {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 5px 6px;
        border-radius: 7px;
        font-size: 12.5px;
        cursor: pointer;
    }
    .mside-task:hover { background: var(--ot-surface-3); }
    .mside-task span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
    .mside-task input { accent-color: var(--ot-primary); }
    .mside-task.is-done span { text-decoration: line-through; color: var(--ot-text-muted); }
    .mside-task .ot-icon-btn { width: 22px; height: 22px; opacity: 0; }
    .mside-task:hover .ot-icon-btn { opacity: 1; }

    /* ------------------------------------------------- okuma: ek bileşenler */

    .mail-unsub {
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 0 18px 10px;
        padding: 9px 12px;
        border-radius: 9px;
        font-size: 12.5px;
        background: var(--ot-surface-3);
        border: 1px solid var(--ot-border);
        color: var(--ot-text-soft);
    }
    .mail-unsub span { flex: 1 1 auto; }

    /* Katlanmış alıntı: Gmail'deki "…" düğmesi */
    .mail-quote-fold { margin-top: 10px; }
    .mail-quote-btn {
        appearance: none;
        border: 1px solid var(--ot-border);
        background: var(--ot-surface-3);
        border-radius: 6px;
        padding: 3px 9px;
        display: inline-flex;
        gap: 3px;
        align-items: center;
        cursor: pointer;
    }
    .mail-quote-btn span { width: 3px; height: 3px; border-radius: 50%; background: var(--ot-text-muted); }
    .mail-quote-btn:hover { background: var(--ot-surface-2); }
    .mail-quote-btn.is-on { background: var(--ot-primary-soft); border-color: var(--ot-primary-ring); }
    .mail-quote-body { margin-top: 8px; }

    /* Konuşma zinciri kartları */
    .mail-thread-head { display: flex; align-items: center; gap: 8px; }
    .mail-thread-head span { flex: 1 1 auto; }
    .mail-thread-item.is-open { background: var(--ot-surface); border-radius: 9px; }
    .mail-thread-row .subj { color: var(--ot-text-muted); }
    .mail-thread-item.is-open .mail-thread-row svg:last-child { transform: rotate(180deg); }
    .mail-thread-foot { display: flex; gap: 6px; padding: 0 12px 10px; }

    /* Sekmeli hızlı yanıt */
    .mail-qr {
        margin: 12px 18px 18px;
        border: 1px solid var(--ot-border);
        border-radius: 12px;
        background: var(--ot-surface);
        overflow: hidden;
    }
    .mail-qr-tabs {
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 6px 8px;
        border-bottom: 1px solid var(--ot-border-soft);
        background: var(--ot-surface-2);
    }
    .mail-qr-tabs .sp { flex: 1 1 auto; }
    .mail-qr-tabs > button {
        appearance: none;
        border: 0;
        background: transparent;
        padding: 6px 11px;
        border-radius: 7px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ot-text-muted);
        cursor: pointer;
    }
    .mail-qr-tabs > button:hover { background: var(--ot-surface-3); color: var(--ot-text); }
    .mail-qr-tabs > button.is-on { background: var(--ot-primary-soft); color: var(--ot-primary-strong); }

    .mail-qr-form { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
    .mail-qr-to { display: flex; align-items: center; gap: 8px; }
    .mail-qr-to > span { font-size: 12px; font-weight: 650; color: var(--ot-text-muted); flex: 0 0 auto; }
    .mail-qr-to .ot-input { flex: 1 1 auto; }
    .mail-qr-form textarea { resize: vertical; min-height: 78px; }
    .mail-qr-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }

    /* ----------------------------------------------------------- duyarlı */

    @media (max-width: 1180px) {
        .mail-shell.has-side .mail-stage { grid-template-columns: 1fr; }
        .mail-side { display: none !important; }
    }

    @media (max-width: 940px) {
        .rb-body { padding: 4px 6px; }
        .rb-group { padding: 0 4px; }
        .rb-btn span, .rb-mini span { display: none; }
        .rb-btn, .rb-mini { padding: 0 8px; }
        .mail-shell.pane-sag .mail-panes,
        .mail-shell.pane-alt .mail-panes { grid-template-columns: 1fr; grid-template-rows: 1fr; }
        .mail-panes .mail-read { display: none; }
        .mail-shell.is-reading .mail-list-wrap { display: none; }
        .mail-shell.is-reading .mail-panes .mail-read { display: flex; }
        .mail-qr, .mail-unsub { margin-left: 10px; margin-right: 10px; }
    }
}
