html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body { margin: 0; padding: 0; }

/* Sidebar */
#wrapper { min-height: 100vh; }

.sidebar {
    width: 220px;
    min-height: 100vh;
    position: relative;
    flex-shrink: 0;
    transition: width 0.2s;
}

.sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-link {
    display: block;
    padding: 8px 12px;
    color: #adb5bd;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }

#content-wrapper { min-width: 0; }

/* Mail akış kartları */
.mail-kart {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
    background: #f8f9fa;
}
.mail-kart.gelen { border-left-color: #0d6efd; }
.mail-kart.giden { border-left-color: #198754; }

.mail-html-frame {
    display: block;
    width: 100%;
    min-height: 320px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
}

.mail-text-content {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    font-family: inherit;
    font-size: 0.875rem;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
}

.dashboard-stat-card {
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-stat-card:hover,
.dashboard-stat-card:focus {
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

/* Durum badge'leri */
.durum-Yeni { background-color: #6c757d; }
.durum-Iletisimde { background-color: #0dcaf0; color: #000; }
.durum-TeklifGonderildi { background-color: #0d6efd; }
.durum-Sicak { background-color: #fd7e14; }
.durum-OdemeBekleniyor { background-color: #ffc107; color: #000; }
.durum-OlumsuzDonusYapmadi { background-color: #dc3545; }
.durum-Basarili { background-color: #198754; }
.durum-Olumsuz { background-color: #343a40; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .sidebar.open { width: 220px; position: fixed; z-index: 1000; height: 100vh; }

    main {
        padding: 1rem !important;
    }

    .accordion-button {
        align-items: flex-start;
    }

    .accordion-button .d-flex {
        flex-direction: column;
        gap: 4px;
    }

    .accordion-body {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .mail-kart {
        padding: 8px;
    }

    .mail-html-frame {
        min-height: 420px;
    }
}
