/* Zero Gravity Safety - Client Portal, Client Account & Survey Styling */
:root {
    --zgt-primary: #0f172a;
    --zgt-primary-dark: #0f172a;
    --zgt-primary-light: #1e293b;
    --zgt-accent: #d97706;
    --zgt-accent-hover: #b45309;
    --zgt-success: #10b981;
    --zgt-warning: #f59e0b;
    --zgt-error: #ef4444;
    --zgt-danger: #ef4444;
    --zgt-surface: #f8fafc;
    --zgt-bg: #f8fafc;
    --zgt-card-bg: #ffffff;
    --zgt-text: #1e293b;
    --zgt-text-muted: #64748b;
    --zgt-border: #e2e8f0;
    --zgt-radius: 8px;
    --zgt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --zgt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
    --zgt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Accessibility Focus Ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--zgt-accent);
    outline-offset: 2px;
}

body.zgt-portal-body {
    background-color: var(--zgt-bg);
    color: var(--zgt-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
}

.zgt-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.zgt-portal-header {
    background-color: var(--zgt-primary-dark);
    color: #ffffff;
    padding: 16px 0;
    box-shadow: var(--zgt-shadow-md);
}
.zgt-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.zgt-brand .zgt-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
}
.zgt-brand .zgt-tagline {
    font-size: 0.8rem;
    color: var(--zgt-accent);
    font-weight: 500;
}
.zgt-header-contact {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #cbd5e1;
}
.zgt-header-contact a {
    color: #ffffff;
    text-decoration: none;
}
.zgt-btn-acct-link {
    background: #334155 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-right: 12px;
    transition: background-color 0.2s ease;
}
.zgt-btn-acct-link:hover {
    background: #475569 !important;
}
.zgt-divider {
    margin: 0 8px;
    color: #475569;
}

/* Main */
.zgt-portal-main {
    margin-top: 24px;
}

