/* ============================
   CLEAN, MODERN MAIL GATEWAY UI
   ============================ */

/* Layout: two cards side by side */
.mg-card-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 20px;
}

.mg-card-row > div {
    flex: 1;
    min-width: 0; /* prevents overflow */
}

/* Card styling */
.mg-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mg-card h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #003366;
}

/* Tables */
.mg-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 10px;
}

.mg-table th,
.mg-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
}

.mg-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    color: #003366;
}

.mg-table tr:hover {
    background: #f7f9fb;
}

.mg-table-empty {
    padding: 10px;
    font-style: italic;
    color: #666;
}

/* Buttons inside tables */
.mg-button-secondary,
.mg-button-danger {
    display: inline-block;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.2;
    margin: 0;
}

/* Prevent long emails from breaking layout */
.mg-table td:first-child {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Right-align actions column */
.mg-table td:last-child,
.mg-table th:last-child {
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

/* Responsive: stack cards vertically */
@media (max-width: 800px) {
    .mg-card-row {
        flex-direction: column;
    }
}