.signature-pad-container {
    border: 2px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: #fff;
}

.signature-canvas {
    width: 100%;
    height: 150px;
    border: 1px dashed #adb5bd;
    border-radius: 0.25rem;
    cursor: crosshair;
    touch-action: none;
}

.signature-pad-unsigned {
    border-color: #fd7e14 !important;
    /* Orange */
}

.signature-pad-signed {
    border-color: #198754 !important;
    /* Green */
}



/* =========================================================
   New Forms Tiles — traqfood-style, accent-aware, accessible
   ========================================================= */

/* Space between the tab bar and the first row of tiles */
.newforms-grid {
    margin-top: 0.75rem;
    /* phones */
}

@media (min-width: 768px) {
    .newforms-grid {
        margin-top: 1.25rem;
    }

    /* tablets/desktops */
}

/* ---- Tile base surface & elevation ---- */
.tile-card {
    /* Accent variables (RGB used for translucent tints/shadows).
     Individual accent classes below set these values per tile. */
    --tile-accent: var(--bs-primary);
    --tile-accent-rgb: 13, 110, 253;
    /* fallback: Bootstrap Primary */

    border-radius: 1rem;
    min-height: 140px;
    /* consistent visual rhythm */
    position: relative;
    background:
        linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    /* subtle surface gradient */
    border: 1px solid rgba(0, 0, 0, .04);
    /* hairline to lift off bg */
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .85) inset,
        /* inner highlight edge */
        0 .5rem 1rem rgba(0, 0, 0, .05),
        /* base elevation */
        0 .125rem .25rem rgba(0, 0, 0, .06);
    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background-color .14s ease,
        border-color .14s ease;
}

/* Hover/focus: a touch more contrast and a colour-tinted shadow */
.tile-card:hover,
.tile-card:focus-within {
    transform: translateY(-3px);
    background-color: rgba(var(--tile-accent-rgb), .025);
    border-color: rgba(var(--tile-accent-rgb), .18);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .85) inset,
        0 14px 28px rgba(var(--tile-accent-rgb), .16),
        0 6px 14px rgba(0, 0, 0, .08);
    outline: 2px solid rgba(var(--tile-accent-rgb), .18);
    outline-offset: 2px;
}

/* Thin top accent bar for brand touch & quick scan */
.tile-accent-bar {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(var(--tile-accent-rgb), .85);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    pointer-events: none;
}

/* ---- Icon pod + icon ---- */
.tile-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(var(--tile-accent-rgb), .13);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    user-select: none;
    box-shadow: 0 2px 6px rgba(var(--tile-accent-rgb), .12);
}

.tile-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--tile-accent);
}

/* ---- Label under icon ---- */
.tile-label {
    font-size: 1.08rem;
    margin-top: .25rem;
    color: #1f2937;
    /* neutral-800-ish for contrast */
}

/* ---- Secondary action (SC1: circular Scan Docket button) ---- */
.tile-secondary-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 .25rem .6rem rgba(var(--tile-accent-rgb), .20);
    z-index: 2;
    /* above stretched-link */
}

.tile-secondary-btn i {
    font-size: 1rem;
}

/* Improve focus for keyboard users */
.tile-secondary-btn:focus-visible,
.start-form:focus-visible {
    outline: 2px solid rgba(var(--tile-accent-rgb), .5);
    outline-offset: 2px;
}

/* Ensure the stretched-link doesn’t block the corner action */
.tile-card .stretched-link {
    z-index: 1;
}

/* ---- Accent themes (set the tile's CSS vars) ---- */
.tile-accent-primary {
    --tile-accent: var(--bs-primary);
    --tile-accent-rgb: 13, 110, 253;
}

.tile-accent-success {
    --tile-accent: var(--bs-success);
    --tile-accent-rgb: 25, 135, 84;
}

.tile-accent-warning {
    --tile-accent: var(--bs-warning);
    --tile-accent-rgb: 255, 193, 7;
}

.tile-accent-danger {
    --tile-accent: var(--bs-danger);
    --tile-accent-rgb: 220, 53, 69;
}

.tile-accent-info {
    --tile-accent: var(--bs-info);
    --tile-accent-rgb: 13, 202, 240;
}

.tile-accent-dark {
    --tile-accent: var(--bs-dark);
    --tile-accent-rgb: 33, 37, 41;
}

/* High-contrast fix for the Danger theme */
.tile-accent-danger .tile-icon {
    color: #fff; /* White icon for high contrast */
}



/* ---- Responsiveness & motion preferences ---- */
@media (max-width: 380px) {
    .tile-card {
        min-height: 128px;
    }

    .tile-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .tile-icon {
        font-size: 1.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tile-card {
        transition: none;
    }
}

/* =========================================================
   Form Header Compact Styling
   ========================================================= */
.form-header-compact.card-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.form-header-compact.card-header h5 {
    font-size: 1.1rem;
    /* Slightly smaller font for title */
}

@media (min-width: 768px) {
    .form-header-compact.card-header {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .form-header-compact.card-header h5 {
        font-size: 1.25rem;
        /* Default Bootstrap h5 size */
    }
}

/* =========================================================
   (Optional) Badge support — handy later for "due"/"overdue"
   ========================================================= */
/* Place a small status badge in the top-left if needed */
.tile-badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2;
}


/* SC1 Forms Table specific styles */
#general-forms-table-container table th,
#general-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}


/* SC3 Forms Table specific styles */
#sc3-forms-table-container table th,
#sc3-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}

/* SC2 Forms Table specific styles */
#sc2-forms-table-container table th,
#sc2-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}

/* SC91 Forms Table specific styles */
#sc91-forms-table-container table th,
#sc91-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}

/* SC4 Forms Table specific styles */
#sc4-forms-table-container table th,
#sc4-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}

/* SC92 Thermometer Check Forms Table specific styles */
#thermometer-check-forms-table-container table th,
#thermometer-check-forms-table-container table td {
    font-size: smaller;
    /* Or use a specific pixel value like 13px if you prefer */
}


/* Custom button style for use in dark headers */
.btn-outline-header {
    color: #f8f9fa; /* Light gray/white text */
    border-color: #f8f9fa; /* Light gray/white border */
}

.btn-outline-header:hover {
    color: #212529; /* Dark text on hover */
    background-color: #f8f9fa; /* Light gray/white background on hover */
    border-color: #f8f9fa;
}