/* ============================================================
   SCANTRANX UI SYSTEM
   Shared reusable styles across JSP pages
   ============================================================ */

/* ---------- BASE ---------- */
body {
    background: #f5f7fb;
    color: #142033;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ---------- UTILITIES ---------- */
.stx-flex {
    display: flex;
    align-items: center;
}

.stx-space-between {
    justify-content: space-between;
}

.stx-wrap {
    flex-wrap: wrap;
}

.stx-gap-sm {
    gap: 8px;
}
.stx-gap-md {
    gap: 12px;
}
.stx-gap-lg {
    gap: 18px;
}

.stx-mb-sm {
    margin-bottom: 10px;
}
.stx-mb-md {
    margin-bottom: 16px;
}
.stx-mb-lg {
    margin-bottom: 24px;
}

.stx-text-center {
    text-align: center;
}

/* ---------- BUTTONS ---------- */
.stx-btn {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.stx-btn-primary {
    background: #1dbc60;
    color: #ffffff;
}

.stx-btn-primary:hover {
    background: #17a553;
}

.stx-btn-secondary {
    background: #ffffff;
    color: #0f2747;
    border: 1px solid #dbe4ef;
}

.stx-btn-secondary:hover {
    background: #f7fafc;
}

.stx-btn-orange {
    background: #ff8c00;
    color: #ffffff;
}

.stx-btn-blue {
    background: #007ac2;
    color: #ffffff;
}

.stx-btn-orange:hover {
    background: #e67e00;
}

.stx-btn-outline {
    background: #ffffff;
    color: #0f2747;
    border: 1px solid #dbe4ef;
}

.stx-btn-outline:hover {
    background: #f7fafc;
}

/* ---------- TOOLBAR ---------- */
.stx-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- GRID SYSTEM ---------- */
.stx-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stx-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stx-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* ---------- SHARED CARDS ---------- */
.stx-card {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(17, 32, 59, 0.05);
    box-sizing: border-box;
}

.stx-card-hover {
    transition: all 0.2s ease;
}

.stx-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(17, 32, 59, 0.10);
    border-color: #cddbef;
}

/* ---------- FILTER CARD ---------- */
.stx-filter-card {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 14px;
    box-sizing: border-box;
}

.stx-filter-card label {
    font-size: 12px;
    font-weight: 700;
    color: #6b778c;
    display: block;
}

.stx-filter-card input,
.stx-filter-card select {
    width: 100%;
    height: 32px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    padding: 4px 8px;
    box-sizing: border-box;
}

.stx-filter-card button,
.stx-filter-card .stx-btn {
    margin-top: 10px;
}

/* ---------- MENU / SETTINGS CARDS ---------- */
.stx-menu-card {
    display: block;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(17, 32, 59, 0.05);
    box-sizing: border-box;
}

.stx-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(17, 32, 59, 0.10);
    border-color: #cddbef;
}

.stx-menu-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #f2f7fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid #e4edf8;
}

.stx-menu-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.stx-menu-title {
    font-size: 13px;
    font-weight: 700;
    color: #142033;
    letter-spacing: 0.4px;
}

/* ---------- DIVIDER ---------- */
.stx-divider {
    margin: 20px 0;
    border-top: 1px solid #e5eaf2;
}

/* ---------- TABLES ---------- */
.stx-table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.stx-table,
.stx-table table,
.CSSTableGenerator {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff;
}

.CSSTableGenerator thead th,
.stx-table thead th {
    background: #f7f9fc !important;
    color: #5a667a !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #e8edf5 !important;
    padding: 12px !important;
}

.CSSTableGenerator tbody td,
.stx-table tbody td {
    padding: 12px !important;
    border-bottom: 1px solid #eef2f7 !important;
    color: #1d2b3c;
    font-size: 13px;
}

.CSSTableGenerator tbody tr:hover,
.stx-table tbody tr:hover {
    background: #fafcff;
}

/* ---------- EMPTY STATES ---------- */
.stx-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fbfcfe;
    border: 1px dashed #d7e1ee;
    border-radius: 16px;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.stx-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #142033;
    margin-bottom: 8px;
}

.stx-empty-text {
    font-size: 14px;
    color: #6b778c;
    max-width: 420px;
    line-height: 1.5;
}

.stx-footer-total {
    font-weight: 700;
    color: #142033;
    background: #fbfcfe;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .stx-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .stx-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stx-grid-4,
    .stx-grid-3,
    .stx-grid-2 {
        grid-template-columns: 1fr;
    }

    .stx-toolbar {
        justify-content: flex-start;
    }
}