/* =================================================================
   xlate-modern.css — UI modernization overrides
   Loaded LAST to override tabs.css, search.css, table.css, etc.
   ================================================================= */

/* ===== RESET FIXED BODY WIDTH (tabs.css sets 1825px) ===== */
body {
    width: auto !important;
    max-width: 100%;
    padding: 0 15px 5px;
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: #333;
}

/* ===== NAVBAR ===== */
.navbar-xlate {
    background-color: #2c3e50;
    border: none;
    border-radius: 0;
    margin-bottom: 15px;
    min-height: 40px;
}
.navbar-xlate .navbar-brand {
    color: #ecf0f1;
    padding: 5px 15px;
    height: 40px;
    font-size: 16px;
    font-weight: 600;
}
.navbar-xlate .navbar-brand:hover {
    color: #fff;
}
.navbar-xlate .navbar-brand img {
    display: inline-block;
    height: 30px;
    margin-right: 8px;
    vertical-align: middle;
}
.navbar-xlate .navbar-nav > li > a {
    color: #bdc3c7;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
}
.navbar-xlate .navbar-nav > li > a:hover,
.navbar-xlate .navbar-nav > li > a:focus {
    color: #fff;
    background-color: #34495e;
}
.navbar-xlate .navbar-nav > .active > a,
.navbar-xlate .navbar-nav > .active > a:hover,
.navbar-xlate .navbar-nav > .active > a:focus {
    color: #fff;
    background-color: #1abc9c;
}
.navbar-xlate .navbar-right .navbar-text {
    color: #bdc3c7;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}
.navbar-xlate .navbar-right a.sign-out {
    color: #e74c3c;
}
.navbar-xlate .navbar-right a.sign-out:hover {
    color: #fff;
    background-color: #c0392b;
}
.navbar-xlate .navbar-toggle {
    border-color: #5d6d7e;
    margin-top: 3px;
    margin-bottom: 3px;
}
.navbar-xlate .navbar-toggle .icon-bar {
    background-color: #bdc3c7;
}
.navbar-xlate .navbar-collapse {
    border-color: #34495e;
}

/* ===== ENVIRONMENT BADGE ===== */
.env-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.env-badge-production { background: #e74c3c; color: #fff; }
.env-badge-sandbox { background: #3498db; color: #fff; }
.env-badge-development { background: #f39c12; color: #fff; }

/* ===== HIDE OLD TAB MENU ===== */
#menu { display: none !important; }

/* ===== TABLE HEADER NORMALIZATION ===== */
thead[bgcolor],
thead[style*="background-color:#007700"],
thead[style*="background-color: #007700"],
thead[bgcolor="#0000AA"],
thead[bgcolor="#4d4d4d"] {
    background-color: #2c3e50 !important;
}
thead[bgcolor] th,
thead[style*="007700"] th,
thead[style*="0000AA"] th,
thead[style*="4d4d4d"] th {
    background-color: inherit !important;
}

/* ===== RESPONSIVE TABLE WRAPPER ===== */
.table-responsive-xlate {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}
#table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== FIXED WIDTH OVERRIDES ===== */
.parentTable {
    width: 100% !important;
    max-width: 100%;
}
#body {
    width: auto !important;
}

/* ===== PANELS ===== */
.panel { border-radius: 2px; }
.panel-heading { border-radius: 2px 2px 0 0; }

/* ===== FORMS ===== */
.btn { border-radius: 3px; }
input[type="date"] { min-height: 30px; }
.form-control { border-radius: 3px; }

/* ===== ALTERNATING ROW NORMALIZATION ===== */
.table-striped > tbody > tr:nth-child(even) > td,
.table-striped > tbody > tr:nth-child(even) > th {
    background-color: #ecf0f1;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background-color: #d5dbdb;
}

/* ===== LINKS ===== */
a { color: #2980b9; }
a:hover { color: #1a5276; }

/* ===== MOBILE BREAKPOINTS ===== */
@media (max-width: 991px) {
    body { padding: 0 5px 5px; }
    .third-column { margin-left: 0 !important; }
    .fourth-column { margin-left: 0 !important; }
    .reportTable { font-size: 11px; }
    .reportTable tbody { height: auto !important; overflow-y: visible !important; }
}
@media (max-width: 767px) {
    .navbar-xlate .navbar-brand { font-size: 14px; }
    .btn-trans { width: auto; min-width: 140px; }
    #change_status { width: auto; }
    .col-md-6, .col-md-3, .col-md-2 {
        margin-bottom: 10px;
    }
}

/* ===== TRANSACTION DETAILS INFO ICON ===== */
.txn-info-icon { color: #2980b9; cursor: pointer; margin-left: 4px; font-size: 11px; }
.txn-info-icon:hover { color: #1a5276; }

/* ===== COLUMN COPY ICON + POPUP MENU ===== */
.copy-col-icon { color: rgba(255,255,255,0.6); cursor: pointer; margin-left: 6px; font-size: 11px; }
.copy-col-icon:hover { color: #fff; }
.column-copy-menu {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    padding: 4px 0;
    min-width: 220px;
    font-size: 13px;
}
.column-copy-menu .column-copy-menu-title {
    padding: 6px 12px 4px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}
.column-copy-menu .column-copy-menu-item {
    display: block;
    padding: 8px 12px;
    color: #2c3e50;
    text-decoration: none;
    cursor: pointer;
}
.column-copy-menu .column-copy-menu-item:hover {
    background: #ecf0f1;
    color: #1a5276;
    text-decoration: none;
}
.column-copy-menu .column-copy-menu-toggle {
    display: block;
    padding: 6px 12px;
    margin: 0;
    color: #2c3e50;
    cursor: pointer;
    font-weight: normal;
    border-bottom: 1px solid #eee;
    user-select: none;
}
.column-copy-menu .column-copy-menu-toggle.is-disabled {
    color: #95a5a6;
    cursor: not-allowed;
}
.column-copy-menu .column-copy-menu-toggle input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: middle;
}
.column-copy-menu .column-copy-menu-hint {
    color: #7f8c8d;
    font-size: 11px;
    margin-left: 4px;
}
