/**
 * GaragePro Unified Styling System
 * 
 * This file contains the recommended unified styles for the entire plugin
 * to ensure consistency across all modules and pages.
 */

:root {
    /* Primary Colors */
    --garagepro-primary: #667eea;
    --garagepro-primary-dark: #764ba2;
    --garagepro-secondary: #f39c12;
    --garagepro-danger: #e74c3c;
    --garagepro-success: #27ae60;
    --garagepro-warning: #f39c12;
    
    /* Neutral Colors */
    --garagepro-dark: #2c3338;
    --garagepro-text: #333;
    --garagepro-text-light: #666;
    --garagepro-border: #e0e0e0;
    --garagepro-bg-light: #f9f9f9;
    --garagepro-bg-lighter: #fafafa;
    --garagepro-white: #fff;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-2xl: 40px;
    
    /* Border Radius */
    --border-radius-sm: 3px;
    --border-radius-md: 4px;
    --border-radius-lg: 6px;
    
    /* Typography */
    --font-size-sm: 13px;
    --font-size-md: 14px;
    --font-size-base: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 28px;
}

/* ==================== COMMON CONTAINERS ==================== */

.garagepro-section {
    background: var(--garagepro-white);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-2xl);
}

.garagepro-panel {
    background: var(--garagepro-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* ==================== HEADERS ==================== */

.section-header {
    background: linear-gradient(135deg, var(--garagepro-primary) 0%, var(--garagepro-primary-dark) 100%);
    color: var(--garagepro-white);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    margin-bottom: var(--spacing-2xl);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header h3,
.section-header h2 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--garagepro-white);
}

.section-header h3 {
    font-size: var(--font-size-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-header h2 {
    font-size: var(--font-size-2xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-header .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: var(--garagepro-white);
}

.jc-action-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
}

.jc-action-stack .btn,
.jc-action-stack a.btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
}

.jc-loyalty-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    color: #0073aa;
    font-weight: 600;
    background: #f0f7ff;
    border-radius: 4px;
    border: 1px solid #c8e1f5;
    pointer-events: none;
}

.jc-loyalty-info .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #f0a500;
}

.section-header .section-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-shrink: 0;
}

/* ── Jobcard actions dropdown ── */
.jc-actions-dropdown {
    position: relative;
}

.jc-actions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jc-actions-toggle .jc-chevron {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    transition: transform .2s ease;
    flex-shrink: 0;
}

.jc-actions-toggle.open .jc-chevron {
    transform: rotate(180deg);
}

.jc-actions-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    z-index: 99999;
    padding: 5px 0;
    overflow: hidden;
}

.jc-actions-menu.open {
    display: flex;
}

.jc-actions-menu > .btn {
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
    padding: 10px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    font-size: 13px;
    box-shadow: none;
}

.jc-actions-menu > .btn:last-child,
.jc-actions-menu > .jc-actions-menu-sep:last-child + .btn {
    border-bottom: none;
}

.jc-actions-menu > .btn:hover {
    filter: brightness(.92);
}

.jc-actions-menu > a.btn {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.jc-actions-menu-sep {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

.jc-actions-menu-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
    color: #0073aa;
    font-weight: 600;
    background: #f0f7ff;
    border-radius: 4px;
    margin: 2px 0;
    pointer-events: none;
}

.jc-actions-menu-info .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #f0a500;
}

.section-header-subtitle {
    font-size: var(--font-size-md);
    opacity: 0.9;
    margin-top: var(--spacing-sm);
}

/* ==================== FORMS & INPUT FIELDS ==================== */

.garagepro-form {
    background: var(--garagepro-white);
}

.form-header {
    background: linear-gradient(135deg, var(--garagepro-primary) 0%, var(--garagepro-primary-dark) 100%);
    color: var(--garagepro-white);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    margin-bottom: var(--spacing-2xl);
}

.form-header h3 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-header .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: var(--garagepro-white);
}

.form-subtitle {
    font-size: var(--font-size-md);
    opacity: 0.9;
    margin: var(--spacing-sm) 0 0 0;
    color: var(--garagepro-white);
}

.form-content {
    padding: var(--spacing-2xl);
}

