/* App Container Base */
.tbm-app-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 600px;
    margin: 15px auto;
    padding: 0 5px;
    box-sizing: border-box;
}

/* Horizontal Swipable Pill Tabs */
.tbm-pills-wrapper {
    margin-bottom: 12px;
    overflow: hidden;
}

.tbm-pills-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tbm-pills-scroll::-webkit-scrollbar {
    display: none;
}

.tbm-pill-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tbm-pill-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Tab Display */
.tbm-tab-content { 
    display: none; 
}
.tbm-tab-content.active { 
    display: block; 
}

/* 6 Batch Height Limit + Vertical Scroll */
.tbm-table-scroll-container {
    max-height: 410px; /* Header + 6 Rows */
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

/* Slim Custom Scrollbar */
.tbm-table-scroll-container::-webkit-scrollbar {
    width: 5px;
}
.tbm-table-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Strict Table Layout */
.tbm-compact-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* Sticky Header Styling */
.tbm-compact-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tbm-compact-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.tbm-compact-table tr:last-child {
    border-bottom: none;
}

.tbm-compact-table td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Column 1: Date Badge */
.tbm-col-date {
    width: 70px;
    text-align: left;
}

.tbm-date-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 8px;
    border-radius: 8px;
    text-align: center;
    display: inline-block;
    min-width: 48px;
}

.tbm-date-badge .tbm-day {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    display: block;
}

.tbm-date-badge .tbm-month {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 2px;
    display: block;
}

/* Column 2: Status Indicator */
.tbm-col-status {
    text-align: left;
}

.tbm-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tbm-status-text {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.tbm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-green { background-color: #10b981; }
.dot-orange { background-color: #f59e0b; }
.dot-red { background-color: #ef4444; }
.dot-grey { background-color: #94a3b8; }

/* Column 3: Action Button */
.tbm-col-action {
    text-align: right;
    width: 95px;
}

.tbm-action-btn {
    background: #25D366;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.tbm-action-btn:hover:not(.disabled) {
    background: #128C7E;
}

.tbm-action-btn.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Modal UI */
.tbm-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tbm-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    padding: 20px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.tbm-modal-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #0f172a;
}

.tbm-modal-header p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.tbm-close-btn {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8fafc;
}

.tbm-form-group {
    margin-top: 12px;
}

.tbm-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.tbm-form-group input, 
.tbm-form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    box-sizing: border-box;
    outline: none;
}

.tbm-submit-btn {
    width: 100%;
    background: #25D366;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}