/* ==========================================================
   PostfixAdmin 4.0.5
   Responsive Widescreen & Global Layout Rules
   ========================================================== */

/* ----------------------------------------------------------
   1. Widescreen Layout for Admin Tables & Main Content
   ---------------------------------------------------------- */

/* Force Bootstrap containers to use 95% of screen width on overview/admin pages */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    width: 95% !important;
    max-width: none !important;
}

/* Full width for main content sections */
main,
.content,
.container-fluid {
    width: 100%;
}

/* ----------------------------------------------------------
   2. Login Page Fix (#login)
   ---------------------------------------------------------- */

/* 
 * Exception for the Login Box:
 * Prevents #login from expanding to 95% screen width.
 * Centers the login card with a fixed maximum width.
 */
#login,
div#login {
    max-width: 420px !important; /* Overrides broad container width */
    width: 100% !important;
    margin: 3rem auto !important; /* Center horizontally and add top/bottom spacing */
}

/* ----------------------------------------------------------
   3. Dynamic & Flexible Tables Setup
   ---------------------------------------------------------- */

/* Enable fixed table-layout so column widths are strictly enforced */
#admin_table,
#mailbox_table {
    width: 100%;
    table-layout: fixed; /* Changed from 'auto' to 'fixed' for strict width distribution */
}

/* Horizontal scroll wrapper when screen width is insufficient */
.domain-list-scroll,
.mailbox-list-scroll,
.virtual-list-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/* Flexible content columns (domain, description, mailbox) */
#admin_table th.list-col-domain,
#admin_table td.list-col-domain {
    min-width: 250px;
    width: auto; /* Takes up remaining table space */
}

#admin_table th.list-col-description,
#admin_table td.list-col-description {
    min-width: 180px;
    width: auto;
}

#mailbox_table td:first-child,
#mailbox_table th:first-child {
    min-width: 300px;
    width: auto;
}

/* ----------------------------------------------------------
   4. Fixed Technical Columns
   ---------------------------------------------------------- */

/* Aliases count */
#admin_table th.list-col-aliases_quot,
#admin_table td.list-col-aliases_quot {
    width: 90px;
    text-align: center;
}

/* Mailboxes count */
#admin_table th.list-col-mailboxes_quot,
#admin_table td.list-col-mailboxes_quot {
    width: 90px;
    text-align: center;
}

/* Quota */
#admin_table th.list-col-maxquota,
#admin_table td.list-col-maxquota {
    width: 80px;
    text-align: center;
}

/* Total Quota */
#admin_table th.list-col-total_quot,
#admin_table td.list-col-total_quot {
    width: 140px;
    text-align: center;
}

/* Transport */
#admin_table th.list-col-transport,
#admin_table td.list-col-transport {
    width: 80px;
    text-align: center;
}

/* Backup MX */
#admin_table th.list-col-backupmx,
#admin_table td.list-col-backupmx {
    width: 60px;
    text-align: center;
}

/* Active status */
#admin_table th.list-col-active,
#admin_table td.list-col-active {
    width: 60px;
    text-align: center;
}

/* Password expiry */
#admin_table th.list-col-password_expiry,
#admin_table td.list-col-password_expiry {
    width: 80px;
    text-align: center;
}

/* Action icons */
#admin_table th.list-col-action,
#admin_table td.list-col-action {
    width: 46px;
    text-align: center;
}

.list-action-icon {
    width: 34px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}