.form-section {
    border: 1px solid var(--garagepro-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    background: var(--garagepro-bg-lighter);
    transition: all 0.3s ease;
    min-width: 0;         /* override <fieldset> browser default min-width:min-content */
    width: 100%;          /* force fieldset to fill its parent — without this, fieldset
                             ignores min-width:0 in Chrome/Firefox and widens the container,
                             breaking the inner CSS grid column widths */
    box-sizing: border-box;
}

.form-section:hover {
    background: var(--garagepro-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-section legend.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--garagepro-dark);
    margin: 0 0 var(--spacing-lg) 0;
    padding: 0 0 var(--spacing-md) 0;
    border-bottom: 2px solid var(--garagepro-primary);
}

.form-section .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--garagepro-primary);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--garagepro-text);
}

/* ---------------------------------------------------------------
   Form row grid — gap is handled automatically by CSS grid so
   col-md-* percentages need no calc() adjustment.
   WooCommerce scopes its own .form-row to ".woocommerce form"
   so there is no conflict with this unscoped definition.
   ------------------------------------------------------------ */
.form-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.form-row .form-group,
.form-row [class*="col-"] {
    /* forms.css (loaded after this file) sets .form-group { display: grid }
       which makes every .form-group a nested grid itself. That breaks col-md-*
       layouts because the form-group's children (label/input/helper) each try to
       be ≥ 250px wide inside a narrow column cell. Override back to block here.
       Two-class selector wins over forms.css single-class .form-group regardless
       of load order. */
    display: block;
    min-width: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    overflow: visible; /* allow focus rings to show */
}

/* Ensure inputs never overflow their grid cell regardless of
   any global box-sizing reset from WordPress or the active theme.
   Explicit type selectors match theme/WooCommerce specificity on
   input[type="text"] rules that would otherwise override box-sizing. */
.form-row input,
.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row input[type="search"],
.form-row input[type="url"],
.form-row select,
.form-row textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 12-col grid helpers */
.form-row .col-md-3  { grid-column: span 3; }
.form-row .col-md-4  { grid-column: span 4; }
.form-row .col-md-5  { grid-column: span 5; }
.form-row .col-md-6  { grid-column: span 6; }
.form-row .col-md-8  { grid-column: span 8; }
.form-row .col-md-12 { grid-column: span 12; }

/* Plain .form-group without a col class spans full width */
.form-row > .form-group:not([class*="col-"]) { grid-column: span 12; }

/* ---- Responsive breakpoints for form-row grid ----
   900px : 3-col (col-md-4/col-md-3) → 2-col (span 6)
   768px : 2-col (col-md-6/col-md-5) + any remaining 3-col stragglers → full-width
   600px : everything full-width (catch-all)
   -------------------------------------------------- */
@media (max-width: 900px) {
    .form-row .col-md-3,
    .form-row .col-md-4 { grid-column: span 6; }

    .form-content {
        padding: 20px;
    }

    .form-section {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .form-row .col-md-3,
    .form-row .col-md-4,
    .form-row .col-md-5,
    .form-row .col-md-6 { grid-column: span 12; }

    .form-content {
        padding: 16px;
    }

    .form-section {
        padding: 14px;
        margin-bottom: 14px;
    }

    .form-row {
        gap: 10px;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .form-row .col-md-3,
    .form-row .col-md-4,
    .form-row .col-md-5,
    .form-row .col-md-6,
    .form-row .col-md-8 { grid-column: span 12; }

    .form-content {
        padding: 12px;
    }

    .form-section {
        padding: 12px;
    }
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--garagepro-dark);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-md);
}

.form-label .required {
    color: var(--garagepro-danger);
    font-weight: 700;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--garagepro-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-md);
    color: var(--garagepro-text);
    background: var(--garagepro-white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--garagepro-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #999;
    opacity: 1;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.form-help {
    display: block;
    margin: var(--spacing-sm) 0 0 0;
    color: var(--garagepro-text-light);
    font-size: var(--font-size-sm);
}

.form-actions {
    background: var(--garagepro-bg-lighter);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-lg);
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column-reverse;
        gap: var(--spacing-sm);
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--garagepro-primary) 0%, var(--garagepro-primary-dark) 100%);
    color: var(--garagepro-white);
    border: none;
}

.btn-primary:hover {
    opacity: 0.95;
}

.btn-secondary {
    background: var(--garagepro-bg-light);
    color: var(--garagepro-text);
    border: 1px solid var(--garagepro-border);
}

.btn-secondary:hover {
    background: var(--garagepro-border);
    color: var(--garagepro-text);
}

