/* MailGuard Common Responsive Styles */
:root { --primary: #2c3e50; --danger: #e74c3c; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f6fa; }
.sidebar { min-height: 100vh; background: var(--primary); color: white; position: fixed; width: 220px; top: 0; left: 0; z-index: 1000; overflow-y: auto; }
.sidebar a { color: rgba(255,255,255,0.8); padding: 12px 20px; display: block; text-decoration: none; border-radius: 5px; margin: 2px 10px; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.2); color: white; }
.top-bar { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; }
.modal-body { max-height: 70vh; overflow-y: auto; }
.header-row { font-family: monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.content-wrapper { margin-left: 220px; }

/* Mobile Toggle */
.mobile-toggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 1001; }

/* Responsive */
@media (max-width: 991px) {
    .sidebar { position: fixed; left: -220px; transition: left 0.3s; }
    .sidebar.show { left: 0; }
    .content-wrapper { margin-left: 0; }
    .mobile-toggle { display: block; }
}

@media (max-width: 768px) {
    .table-responsive { overflow-x: auto; }
    .card-header .d-flex { flex-direction: column; gap: 8px; }
    .card-header .d-flex > div { width: 100%; }
    .col-md-2, .col-md-3, .col-md-4, .col-md-6 { margin-bottom: 10px; }
    .modal-dialog { margin: 10px; }
    h4 { font-size: 1.25rem; }
}

@media (max-width: 576px) {
    .sidebar { width: 200px; }
    .sidebar a { padding: 10px 15px; font-size: 14px; }
    .btn-sm { font-size: 12px; padding: 4px 8px; }
    table { font-size: 12px; }
}

/* Tables */
.table { width: 100%; margin-bottom: 0; table-layout: auto; }
.table td, .table th { vertical-align: middle; padding: 6px; }
.table-sm td, .table-sm th { padding: 0.4rem; }
.table td { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td:last-child { white-space: nowrap; }
.table td.long-text { white-space: normal; max-width: none; }

/* Cards */
.card { margin-bottom: 1rem; }
.card-header { background: #f8f9fa; border-bottom: 1px solid #dee2e6; }

/* Badges */
.badge { font-size: 11px; padding: 3px 6px; }

/* Action buttons */
.action-buttons .btn { padding: 4px 8px; margin: 0 2px; }
.action-buttons .dropdown { display: inline-block; position: relative; }
.action-buttons .dropdown-menu { position: absolute; z-index: 1000; }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-toggle::after { display: inline-block; margin-left: 0.255em; vertical-align: 0.255em; content: ""; border-top: 0.3em; border-right: 0.3em solid transparent; border-left: 0.3em solid transparent; }
.btn-group .dropdown-toggle::after { display: none; }