/* Table Container */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	background: white;
}

/* Very Simple Table Styles */
.ss-tbl {
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
    font-size: 14px;
    background: white;}
/* Table Header */
.ss-tbl thead,
.ss-tbl caption {
    background-color: royalblue;
    color: white;}
.ss-tbl th {
    padding: 2px 2px;
    text-align: left;}
.ss-tbl td {
    padding: 2px 3px;
	vertical-align: top;
}

/* Event Table Styles */
.event-tbl {
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
    font-size: 16px;
	font-weight: bold;
    background: white;}
/* Table Header */
.event-tbl th {
    padding: 2px 2px;
    text-align: left;}
.event-tbl td {
    padding-right: 4px;
	vertical-align: top;
}


/* Simple Table Styles */
.s-tbl {
    width: 100%;
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
    font-size: 14px;
    background: white;
    min-width: 100%; /* Ensure table takes full width */
}

/* Table Header */
.s-tbl thead,
.s-tbl caption {
    background-color: royalblue; /*#2c3e50;*/
    color: white;
	font-size: 20px;
	font-weight: 600;
}

.s-tbl th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid #34495e;
    white-space: nowrap;
}

/* Fixed width columns (first n-1 columns) */
.s-tbl th.fixed-col,
.s-tbl td.fixed-col {
    width: 120px; /* Default fixed width */
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Last column - takes remaining width */
.s-tbl th.auto-col,
.s-tbl td.auto-col {
    width: auto;
    min-width: 200px; /* Minimum width for last column */
}

/* Table Body */
.s-tbl td {
    padding: 6px 10px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: top;
}

/* Zebra Striping - Odd Rows */
.s-tbl tbody tr:nth-child(odd),
.s-tbl tbody tr:nth-child(even) {
    background-color: #ffffee;
}


/* Main Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
    font-size: 14px;
    background: white;
    min-width: 100%; /* Ensure table takes full width */
}

/* Table Header */
.data-table thead {
    background-color: #2c3e50; /*royalblue;*/
    color: white;
}

/* Table Caption */
.data-table caption {
    background-color: royalblue; /*#2c3e50;*/
    color: white;
	font-size: 20px;
	font-weight: 600;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid #34495e;
    white-space: nowrap;
}

/* Fixed width columns (first n-1 columns) */
.data-table th.fixed-col,
.data-table td.fixed-col {
    width: 120px; /* Default fixed width */
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific fixed widths for different columns */
.data-table th.fixed-col-small,
.data-table td.fixed-col-small {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
}

.data-table th.fixed-col-medium,
.data-table td.fixed-col-medium {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.data-table th.fixed-col-large,
.data-table td.fixed-col-large {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

/* Last column - takes remaining width */
.data-table th.auto-col,
.data-table td.auto-col {
    width: auto;
    min-width: 180px; /* Minimum width for last column */
}

/* Table Body */
.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: top;
}

/* Zebra Striping - Odd Rows */
.data-table tbody tr:nth-child(odd) {
    background-color: #ffffff; /*#eeffee; */
}

.data-table tbody tr:nth-child(odd):hover {
    background-color: #ffffff; /* #ddffdd; /*#f8f9fa;*/
}

/* Zebra Striping - Even Rows */
.data-table tbody tr:nth-child(even) {
    background-color: #f2f2f2; /*#f8f9fa;*/
}

.data-table tbody tr:nth-child(even):hover {
    background-color: #f2f2f2; /*#e9ecef;*/
}

/* Hover Effects */
.data-table tbody tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

/* Table Footer */
.data-table tfoot {
    background-color: #34495e;
    color: white;
    font-weight: 600;
}

.data-table tfoot td {
    padding: 12px 15px;
    border-top: 2px solid #2c3e50;
}

/* Enhanced Table Styles */
.enhanced-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.enhanced-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.enhanced-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    border: none;
    position: relative;
}

.enhanced-table th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255,255,255,0.3);
}

.enhanced-table th:last-child::after {
    display: none;
}

/* Fixed columns with different sizes */
.enhanced-table .col-80 { width: 80px; min-width: 80px; max-width: 80px; }
.enhanced-table .col-100 { width: 100px; min-width: 100px; max-width: 100px; }
.enhanced-table .col-120 { width: 120px; min-width: 120px; max-width: 120px; }
.enhanced-table .col-150 { width: 150px; min-width: 150px; max-width: 150px; }
.enhanced-table .col-200 { width: 200px; min-width: 200px; max-width: 200px; }

/* Auto column */
.enhanced-table .col-auto { 
    width: auto; 
    min-width: 180px;
}

.enhanced-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/* Enhanced zebra striping */
.enhanced-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.enhanced-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.enhanced-table tbody tr:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    transform: translateX(2px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Status indicators */
.status-active {
    color: #27ae60;
    font-weight: 600;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 600;
}

.status-pending {
    color: #f39c12;
    font-weight: 600;
}


/* Mobile Responsive Table */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.responsive-table thead {
    background-color: #2c3e50;
    color: white;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Fixed columns */
.responsive-table .fixed-col {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.responsive-table .auto-col {
    width: auto;
    min-width: 150px;
}

/* Zebra striping */
.responsive-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.responsive-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.responsive-table tbody tr:hover {
    background-color: #e3f2fd;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .table-container {
        border-radius: 4px;
        font-size: 13px;
    }
    
    .responsive-table th,
    .responsive-table td {
        padding: 10px 12px;
    }
    
    .responsive-table .fixed-col {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
        font-size: 12px;
    }
    
    .responsive-table .auto-col {
        min-width: 120px;
    }
}

@media screen and (max-width: 480px) {
    .responsive-table th,
    .responsive-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .responsive-table .fixed-col {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
    }
}