.btn-danger {
    background: var(--garagepro-danger);
    color: var(--garagepro-white);
    border: none;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-success {
    background: var(--garagepro-success);
    color: var(--garagepro-white);
    border: none;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-lg {
    padding: 12px 24px;
    font-size: var(--font-size-base);
    height: auto;
}

.btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    margin: 0;
}

/* ==================== INFO SECTIONS & DISPLAY ==================== */

.info-section {
    background: var(--garagepro-bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--garagepro-primary);
}

.info-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    color: var(--garagepro-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.info-section .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: var(--garagepro-primary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--garagepro-border);
    font-size: var(--font-size-md);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--garagepro-text-light);
    min-width: 120px;
}

.info-value {
    color: var(--garagepro-text);
    word-break: break-word;
}

.info-value.empty {
    color: #999;
    font-style: italic;
}

/* ==================== GRID LAYOUTS ==================== */

.customer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

/* ==================== VEHICLES SECTION ==================== */

.vehicles-section {
    background: var(--garagepro-bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--garagepro-primary-dark);
    margin-bottom: var(--spacing-2xl);
}

.vehicles-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    color: var(--garagepro-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vehicles-section .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: var(--garagepro-primary-dark);
}

.vehicle-count-badge {
    background: var(--garagepro-primary-dark);
    color: var(--garagepro-white);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.section-title-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vehicles-list {
    margin-top: var(--spacing-md);
}

.vehicle-item {
    background: var(--garagepro-white);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--garagepro-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.vehicle-item:hover {
    border-color: var(--garagepro-primary-dark);
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.1);
}

.vehicle-info {
    flex: 1;
}

.vehicle-make-model {
    font-weight: 600;
    color: var(--garagepro-text);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
}

.vehicle-details {
    font-size: var(--font-size-sm);
    color: var(--garagepro-text-light);
    display: flex;
    gap: var(--spacing-lg);
}

.vehicle-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.no-vehicles {
    background: var(--garagepro-white);
    padding: var(--spacing-xl);
    text-align: center;
    border: 1px dashed var(--garagepro-border);
    border-radius: var(--border-radius-md);
    color: #999;
}

/* ==================== NOTES SECTION ==================== */

.notes-section {
    background: var(--garagepro-bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--garagepro-secondary);
    margin-top: var(--spacing-2xl);
}

.notes-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    color: var(--garagepro-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.notes-section .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: var(--garagepro-secondary);
}

.notes-content {
    background: var(--garagepro-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--garagepro-border);
    min-height: 100px;
    line-height: 1.6;
    color: var(--garagepro-text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notes-content.empty {
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== SEARCH & FILTERING ==================== */

.search-box {
    margin-bottom: var(--spacing-xl);
    background: var(--garagepro-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--garagepro-border);
}

.list-controls {
    padding: var(--spacing-lg) var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: var(--spacing-sm);
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--garagepro-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-md);
}

.search-input:focus {
    outline: none;
    border-color: var(--garagepro-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==================== TABLES ==================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 0;
}

.wp-list-table {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
    table-layout: auto;
}

.wp-list-table th,
.wp-list-table td {
    box-sizing: border-box;
}

.wp-list-table.fixed thead th {
    background: var(--garagepro-bg-lighter);
    border-top: 2px solid var(--garagepro-primary);
    border-bottom: 2px solid var(--garagepro-border);
}

.wp-list-table.striped tbody tr:nth-child(even) {
    background: var(--garagepro-bg-lighter);
}

.wp-list-table tbody tr:hover {
    background: #f0f0f0;
}

/* List containers full width */
.customers-list,
.vehicles-list,
.employees-list,
.jobcards-list {
    width: 100%;
    box-sizing: border-box;
}

/* Ensure list sections extend properly */
.garagepro-section .customers-list,
.garagepro-section .vehicles-list,
.garagepro-section .employees-list,
.garagepro-section .jobcards-list {
    padding: 0 var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl);
}

/* Direct table placement in sections */
.garagepro-section > .wp-list-table,
.jobcards-list-section > .wp-list-table {
    margin: 0 var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl);
}

/* ==================== STATUS & ALERTS ==================== */

.no-data {
    background: var(--garagepro-white);
    padding: var(--spacing-2xl);
    text-align: center;
    border: 2px dashed var(--garagepro-border);
    border-radius: var(--border-radius-lg);
}

.no-data p {
    color: var(--garagepro-text-light);
    margin: 0 0 var(--spacing-lg) 0;
}

.alert {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid;
    margin-bottom: var(--spacing-xl);
}

.alert-info {
    background: #d1ecf1;
    border-color: #0c5460;
    color: #0c5460;
}

.alert-success {
    background: #d4edda;
    border-color: #155724;
    color: #155724;
}

/* ==================== TOAST NOTIFICATIONS ==================== */

#garagepro-messages-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    min-width: 320px;
    max-width: 520px;
    width: auto;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.garagepro-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    pointer-events: all;
    width: 100%;
    animation: gp-toast-in 0.25s ease;
}

@keyframes gp-toast-in {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.garagepro-alert-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.garagepro-alert-success {
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.garagepro-alert .dashicons {
    flex-shrink: 0;
    font-size: 18px;
}

.garagepro-alert .alert-message {
    flex: 1;
}

.garagepro-alert .alert-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .6;
    padding: 0 0 0 6px;
    flex-shrink: 0;
}

.garagepro-alert .alert-close:hover {
    opacity: 1;
}

.alert-warning {
    background: #fff3cd;
    border-color: #856404;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-color: #721c24;
    color: #721c24;
}

/* ==================== STATUS BADGES ==================== */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* Jobcard Status Colors */
.badge.status-pending {
    background-color: #ffc107;
    color: #000;
}

.badge.status-sections_assigned,
.badge.status-sections-assigned {
    background-color: #2196F3;
    color: #fff;
}

.badge.status-quotation_sent,
.badge.status-quotation-sent {
    background-color: #9C27B0;
    color: #fff;
}

.badge.status-approved {
    background-color: #4CAF50;
    color: #fff;
}

.badge.status-awaiting_admin_review,
.badge.status-awaiting-admin-review {
    background-color: #FF5722;
    color: #fff;
}

.badge.status-submitted {
    background-color: #2196F3;
    color: #fff;
}

.badge.status-revision_requested,
.badge.status-revision-requested {
    background-color: #FFC107;
    color: #000;
}

.badge.status-job_started,
.badge.status-job-started,
.badge.status-in_progress,
.badge.status-in-progress {
    background-color: #FF9800;
    color: #fff;
}

.badge.status-awaiting_payment,
.badge.status-awaiting-payment {
    background-color: #F44336;
    color: #fff;
}

.badge.status-ready_for_delivery,
.badge.status-ready-for-delivery,
.badge.status-to_be_delivered,
.badge.status-to-be-delivered,
.badge.status-ready {
    background-color: #00BCD4;
    color: #000;
}

.badge.status-delivered,
.badge.status-completed {
    background-color: #4CAF50;
    color: #fff;
}

.badge.status-cancelled,
.badge.status-rejected {
    background-color: #9E9E9E;
    color: #fff;
}

/* ==================== VIEW CONTENT CONTAINERS ==================== */

.view-content {
    padding: var(--spacing-2xl);
}

.back-button-wrapper {
    margin-bottom: var(--spacing-lg);
}

/* ==================== EMPTY STATE ==================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--garagepro-bg-lighter);
    border: 2px dashed var(--garagepro-border);
    border-radius: var(--border-radius-lg);
    margin: 20px 0;
}

.empty-state .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: var(--garagepro-text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--garagepro-text);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.empty-state p {
    color: var(--garagepro-text-light);
    font-size: 15px;
    margin: 0 0 25px 0;
}

.empty-state .btn {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 14px;
}

.empty-state .btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* ==================== MODALS ==================== */

.garagepro-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.garagepro-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    cursor: pointer;
}

.garagepro-modal .modal-content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    animation: modalFadeIn 0.3s ease;
}

