.shella-public-tracker-box, .shella-dashboard-container {
    max-width: 900px;
    margin: 30px auto;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.shella-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.shella-input-group {
    margin-bottom: 16px;
}

.shella-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1B2A4A;
}

.shella-input-group input, 
.shella-input-group select, 
.shella-input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.shella-track-btn, .shella-btn-primary {
    background: #0693E3;
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.shella-track-btn:hover, .shella-btn-primary:hover {
    background: #1B2A4A;
}

.shella-btn-secondary {
    background: #F1F5F9;
    color: #1E293B;
    border: 1px solid #CBD5E1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Metrics & Table */
.shella-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.metric-card {
    background: #F8FAFC;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    text-align: center;
}

.metric-card strong { display: block; font-size: 1.4rem; color: #1B2A4A; }
.metric-card.warning strong { color: #EAB308; }
.metric-card.success strong { color: #22C55E; }

.shella-table-wrapper { overflow-x: auto; }
.shella-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.shella-table th, .shella-table td {
    padding: 12px;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
    font-size: 0.9rem;
}

.shella-table th { background: #F8FAFC; color: #475569; }

/* Status Badges */
.shella-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    background: #E2E8F0;
    color: #334155;
}

.pay-badge.pay-paid { color: #16A34A; font-weight: bold; }
.pay-badge.pay-unpaid { color: #DC2626; font-weight: bold; }

/* Progress Bar & Timeline */
.shella-progress-bar-wrap {
    height: 10px;
    background: #E2E8F0;
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
}

.shella-progress-bar-fill {
    height: 100%;
    background: #22C55E;
    width: 0%;
    transition: width 0.4s ease;
}

.shella-timeline-wrap { margin-top: 15px; }
.shella-timeline-item {
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #0693E3;
}

/* Modal Overlay */
.shella-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shella-modal-content {
    background: #FFF;
    padding: 28px;
    border-radius: 12px;
    width: 580px;
    max-width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute; right: 20px; top: 15px;
    font-size: 1.5rem; cursor: pointer; color: #64748B;
}

.shella-error-msg {
    color: #DC2626;
    background: #FEF2F2;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
}

/* How To Card */
.shella-how-to-card {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.shella-how-to-card h4 {
    margin: 0 0 8px 0;
    color: #0369A1;
    font-size: 0.95rem;
}

.shella-guide-steps {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Search Form Flexbox */
.shella-input-with-button {
    display: flex;
    gap: 10px;
}

.shella-input-with-button input {
    flex: 1;
}

.shella-subtext {
    color: #64748B;
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

/* Details Grid */
.shella-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    background: #F8FAFC;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    margin: 18px 0;
}

/* Progress Stepper */
.shella-progress-section {
    margin: 20px 0;
}

.shella-stepper-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 6px;
    font-weight: 600;
}

.shella-stepper-labels span.active {
    color: #0693E3;
}

/* Timeline & Live Images */
.shella-timeline-item {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #0693E3;
    margin-bottom: 20px;
}

.shella-timeline-item p {
    margin: 4px 0 8px 0;
    color: #334155;
}

/* Image Thumbnail Box */
.shella-timeline-photo {
    margin-top: 10px;
}

.shella-timeline-photo img {
    max-width: 240px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid #CBD5E1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.shella-timeline-photo img:hover {
    transform: scale(1.03);
}

.shella-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 12px;
}

.shella-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1E293B;
}

.shella-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 15px;
    border-top: 1px solid #E2E8F0;
}

.shella-btn-cancel {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #CBD5E1;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.shella-btn-cancel:hover {
    background: #E2E8F0;
    color: #334155;
}

/* Read-only Invoice Input */
.shella-readonly-input {
    background-color: #F1F5F9;
    color: #0369A1;
    font-weight: bold;
    letter-spacing: 0.5px;
    border: 1px solid #BAE6FD;
}

/* Barcode Styling in Table & Cards */
.shella-inv-text {
    display: block;
    font-size: 0.88rem;
    color: #1E293B;
    margin-bottom: 4px;
}

.shella-barcode-wrapper {
    margin-top: 4px;
    padding: 4px;
    background: #FFFFFF;
    display: inline-block;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
}

.shella-barcode-wrapper svg {
    display: block;
    max-width: 180px;
    height: auto;
}

/* QR Code Container Styling */
.shella-qrcode-wrapper {
    margin-top: 6px;
    padding: 4px;
    background: #FFFFFF;
    display: inline-block;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    width: 64px;
    height: 64px;
    box-sizing: content-box;
}

/* Force QR image and canvas to fill container */
.js-qrcode {
    width: 64px !important;
    height: 64px !important;
    display: block;
}

.js-qrcode canvas,
.js-qrcode img {
    width: 64px !important;
    height: 64px !important;
    display: block !important;
    margin: 0 auto;
}

/* Modal QR Preview */
.shella-qrcode-preview-card {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
    min-height: 130px;
}

#modal-qrcode-preview img,
#modal-qrcode-preview canvas {
    display: block;
    margin: 0 auto;
    width: 110px !important;
    height: 110px !important;
}