/* Cards */
.zgt-card {
    background: var(--zgt-card-bg);
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--zgt-shadow-sm);
}
.zgt-card-title {
    font-size: 1.15rem;
    color: var(--zgt-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

/* Error Card */
.zgt-error-card {
    text-align: center;
    padding: 40px 20px;
}
.zgt-card-icon {
    font-size: 3rem;
    color: var(--zgt-warning);
    margin-bottom: 12px;
}
.zgt-help-box {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.875rem;
    display: inline-block;
}

/* Summary Banner */
.zgt-summary-banner {
    background: linear-gradient(135deg, var(--zgt-primary-dark) 0%, var(--zgt-primary-light) 100%);
    color: #ffffff;
    border: none;
    box-shadow: var(--zgt-shadow-md);
}
.zgt-banner-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.zgt-badge-ref {
    background: var(--zgt-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 6px;
}
.zgt-status-pill {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    background: #334155;
    color: #f1f5f9;
    letter-spacing: 0.5px;
}
.status-completed { background: var(--zgt-success) !important; color: #ffffff !important; }
.status-booked { background: #0284c7 !important; color: #ffffff !important; }
.status-in_progress { background: #0284c7 !important; color: #ffffff !important; }
.status-awaiting_sign_off { background: var(--zgt-warning) !important; color: #ffffff !important; }
.status-pending_booking { background: var(--zgt-accent) !important; color: #ffffff !important; }
.status-cancelled { background: var(--zgt-error) !important; color: #ffffff !important; }

.zgt-job-title {
    font-size: 1.5rem;
    margin-top: 8px;
    color: #ffffff;
    font-weight: 700;
}
.zgt-banner-meta {
    font-size: 0.9rem;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Stepper */
.zgt-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 10px;
}
.zgt-stepper::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #334155;
    z-index: 1;
}
.zgt-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.zgt-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #334155;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid #1e293b;
    transition: all 0.2s ease;
}
.zgt-step-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}
.zgt-step.active .zgt-step-num {
    background: var(--zgt-accent);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
}
.zgt-step.active .zgt-step-label { color: #ffffff; }
.zgt-step.completed .zgt-step-num {
    background: var(--zgt-success);
    color: #ffffff;
    border-color: #ffffff;
}
.zgt-step.completed .zgt-step-label { color: #a7f3d0; }

/* Tabs Nav */
.zgt-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--zgt-border);
    padding-bottom: 2px;
    overflow-x: auto;
}
.zgt-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--zgt-text-muted);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.zgt-tab-btn:hover {
    color: var(--zgt-primary);
    background: #f1f5f9;
}
.zgt-tab-btn.active {
    color: var(--zgt-accent);
    border-bottom: 3px solid var(--zgt-accent);
    background: #fffbeb;
}
.zgt-tab-btn.tab-highlight {
    background: #ecfdf5;
    color: var(--zgt-success);
}

.zgt-tab-content { display: none; }
.zgt-tab-content.active { display: block; animation: zgtFadeIn 0.2s ease-out; }

@keyframes zgtFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Schedule Confirmation Cards */
.zgt-schedule-confirm-card {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: var(--zgt-radius);
    padding: 20px;
    margin-bottom: 20px;
}
.zgt-schedule-confirm-card.pending {
    background: #fffbeb;
    border-color: #fde68a;
}
.zgt-schedule-confirm-card.rescheduled {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.zgt-schedule-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.zgt-schedule-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.zgt-schedule-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.zgt-schedule-title.success { color: #166534; }
.zgt-schedule-title.pending { color: #92400e; }
.zgt-schedule-title.rescheduled { color: #1e40af; }
.zgt-schedule-text {
    margin: 4px 0 0 0;
    font-size: 14px;
    line-height: 1.4;
}
.zgt-schedule-confirm-card.pending .zgt-schedule-text { color: #78350f; }
.zgt-schedule-confirm-card.rescheduled .zgt-schedule-text { color: #1e3a8a; }
.zgt-schedule-confirm-card:not(.pending):not(.rescheduled) .zgt-schedule-text { color: #14532d; }
.zgt-schedule-date {
    font-size: 16px;
    color: var(--zgt-primary-dark);
}
.zgt-schedule-note {
    color: #475569;
    display: block;
    margin-top: 4px;
    font-style: italic;
}
.zgt-schedule-buttons {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.zgt-reschedule-box {
    display: none;
    margin-top: 14px;
    background: #f8fafc;
}

/* Engineer Certificate Cards */
.zgt-eng-name {
    font-size: 15px;
    font-weight: bold;
    color: var(--zgt-primary-dark);
}
.zgt-eng-cert-card {
    background: #ffffff;
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    padding: 16px;
    display: flex;
    gap: 16px;
    margin-top: 14px;
}
.zgt-eng-shield-icon {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}
.zgt-eng-details {
    flex: 1;
}
.zgt-eng-subtext {
    font-size: 12px;
    color: var(--zgt-text-muted);
}
.zgt-cert-row {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--zgt-border);
}
.zgt-cert-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}
.zgt-cert-download-link {
    font-size: 11px;
    color: #0284c7;
    font-weight: bold;
    text-decoration: none;
    background: #e0f2fe;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.15s ease;
}
.zgt-cert-download-link:hover {
    background: #bae6fd;
}

/* Compliance Gauge Card */
.zgt-compliance-gauge-card {
    background: linear-gradient(135deg, var(--zgt-primary-dark), var(--zgt-primary-light));
    color: #ffffff;
    border-radius: var(--zgt-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.zgt-gauge-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.zgt-gauge-inner {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--zgt-primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #38bdf8;
}
.zgt-gauge-inner small {
    font-size: 8px;
    color: #94a3b8;
    font-weight: normal;
}

/* Forms & Fields */
.zgt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .zgt-grid-2 { grid-template-columns: 1fr; }
}

.zgt-field {
    margin-bottom: 16px;
}
.zgt-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--zgt-primary-light);
    margin-bottom: 6px;
}
.zgt-field input,
.zgt-field select,
.zgt-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--zgt-border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--zgt-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.zgt-field input:focus,
.zgt-field select:focus,
.zgt-field textarea:focus {
    outline: none;
    border-color: var(--zgt-accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.zgt-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--zgt-text-muted);
    margin-top: 4px;
}
.zgt-address-box {
    background: var(--zgt-surface);
    border: 1px dashed var(--zgt-border);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
}
.zgt-required-star {
    color: var(--zgt-error);
}
.zgt-form-actions-right {
    margin-top: 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.zgt-status-inline {
    margin-left: 10px;
    font-size: 13px;
}

/* Utilities */
.zgt-mt-4 { margin-top: 4px !important; }
.zgt-mt-10 { margin-top: 10px !important; }
.zgt-mt-14 { margin-top: 14px !important; }
.zgt-mt-16 { margin-top: 16px !important; }
.zgt-mt-20 { margin-top: 20px !important; }
.zgt-mb-4 { margin-bottom: 4px !important; }
.zgt-mb-14 { margin-bottom: 14px !important; }
.zgt-mb-16 { margin-bottom: 16px !important; }
.zgt-mb-20 { margin-bottom: 20px !important; }
.zgt-mb-24 { margin-bottom: 24px !important; }
.zgt-py-40 { padding: 40px 0 !important; }
.zgt-hidden-file { display: none !important; }
.zgt-flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Buttons */
.zgt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
}
.zgt-btn:active { transform: translateY(1px); }
.zgt-btn-primary { background: var(--zgt-accent); color: #ffffff; }
.zgt-btn-primary:hover { background: var(--zgt-accent-hover); color: #ffffff; }
.zgt-btn-accent { background: var(--zgt-primary-dark); color: #ffffff; }
.zgt-btn-accent:hover { background: var(--zgt-primary-light); color: #ffffff; }
.zgt-btn-outline { background: transparent; border: 1px solid var(--zgt-border); color: var(--zgt-primary-dark); }
.zgt-btn-outline:hover { background: #f1f5f9; }
.zgt-btn-sm { font-size: 0.8rem; padding: 6px 12px; }
.zgt-btn-lg { font-size: 1.1rem; padding: 14px 28px; }

/* Documents Hub */
.zgt-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--zgt-border);
    border-radius: 6px;
    margin-bottom: 12px;
    background: var(--zgt-surface);
}
.zgt-doc-item-highlight {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.zgt-doc-icon { font-size: 1.8rem; color: var(--zgt-accent); line-height: 1; }
.zgt-doc-info { flex: 1; }
.zgt-doc-info small { display: block; color: var(--zgt-text-muted); font-size: 0.75rem; }

.zgt-rams-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 16px;
    border-radius: 6px;
}
.zgt-rams-box h4 { color: #92400e; margin-bottom: 10px; font-size: 1rem; }

.zgt-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.zgt-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    padding: 30px 16px;
    text-align: center;
    color: var(--zgt-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.zgt-dropzone:hover { border-color: var(--zgt-accent); background: #fffbeb; color: var(--zgt-accent); }
.zgt-drop-icon { font-size: 2rem; margin-bottom: 6px; }

.zgt-attached-files-list {
    margin-top: 14px;
}
.zgt-attached-file-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.zgt-file-download-link {
    color: #0284c7;
    font-weight: bold;
    text-decoration: none;
}
.zgt-file-download-link:hover { text-decoration: underline; }

/* Chat Box */
.zgt-chat-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 0;
    margin-bottom: 12px;
}
.zgt-chat-box {
    background: var(--zgt-surface);
    border: 1px solid var(--zgt-border);
    border-radius: 6px;
    padding: 16px;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.zgt-chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}
.zgt-chat-msg.system {
    align-self: center;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    text-align: center;
}
.zgt-chat-msg.client {
    align-self: flex-end;
    background: var(--zgt-accent);
    color: #ffffff;
}
.zgt-chat-msg.engineer,
.zgt-chat-msg.admin {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid var(--zgt-border);
    color: var(--zgt-text);
}
.zgt-chat-author { font-weight: bold; font-size: 0.75rem; margin-bottom: 2px; }
.zgt-chat-time { font-size: 0.65rem; opacity: 0.75; margin-top: 4px; text-align: right; }

.zgt-chat-input-row {
    display: flex;
    gap: 10px;
}
.zgt-chat-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--zgt-border);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ==========================================================================
   CLIENT ACCOUNT PORTAL STYLES (/client-account)
   ========================================================================== */
.zgt-acct-hero {
    background: linear-gradient(135deg, var(--zgt-primary-dark) 0%, var(--zgt-primary-light) 100%);
    color: #ffffff;
    padding: 32px 0;
    border-bottom: 3px solid var(--zgt-accent);
}
.zgt-acct-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.zgt-acct-badge {
    background: var(--zgt-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}
.zgt-acct-title {
    font-size: 28px;
    margin: 0 0 6px 0;
    color: #ffffff;
    font-weight: 800;
}
.zgt-acct-meta {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}
.zgt-gauge-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--zgt-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.zgt-gauge-donut {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}
.zgt-gauge-donut-inner {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--zgt-primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #38bdf8;
}
.zgt-gauge-donut-inner small {
    font-size: 9px;
    color: #94a3b8;
    font-weight: normal;
}
.zgt-statutory-label {
    font-size: 12px;
    color: #cbd5e1;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.zgt-statutory-badge {
    font-size: 16px;
    font-weight: bold;
    color: #f8fafc;
    margin: 2px 0 4px 0;
}
.zgt-retest-info {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}
.zgt-retest-text {
    color: #b45309;
}
.zgt-acct-main {
    padding: 24px 0 60px 0;
}
.zgt-nav-pills {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--zgt-border);
    margin: 24px 0 20px 0;
    padding-bottom: 4px;
    overflow-x: auto;
}
.zgt-nav-pill {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--zgt-text-muted);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.zgt-nav-pill:hover {
    color: var(--zgt-primary);
    background: #f1f5f9;
}
.zgt-nav-pill.active {
    background: var(--zgt-primary-dark);
    color: #ffffff;
}
.zgt-tab-section {
    display: none;
}
.zgt-tab-section.active {
    display: block;
    animation: zgtFadeIn 0.2s ease-out;
}
.zgt-site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.zgt-site-box {
    background: #ffffff;
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    padding: 18px;
    box-shadow: var(--zgt-shadow-sm);
}
.zgt-site-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--zgt-primary-dark);
    margin-bottom: 4px;
}
.zgt-site-address {
    font-size: 13px;
    color: var(--zgt-text-muted);
    margin-bottom: 10px;
}
.zgt-site-meta {
    font-size: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    line-height: 1.5;
}
.zgt-table-responsive {
    overflow-x: auto;
    width: 100%;
}
.zgt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.zgt-table th {
    background: var(--zgt-surface);
    padding: 12px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid var(--zgt-border);
}
.zgt-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.zgt-table tr:hover td {
    background: #f8fafc;
}
.zgt-text-arrival {
    color: #0284c7;
    font-weight: bold;
}
.zgt-status-text-success {
    color: var(--zgt-success);
    font-weight: bold;
    font-size: 12px;
}
.zgt-status-text-warning {
    color: var(--zgt-warning);
    font-size: 12px;
}
.zgt-btn-table-action {
    padding: 6px 12px !important;
    font-size: 12px !important;
    text-decoration: none !important;
}
.zgt-empty-state {
    padding: 30px;
    text-align: center;
    color: var(--zgt-text-muted);
    background: var(--zgt-surface);
    border-radius: var(--zgt-radius);
    line-height: 1.5;
}
.zgt-empty-state-sm {
    padding: 20px;
    color: #94a3b8;
}

/* ==========================================================================
   SATISFACTION SURVEY STYLES (/service-survey)
   ========================================================================== */
.zgt-survey-container {
    max-width: 640px !important;
    margin: 30px auto !important;
}
.zgt-survey-thankyou {
    text-align: center;
    padding: 36px 20px;
}
.zgt-survey-star-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}
.zgt-survey-rec-text {
    color: var(--zgt-text-muted);
    font-size: 15px;
    margin-top: 8px;
}
.zgt-survey-header {
    text-align: center;
    margin-bottom: 24px;
}
.zgt-survey-title {
    margin: 8px 0 4px 0;
    font-size: 1.4rem;
    font-weight: 700;
}
.zgt-survey-prompt {
    color: var(--zgt-text-muted);
    font-size: 14px;
    margin: 0;
}
.zgt-survey-q-box {
    margin-bottom: 20px;
    background: var(--zgt-surface);
    padding: 16px;
    border-radius: var(--zgt-radius);
    border: 1px solid var(--zgt-border);
}
.zgt-survey-q-label {
    font-weight: bold;
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
}
.zgt-survey-submit-wrap {
    text-align: center;
}
.zgt-btn-survey {
    width: 100%;
    font-size: 16px !important;
    padding: 12px !important;
}
.zgt-survey-status {
    margin-top: 12px;
    font-size: 14px;
    min-height: 20px;
}

/* Star Rating */
.zgt-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    font-size: 28px;
    cursor: pointer;
}
.zgt-star-rating input {
    display: none;
}
.zgt-star-rating label {
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}
.zgt-star-rating label:hover,
.zgt-star-rating label:hover ~ label,
.zgt-star-rating input:checked ~ label {
    color: #f59e0b;
}
.zgt-star-rating label:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   UNIVERSAL TOAST NOTIFICATIONS
   ========================================================================== */
.zgt-toast-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 32px);
    pointer-events: none;
}
.zgt-toast-bottom-right {
    bottom: 24px;
    right: 24px;
}
.zgt-toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.zgt-toast {
    background: var(--zgt-primary-dark);
    color: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: var(--zgt-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--zgt-accent);
}
.zgt-toast.zgt-toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.zgt-toast.zgt-toast-hiding {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
}
.zgt-toast-success { border-left-color: var(--zgt-success); }
.zgt-toast-error { border-left-color: var(--zgt-error); }
.zgt-toast-warning { border-left-color: var(--zgt-warning); }
.zgt-toast-info { border-left-color: #0284c7; }

.zgt-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.zgt-toast-content {
    flex: 1;
    word-break: break-word;
}
.zgt-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zgt-toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}
.zgt-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
}
.zgt-toast-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--zgt-accent);
}
.zgt-toast-success .zgt-toast-progress-bar { background: var(--zgt-success); }
.zgt-toast-error .zgt-toast-progress-bar { background: var(--zgt-error); }
.zgt-toast-warning .zgt-toast-progress-bar { background: var(--zgt-warning); }
.zgt-toast-info .zgt-toast-progress-bar { background: #0284c7; }

/* ==========================================================================
   SKELETON LOADING PLACEHOLDERS
   ========================================================================== */
@keyframes zgt-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.zgt-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: zgt-shimmer 1.5s infinite;
    border-radius: 4px;
}
.zgt-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}
.zgt-skeleton-card {
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    padding: 16px;
    background: #ffffff;
    margin-bottom: 12px;
}
.zgt-skeleton-kpi {
    height: 80px;
    border-radius: 8px;
}
.zgt-skeleton-row {
    height: 48px;
    margin-bottom: 8px;
}

/* ==========================================================================
   WOW-FACTOR UPGRADES: STEPPER, ARRIVAL CARD, ENGINEER BADGE & CHAT BUBBLES
   ========================================================================== */

/* 5-Step Progress Timeline */
.zgt-stepper-5 {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0 10px 0;
    gap: 8px;
}
.zgt-stepper-5::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 30px;
    right: 30px;
    height: 4px;
    background: #334155;
    z-index: 1;
    border-radius: 2px;
}
.zgt-stepper-5 .zgt-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.zgt-stepper-5 .zgt-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid #334155;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.zgt-stepper-5 .zgt-step-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.3;
}
.zgt-stepper-5 .zgt-step.active .zgt-step-num {
    background: var(--zgt-accent);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 14px rgba(217, 119, 6, 0.6);
    transform: scale(1.1);
}
.zgt-stepper-5 .zgt-step.active .zgt-step-label {
    color: #ffffff;
    font-weight: 700;
}
.zgt-stepper-5 .zgt-step.completed .zgt-step-num {
    background: var(--zgt-success);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.zgt-stepper-5 .zgt-step.completed .zgt-step-label {
    color: #a7f3d0;
}

/* Arrival Window & Live Countdown Widget */
.zgt-arrival-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: var(--zgt-radius);
    padding: 24px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: var(--zgt-shadow-md);
    position: relative;
    overflow: hidden;
}
.zgt-arrival-hero-card::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.zgt-arrival-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: center;
}
@media (max-width: 768px) {
    .zgt-arrival-grid {
        grid-template-columns: 1fr;
    }
}
.zgt-arrival-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid var(--zgt-accent);
    color: #fbbf24;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.zgt-countdown-container {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.zgt-countdown-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    min-width: 60px;
}
.zgt-countdown-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.zgt-countdown-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Verified Field Engineer Trust Card */
.zgt-engineer-trust-card {
    background: #ffffff;
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    padding: 20px;
    box-shadow: var(--zgt-shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.zgt-engineer-trust-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--zgt-shadow-md);
}
.zgt-engineer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 3px solid var(--zgt-accent);
    flex-shrink: 0;
}
.zgt-engineer-details {
    flex: 1;
}
.zgt-engineer-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--zgt-primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.zgt-verified-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.zgt-engineer-role {
    font-size: 0.85rem;
    color: var(--zgt-text-muted);
    margin-bottom: 8px;
}
.zgt-competency-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.zgt-comp-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.zgt-comp-pill-gold {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.zgt-comp-pill-blue {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}
.zgt-comp-pill-green {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

/* Modern Operations Chat UI */
.zgt-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 480px;
    background: #ffffff;
    border: 1px solid var(--zgt-border);
    border-radius: var(--zgt-radius);
    overflow: hidden;
    box-shadow: var(--zgt-shadow-sm);
}
.zgt-chat-header {
    background: var(--zgt-primary-dark);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.zgt-chat-header-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.zgt-chat-stream {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}
.zgt-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.zgt-msg-row.client {
    align-self: flex-end;
    align-items: flex-end;
}
.zgt-msg-row.admin,
.zgt-msg-row.engineer {
    align-self: flex-start;
    align-items: flex-start;
}
.zgt-msg-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
    box-shadow: var(--zgt-shadow-sm);
}
.zgt-msg-row.client .zgt-msg-bubble {
    background: #0284c7;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}
.zgt-msg-row.admin .zgt-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid var(--zgt-border);
    border-left: 4px solid var(--zgt-accent);
    border-bottom-left-radius: 2px;
}
.zgt-msg-row.engineer .zgt-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid var(--zgt-border);
    border-left: 4px solid var(--zgt-success);
    border-bottom-left-radius: 2px;
}
.zgt-msg-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.zgt-chat-input-box {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid var(--zgt-border);
    display: flex;
    gap: 10px;
}
.zgt-chat-input-box textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--zgt-border);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 80px;
}
.zgt-chat-input-box textarea:focus {
    border-color: var(--zgt-accent);
    outline: none;
}

/* Pulsing On-Site Indicator */
@keyframes zgt-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.zgt-pulse-indicator {
    width: 12px;
    height: 12px;
    background-color: var(--zgt-success);
    border-radius: 50%;
    display: inline-block;
    animation: zgt-pulse 2s infinite;
}

/* SVG Radial Compliance Gauge */
.zgt-radial-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 0;
}
.zgt-gauge-svg {
    width: 160px;
    height: 160px;
    transform: rotate(-90deg);
}
.zgt-gauge-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 14;
}
.zgt-gauge-meter {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
    stroke: var(--zgt-success);
    transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}
.zgt-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.zgt-gauge-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--zgt-primary-dark);
    line-height: 1;
}
.zgt-gauge-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--zgt-text-muted);
    margin-top: 4px;
}

/* Dynamic Emoji Survey Feedback */
.zgt-emoji-reaction-box {
    text-align: center;
    font-size: 40px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.zgt-reaction-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--zgt-primary-dark);
    margin-bottom: 12px;
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Footer */
.zgt-portal-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--zgt-text-muted);
    margin-top: 40px;
}