.garagepro-modal .modal-content.large {
    max-width: 700px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.garagepro-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.garagepro-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.garagepro-modal .modal-header .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.garagepro-modal .modal-header .modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.garagepro-modal .modal-body {
    padding: 24px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

.garagepro-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.garagepro-modal .send-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.garagepro-modal .send-methods .btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.garagepro-modal .payment-summary,
.garagepro-modal .payment-status {
    margin-bottom: 20px;
}

.garagepro-modal .summary-table {
    width: 100%;
    border-collapse: collapse;
}

.garagepro-modal .summary-table td,
.garagepro-modal .summary-table th {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.garagepro-modal .summary-table tr.highlight {
    background: #f9f9f9;
    font-weight: bold;
}

.garagepro-modal .payment-form .form-group {
    margin-bottom: 16px;
}

.garagepro-modal .payment-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.garagepro-modal .payment-form input,
.garagepro-modal .payment-form select,
.garagepro-modal .payment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.garagepro-modal .payment-form small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.garagepro-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    background: none;
    border-radius: 0;
    padding: 0;
}

/* Sub-sections inside a modal body — consistent divider + heading style */
.garagepro-modal .modal-subsection {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e8e8e8;
}
.garagepro-modal .modal-subsection:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.garagepro-modal .modal-subsection h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.garagepro-modal .payments-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.garagepro-modal .payments-table th,
.garagepro-modal .payments-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.garagepro-modal .payments-table thead th {
    background: #f8f9fa;
    font-weight: 600;
}

.garagepro-modal .no-data {
    text-align: center;
    padding: 30px;
    color: #999;
}

.garagepro-modal .payment-status {
    text-align: center;
}

.garagepro-modal .badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.garagepro-modal .badge-success {
    background: #27ae60;
    color: white;
}

.garagepro-modal .badge-warning {
    background: #f39c12;
    color: white;
}

.garagepro-modal .text-success {
    color: #27ae60;
}

.garagepro-modal .text-danger {
    color: #e74c3c;
}

/* form-row defined earlier in this file */

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 20px;
        --spacing-2xl: 20px;
    }
    
    .section-header,
    .form-header {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .section-header .section-actions,
    .section-header .customer-view-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .customer-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   REPORTS MODULE STYLES
   ============================================================ */

/* Filter Bar */
.reports-filter-bar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.filter-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-preset {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    border-radius: var(--border-radius);
    font-size: 13px;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.15s ease;
}
.btn-preset:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-preset.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.filter-custom-dates {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}
.filter-custom-dates label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.filter-custom-dates input[type="date"] {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 13px;
}
.filter-custom-dates.hidden { display: none; }

/* Tab Navigation */
.reports-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
    gap: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}
.tab-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* Tab Panels */
.reports-tab-content { position: relative; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Summary Cards */
.reports-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}



.summary-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid transparent;
    background: var(--color-surface);
}
.summary-card .card-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    opacity: 0.85;
}
.summary-card .card-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}
.summary-card .card-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.summary-card.card-primary { border-color: #3b82f6; background: #eff6ff; }
.summary-card.card-primary .card-icon .dashicons { color: #2563eb; }
.summary-card.card-primary .card-value { color: #1d4ed8; }

.summary-card.card-success { border-color: #22c55e; background: #f0fdf4; }
.summary-card.card-success .card-icon .dashicons { color: #16a34a; }
.summary-card.card-success .card-value { color: #15803d; }

.summary-card.card-info { border-color: #8b5cf6; background: #f5f3ff; }
.summary-card.card-info .card-icon .dashicons { color: #7c3aed; }
.summary-card.card-info .card-value { color: #6d28d9; }

.summary-card.card-warning { border-color: #f59e0b; background: #fffbeb; }
.summary-card.card-warning .card-icon .dashicons { color: #d97706; }
.summary-card.card-warning .card-value { color: #b45309; }

.summary-card.card-danger { border-color: #ef4444; background: #fef2f2; }
.summary-card.card-danger .card-icon .dashicons { color: #dc2626; }
.summary-card.card-danger .card-value { color: #b91c1c; }

/* Chart Boxes */
.reports-chart-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}
.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}

/* Bar Charts */
.bar-chart { display: flex; flex-direction: column; gap: 8px; }

.bar-item {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    align-items: center;
    gap: var(--spacing-sm);
}
.bar-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-track {
    height: 18px;
    background: var(--color-bg);
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.bar-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.bar-fill-primary { background: var(--color-primary, #3b82f6); }
.bar-fill-success { background: #22c55e; }
.bar-fill-info    { background: #8b5cf6; }
.bar-fill-warning { background: #f59e0b; }
.bar-fill-danger  { background: #ef4444; }

/* Status-specific bar colours */
.bar-fill-bar-fill-status-pending            { background: #94a3b8; }
.bar-fill-bar-fill-status-in_progress        { background: #3b82f6; }
.bar-fill-bar-fill-status-quotation_sent     { background: #8b5cf6; }
.bar-fill-bar-fill-status-completed          { background: #22c55e; }
.bar-fill-bar-fill-status-cancelled          { background: #ef4444; }
.bar-fill-bar-fill-status-awaiting_payment   { background: #f59e0b; }
.bar-fill-bar-fill-status-ready_for_delivery { background: #8b5cf6; }

.bar-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}
.bar-count {
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 4px;
}

/* Horizontal label variant (shows all labels) */
.bar-chart.horizontal-labels .bar-item {
    grid-template-columns: 60px 1fr auto;
}

/* Two-column layout for chart boxes */
.reports-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Report Tables */
.gp-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.gp-report-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gp-report-table td {
    padding: 10px 10px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.gp-report-table tr:last-child td { border-bottom: none; }
.gp-report-table tr:hover td { background: var(--color-bg); }

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}
.rank-badge.rank-1 { background: #fbbf24; color: #78350f; }
.rank-badge.rank-2 { background: #9ca3af; color: #1f2937; }
.rank-badge.rank-3 { background: #d97706; color: #fff; }

/* Inline bars for sections table */
.inline-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.inline-bar-fill {
    height: 8px;
    background: var(--color-primary, #3b82f6);
    border-radius: 4px;
    max-width: 80px;
    min-width: 2px;
    transition: width 0.3s ease;
}
.inline-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

/* Utility classes (local to reports) */
.text-success { color: #16a34a; }
.text-warning { color: #d97706; }
.text-muted   { color: var(--color-text-secondary); }
.no-data {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
    padding: var(--spacing-xl);
}

/* Loading Overlay */
.reports-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-secondary);
    border-radius: var(--border-radius-lg);
    z-index: 10;
}
.reports-loading .dashicons.spin {
    animation: gp-spin 1s linear infinite;
}
@keyframes gp-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
    .reports-two-col { grid-template-columns: 1fr; }
    .bar-item { grid-template-columns: 100px 1fr auto; }
}
@media (max-width: 600px) {
    .reports-summary-cards { grid-template-columns: 1fr 1fr; }
    .reports-tabs { overflow-x: auto; }
    .tab-btn { padding: 8px 12px; font-size: 13px; }
    .bar-item { grid-template-columns: 80px 1fr auto; }
    .filter-presets { gap: 4px; }
    .btn-preset { font-size: 12px; padding: 4px 8px; }
}

/* ============================================================
   SERVICE HISTORY (Vehicle View)
   ============================================================ */
.service-history-section { margin-top: var(--spacing-xl); }

.service-history-table { font-size: var(--font-size-sm); }
.service-history-table .col-job-number { width: 110px; }
.service-history-table .col-date       { width: 100px; white-space: nowrap; }
.service-history-table .col-status     { width: 130px; }
.service-history-table .col-payment    { width: 90px; }
.service-history-table .col-amount     { width: 100px; text-align: right; white-space: nowrap; }
.service-history-table .col-completed  { width: 100px; white-space: nowrap; }
.service-history-table .col-actions    { width: 80px; text-align: center; }
.service-history-table .col-issue      { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-history-table .sh-sections    { font-size: 12px; color: var(--garagepro-text-light); }

/* Priority badges (compact — appear below job number) */
.sh-priority {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: 2px;
}
.sh-priority.priority-low    { background: #e8f5e9; color: #2e7d32; }
.sh-priority.priority-medium { background: #fff8e1; color: #f57f17; }
.sh-priority.priority-high   { background: #fff3e0; color: #e65100; }
.sh-priority.priority-urgent { background: #fce4ec; color: #b71c1c; }

/* Payment status badges — soft fill to visually distinguish from status badges */
.badge.payment-pending {
    background-color: #fff3e0;
    color: #bf360c;
    border: 1px solid #ffcc80;
}
.badge.payment-partial {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}
.badge.payment-paid {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

/* Amount cell emphasis */
.service-history-table .col-amount strong {
    color: var(--garagepro-dark);
    font-weight: 600;
}

/* ============================================================
   JOBCARD FILTER BAR
   ============================================================ */
.jc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.jc-filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.jc-search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}
.jc-filter-input {
    width: 100%;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.jc-filter-search .jc-filter-input { padding-left: 30px; }
.jc-filter-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102,126,234,.15); }
.jc-filter-select {
    height: 36px;
    min-width: 150px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
}
.jc-filter-select:focus { outline: none; border-color: #667eea; }
.jc-date-input { width: 140px; flex: none; }

@media (max-width: 768px) {
    .jc-filter-bar { flex-direction: column; align-items: stretch; }
    .jc-filter-search { min-width: 100%; }
    .jc-date-input { width: 100%; }
    .jc-filter-select { width: 100%; }
    .service-history-table .col-issue,
    .service-history-table .col-sections { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   JOBCARD MEDIA — Upload area & gallery (staff view)
   ═══════════════════════════════════════════════════════════════════════════ */

.media-upload-area { margin-bottom: 18px; }

.media-drop-zone {
    border: 2px dashed #b0bec5;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color .15s, background .15s;
}
.media-drop-zone:hover,
.media-drop-zone.drag-over {
    border-color: #1976d2;
    background: #e3f2fd;
}
.media-drop-zone p { margin: 0; color: #546e7a; font-size: 14px; }

.jobcard-media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.gp-media-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .15s;
}
.gp-media-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.13); }

.gp-media-thumb img,
.gp-media-thumb video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}
.gp-media-thumb.gp-media-video video { object-fit: contain; background:#000; }

.gp-media-caption { font-size: 12px; color: #455a64; margin: 0; word-break: break-word; }
.gp-media-meta small { font-size: 11px; color: #90a4ae; }

.btn-delete-media {
    font-size: 12px;
    padding: 3px 8px;
    align-self: flex-start;
}
.btn-delete-media .dashicons { font-size: 14px; line-height: 1.6; }

/* Progress bar */
.progress-bar-wrap { margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOMER HISTORY PORTAL
   ═══════════════════════════════════════════════════════════════════════════ */

.garagepro-customer-portal {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gp-portal-header { margin-bottom: 28px; border-bottom: 2px solid #e0e0e0; padding-bottom: 16px; }
.gp-portal-header h2 { font-size: 24px; color: #263238; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.gp-portal-header h2 .dashicons { font-size: 28px; color: #1976d2; }
.gp-portal-greeting { color: #546e7a; font-size: 15px; margin: 0; }

.gp-portal-login-prompt {
    text-align: center;
    padding: 60px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
}
.gp-portal-login-prompt h3 { font-size: 20px; color: #263238; margin: 0 0 10px; }
.gp-portal-login-prompt p { color: #546e7a; margin: 0 0 18px; }

.gp-portal-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
}
.gp-portal-notice .dashicons { flex-shrink: 0; margin-top: 1px; }
.gp-portal-notice-info { background: #e3f2fd; border-left: 4px solid #1976d2; color: #0d47a1; }
.gp-portal-notice-info .dashicons { color: #1976d2; }

/* Job card cards */
.gp-portal-jobcard-list { display: flex; flex-direction: column; gap: 20px; }

.gp-portal-jobcard {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.gp-portal-jobcard.delivered { border-left: 4px solid #388e3c; }
.gp-portal-jobcard.completed { border-left: 4px solid #1976d2; }
.gp-portal-jobcard.in_progress { border-left: 4px solid #f57c00; }
.gp-portal-jobcard.pending,
.gp-portal-jobcard.sections_assigned { border-left: 4px solid #90a4ae; }
.gp-portal-jobcard.cancelled,
.gp-portal-jobcard.rejected { border-left: 4px solid #e53935; }

.gp-jc-card-header {
    padding: 14px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.gp-jc-meta { display: flex; align-items: center; gap: 8px; }
.gp-jc-number { font-weight: 700; font-size: 15px; color: #263238; font-family: monospace; }
.gp-jc-vehicle { color: #546e7a; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.gp-jc-vehicle .dashicons { font-size: 16px; }
.gp-jc-date { color: #90a4ae; font-size: 13px; margin-left: auto; display: flex; align-items: center; gap: 4px; }
.gp-jc-date .dashicons { font-size: 14px; }

.gp-jc-description { padding: 14px 18px; color: #455a64; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.gp-jc-description p { margin: 0; line-height: 1.6; }

/* Media section inside customer portal */
.gp-jc-media { padding: 14px 18px; }
.gp-jc-media-title {
    font-size: 14px;
    font-weight: 600;
    color: #546e7a;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gp-jc-media-title .dashicons { font-size: 16px; }

.gp-customer-media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.gp-customer-media-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #000;
    position: relative;
    flex: 0 0 auto;
    max-width: 240px;
}
.gp-customer-media-item img {
    display: block;
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity .2s;
}
.gp-customer-media-item img:hover { opacity: .88; }
.gp-customer-media-item video {
    display: block;
    width: 240px;
    max-height: 180px;
    border-radius: 8px;
}
.gp-customer-media-caption {
    padding: 6px 8px;
    font-size: 12px;
    color: #546e7a;
    background: #fff;
    margin: 0;
    border-top: 1px solid #f0f0f0;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .gp-jc-card-header { flex-direction: column; align-items: flex-start; }
    .gp-jc-date { margin-left: 0; }
    .gp-customer-media-item,
    .gp-customer-media-item img,
    .gp-customer-media-item video { width: 100%; max-width: 100%; }
    .gp-media-item { width: 100%; }
    .jobcard-media-gallery { flex-direction: column; }
}

/* ── Inventory Module ──────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════════
   INVENTORY SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Outline-white button — used inside gradient section-header */
.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.8);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: #fff;
}
.section-header .header-right {
    flex-shrink: 0;
}

/* Inventory table — use wp-list-table; these rules add gap from filter bar */
#inventory-table-wrap { padding: 0 0 4px; }
#inventory-table-wrap .wp-list-table { border-collapse: collapse; }
#inventory-table-wrap .wp-list-table thead th {
    white-space: nowrap;
    padding: 8px 12px;
}
#inventory-table-wrap .wp-list-table td {
    vertical-align: middle;
    padding: 8px 12px;
}

/* Row action buttons spacing */
#inventory-tbody .btn + .btn { margin-left: 4px; }

/* Compat badge pill */
.inv-compat-badge {
    display: inline-block;
    background: var(--garagepro-primary);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

/* Category pill — used in product detail modal */
.inv-cat-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1a56db;
    border: 1px solid #c3d4fb;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    margin: 1px 2px;
    white-space: nowrap;
}

/* Pagination controls */
.inv-pagination {
    padding: 10px 0 4px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Product info summary table inside detail modal */
.inv-product-info .widefat th {
    background: #f5f5f5;
    font-weight: 600;
    width: 110px;
    white-space: nowrap;
}

/* Compatibility inner table (rendered by JS) */
.inv-compat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
}
.inv-compat-table th,
.inv-compat-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.inv-compat-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
}
.inv-compat-table tbody tr:hover { background: #f9f9f9; }

/* Category checkboxes grid (product form) */
.inv-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8f9fa;
    max-height: 160px;
    overflow-y: auto;
}
.inv-cat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.inv-cat-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Manage-stock toggle label */
.inv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    color: #555;
}
.inv-toggle input { cursor: pointer; }

/* Info notice inside product form */
.inv-info-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #e8f4fd;
    border: 1px solid #bee5fd;
    border-left: 4px solid #0073aa;
    color: #0c5460;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}
.inv-info-notice .dashicons {
    color: #0073aa;
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 768px) {
    #inventory-table-wrap .wp-list-table .col-sku,
    #inventory-table-wrap .wp-list-table .col-compat { display: none; }
}

/* ==========================================================================
   Rewards & NFC Cards Module
   ========================================================================== */

/* Status / type badges */
.nfc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.nfc-badge-active   { background: #d4edda; color: #155724; }
.nfc-badge-inactive { background: #f8d7da; color: #721c24; }
.nfc-badge-type-loyalty { background: #cce5ff; color: #004085; }
.nfc-badge-type-access  { background: #fff3cd; color: #856404; }
.nfc-badge-type-payment { background: #d1ecf1; color: #0c5460; }
.nfc-badge-txn {
    background: #e9ecef;
    color: #495057;
}

/* Card UID displayed as monospace */
#nfc-tbody code {
    font-size: 12px;
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 4px;
    color: #333;
}

/* Responsive: hide less-important columns on small screens */
@media (max-width: 768px) {
    #nfc-table-wrap .wp-list-table th:nth-child(4),
    #nfc-table-wrap .wp-list-table td:nth-child(4),
    #nfc-table-wrap .wp-list-table th:nth-child(7),
    #nfc-table-wrap .wp-list-table td:nth-child(7) { display: none; }
}

