/*
 * PackTrack global styles (v2)
 * Sections: base · layout · nav · dashboard · forms · cards · pack · rigging · office · tables · admin/ocr · dark mode
 */

p {
    font-size: 100%;
}

html,
body {
    font: 16px 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    color: #333;
    background-color: #f0f2f5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto', sans-serif;
    color: #333;
    margin-top: 12px;
    margin-bottom: 8px;
}

h1 {
    color: #3274d6;
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 16px;
    margin-top: 0;
}

h2 {
    font-size: 1.3rem;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.content {
    width: 100%;
    max-width: 960px;
    background-color: #ffffff;
    box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
    margin: 10px auto;
    padding: 14px 20px;
    min-height: 95%;
    padding-bottom: 70px;
}

@media (min-width: 1280px) {
    .content {
        max-width: 1240px;
        padding: 16px 28px;
    }
}

.content form {
    padding-top: 10px;
}

tr:hover {
    background-color: #f5f5f5;
}

table {
    border-collapse: collapse;

}

th,
td {
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
    padding: 6px 8px;
}

th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
}

input[type=submit] {
    height: auto;
    font-size: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    margin-top: 4px;
    margin-bottom: 4px;
    cursor: pointer;
}

input[type=date] {
    height: auto;
    font-size: 1rem;
}

input[type=text] {
    font-size: 1rem;
}

input[type=password] {
    font-size: 1rem;
}

select {
    font-size: 1rem;
    padding: 4px 6px;
}

label {
    display: inline-block;
}

input {
    display: inline-block;
}

a.button:link,
a.button:visited {
    background-color: #3274d6;
    color: white;
    padding: 8px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    border: none;
}

a.button:hover {
    background-color: #2868c7;
}

/* Global Reset for Mobile Sizing */
* {
    box-sizing: border-box;
}

/* Mobile Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.dashboard-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #3274d6;
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, background-color 0.2s;
    min-height: 70px;
    line-height: 1.2;
}

.dashboard-tile:hover {
    background-color: #2868c7;
    transform: translateY(-2px);
    color: white;
}

/* Secondary Navigation (Bottom Buttons) */
.secondary-nav-grid {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 10px;
    overflow-x: auto;
    /* Allow scrolling if screen is very narrow */
}

.secondary-nav-btn {
    flex: 1;
    background-color: #3274d6;
    color: white;
    padding: 8px 5px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 0.85rem;
    font-weight: normal;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.secondary-nav-btn:hover {
    background-color: #2868c7;
    color: white;
}

/* Compact Warnings */
.warning-compact-container {
    margin-bottom: 15px;
}

.warning-compact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    border: 1px solid #eee;
    border-left: 4px solid #e74c3c;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 3px;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.warning-compact-title {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.warning-compact-details {
    color: #666;
    font-size: 0.8rem;
    margin-right: auto;
    /* Push button to right */
}

.warning-compact-btn {
    background-color: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.75rem;
    margin-left: 10px;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.75rem;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 3px;
    color: #3274d6;
}

.bottom-nav-item:hover {
    background-color: #f5f5f5;
}

/* Data Card Styles (Restored) */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.data-card-header {
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.data-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #333;
}

.data-card-label {
    color: #666;
    font-weight: 500;
}

.data-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.btn-action {
    display: inline-block;
    padding: 6px 12px;
    background-color: #3274d6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.btn-action:hover {
    background-color: #2868c7;
}

label.btn-action {
    cursor: pointer;
}

/* Primary button (used across rigging/office) */
.btn-primary {
    background-color: #3274d6;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2868c7;
    color: #fff;
}

input.btn-primary,
button.btn-primary {
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    height: auto;
    margin: 0;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* Secondary button */
.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    color: #fff;
}

/* Shared button sizing & dark-mode toggle helpers */
.btn-lg {
    font-size: 1rem;
    padding: 12px 25px;
}

.dark-toggle-btn {
    width: auto;
    background: none;
    color: #666;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
}

.dark-toggle-btn-solid {
    width: auto;
    margin-top: 0;
    background: #34495e;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* Button size helpers (use with .btn-action / .btn-primary / etc.) */
.btn-size-xs {
    padding: 2px 8px;
    font-size: 0.8rem;
}

.btn-size-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
}

.btn-size-md {
    padding: 6px 15px;
    font-size: 0.9rem;
}

.btn-size-lg {
    padding: 8px 15px;
}

.btn-size-xl {
    padding: 10px 20px;
}

.btn-size-cta {
    padding: 10px 30px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Stack buttons/links vertically with consistent spacing */
.btn-stack {
    display: grid;
    gap: 10px;
}

.btn-stack .btn-action {
    display: block;
}

/* Simple visibility/spacing helpers (used to replace inline styles) */
.is-hidden {
    display: none !important;
}

.mt-10 {
    margin-top: 10px;
}

button.btn-action,
input.btn-action {
    border: none;
    cursor: pointer;
    background-color: #3274d6;
    color: #fff;
}

button.btn-action:disabled,
input.btn-action:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Make status/action button colors work on real buttons too */
input.btn-danger,
button.btn-danger,
input.btn-success,
button.btn-success,
input.btn-warning,
button.btn-warning,
input.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

/* Per-color backgrounds for input[type=submit] elements.
   input[type=submit] global rule has specificity 0,0,1,1 which beats class-only rules (0,0,1,0).
   These input.btn-X rules have the same specificity but appear later, so they win. */
input.btn-primary   { background-color: #3274d6; color: #fff; }
input.btn-success   { background-color: #2ecc71; color: #fff; }
input.btn-danger    { background-color: #e74c3c; color: #fff; }
input.btn-warning   { background-color: #f39c12; color: #fff; }
input.btn-secondary { background-color: #95a5a6; color: #fff; }

/* Keep link buttons from inheriting default link colors */
a.btn-secondary:link,
a.btn-secondary:visited {
    color: #fff;
}

/* Rig Grid & Cards */
.rig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.rig-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, box-shadow 0.1s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.rig-card:active {
    transform: scale(0.98);
}

.rig-card.tandem {
    border-top: 4px solid #3498db;
    background-color: #f0f8ff;
}

.rig-card.sport {
    border-top: 4px solid #2ecc71;
}

.rig-card.customer {
    border-top: 4px solid #9b59b6;
}

.rig-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f9f9f9;
    border-color: #eee;
}

.rig-card .rig-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.rig-sub {
    font-size: 0.85rem;
    color: #666;
}

.rig-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    background: #e74c3c;
    color: white;
}

.section-header {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #444;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* Modern Header & Navigation */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.page-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    border: none;
    padding: 0;
    letter-spacing: -0.5px;
}

.modern-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: #fff;
    color: #555;
    text-decoration: none;
    margin-right: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.modern-back-btn:hover {
    background-color: #f8f9fa;
    color: #3274d6;
    border-color: #dce4ec;
    transform: translateX(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.modern-back-btn i {
    font-size: 1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .modern-back-btn {
        display: none;
        /* Hidden on mobile as requested */
    }

    .page-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        justify-content: center;
        /* Center title on mobile */
        text-align: center;
        flex-wrap: wrap;
    }

    .page-header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: center;
        margin-top: 10px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-tile {
        min-height: 48px;
        font-size: 0.8rem;
        padding: 7px 5px;
    }

    .comp-table-desktop {
        display: none;
    }

    .comp-mobile-list {
        display: block;
    }
}

/* Desktop: hide mobile comp cards, show table (reversed from above to fix order) */
@media (min-width: 769px) {
    .comp-mobile-list {
        display: none;
    }
}

/* Dark Mode Styles */
.dark-mode body {
    background-color: #0d0d0d;
    color: #e0e0e0;
}

.dark-mode .content {
    background-color: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.5);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

.dark-mode .data-card,
.dark-mode .rent-card,
.dark-mode .jumper-card,
.dark-mode .rig-card,
.dark-mode .dashboard-card,
.dark-mode .dashboard-tile,
.dark-mode .warning-compact-item,
.dark-mode .form-card,
.dark-mode .search-form,
.dark-mode .report-card,
.dark-mode .packer-card {
    background-color: #2d2d2d !important;
    color: #e0e0e0;
    border-color: #444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dark-mode .data-card-header,
.dark-mode .rent-header {
    border-bottom-color: #444;
}

.dark-mode input[type="text"],
.dark-mode input[type="password"],
.dark-mode input[type="email"],
.dark-mode input[type="date"],
.dark-mode input[type="number"],
.dark-mode select,
.dark-mode textarea {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

.dark-mode .bottom-nav {
    background-color: #1e1e1e;
    border-top-color: #333;
}

.dark-mode .bottom-nav-item {
    color: #aaa;
}

.dark-mode .bottom-nav-item.active,
.dark-mode .bottom-nav-item:hover {
    color: #3274d6;
    background-color: #2d2d2d;
}

.dark-mode th {
    background-color: #333;
    color: #e0e0e0;
}

.dark-mode td,
.dark-mode th {
    border-color: #444;
}

.dark-mode .btn-filter {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.dark-mode .btn-filter:hover:not(.active) {
    background-color: #444;
}

.dark-mode .packer-header {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Fix for specific elements */
.dark-mode .login {
    background-color: #1e1e1e;
}

.dark-mode .login h1 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

.dark-mode .login form input {
    background-color: #333;
    color: white;
    border-color: #444;
}

/* Generic Card Box (replaces inline styles) */
.card-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dark-mode .card-box {
    background-color: #2d2d2d !important;
    color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Rigging Status Box Dark Mode */
.dark-mode #rig_status_box {
    background-color: #2d2d2d !important;
    border-color: #3274d6 !important;
}

.dark-mode #rig_instruction {
    color: #5dade2 !important;
}

.dark-mode #rig_display {
    color: #aaa !important;
}

/* Rigging Dashboard Cards */
.dark-mode .data-card-wide {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .data-card-wide.active {
    background-color: #1a3a5a !important;
    border-left-color: #3498db !important;
}

/* Alert Classes */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

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

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

/* Dark Mode Overrides for Alerts */
.dark-mode .alert-success {
    background-color: #1e4620;
    color: #d4edda;
    border-color: #2b5e2e;
}

.dark-mode .alert-danger {
    background-color: #4c1116;
    color: #f8d7da;
    border-color: #6e1920;
}

/* Specific Page Overrides */
.dark-mode .backup-card,
.dark-mode .settings-card {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .backup-info {
    color: #e0e0e0;
}

.dark-mode .settings-card h3 {
    color: #e0e0e0;
}

.dark-mode .cron-info {
    background-color: #1a3a5e;
    border-left-color: #3498db;
    color: #e0e0e0;
}

.dark-mode .cron-info code {
    background-color: #111;
    color: #eee;
}

.dark-mode .form-group label {
    color: #ccc;
}

.dark-mode input[type="submit"] {
    background-color: #3274d6;
    border-color: #2868c7;
    color: white;
}

/* Restore per-color variants in dark mode (overridden by .dark-mode input[type="submit"] above) */
.dark-mode input.btn-success   { background-color: #27ae60; color: #fff; }
.dark-mode input.btn-danger    { background-color: #c0392b; color: #fff; }
.dark-mode input.btn-warning   { background-color: #e67e22; color: #fff; }
.dark-mode input.btn-secondary { background-color: #7f8c8d; color: #fff; }

/* Office Suite Overrides */
.dark-mode .form-control {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

.dark-mode .btn-submit {
    background-color: #2ecc71;
    /* Keep green but maybe darker? */
    color: white;
    border: none;
}

.dark-mode .btn-cancel {
    background-color: #7f8c8d;
    color: white;
    border: none;
}

.dark-mode .report-header {
    border-bottom-color: #444;
    color: #e0e0e0;
}

.dark-mode .report-row {
    border-bottom-color: #444;
}

.dark-mode .report-label {
    color: #aaa;
}

.dark-mode .report-value {
    color: #e0e0e0;
}

.dark-mode .packer-name {
    color: #e0e0e0;
}


.dark-mode .packer-type {
    color: #aaa;
}

/* Rigging Specific Styles */
.data-card-wide {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 10px !important;
    min-height: 40px;
    text-align: left !important;
}

.data-card-wide.tandem {
    background-color: #e8f4fc;
    border-left: 4px solid #3498db;
}

.data-card-wide .rig-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.rig-detail {
    font-size: 0.75rem;
    color: #666;
    margin-top: 1px;
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.status-online {
    background: #28a745;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-transform: none;
    border-radius: 999px;
    font-size: 0.85em;
    margin-left: 8px;
}

.status-badge.status-offline {
    background: #6c757d;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-transform: none;
    border-radius: 999px;
    font-size: 0.85em;
    margin-left: 8px;
}

/* Rigging dashboard */
.content-rigging-home {
    padding-top: 10px !important;
    margin-top: 0 !important;
}

.rigging-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.rigging-header-row .card-title {
    margin: 0;
}

.rigging-nfc-panel {
    margin-top: 10px;
}

.rigging-nfc-panel .nfc-trigger-btn {
    padding: 10px;
    gap: 10px;
}

.rigging-nfc-panel .nfc-icon {
    font-size: 1.6rem;
}

.rigging-nfc-panel .nfc-label {
    font-size: 1rem;
}

.rigging-nfc-panel .nfc-status {
    font-size: 0.9rem;
}

/* Rig editor */
.rig-editor .rig-gear-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rig-editor .quick-create-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.rig-editor .quick-create-hidden {
    display: none;
}

@media (max-width: 720px) {
    .rig-editor .quick-create-grid {
        grid-template-columns: 1fr;
    }

    .rig-editor .rig-gear-actions .btn-action {
        width: 100%;
    }

    .rig-editor .form-actions .btn-primary {
        width: 100%;
    }
}

/* Admin modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-overlay.is-open {
    display: flex;
}

.data-card-inactive {
    opacity: 0.85;
    background-color: #f8f9fa;
}

.dark-mode .data-card-inactive {
    background-color: #2a2a2a;
}

.role-muted {
    font-size: 0.8rem;
    color: #666;
    margin-left: 8px;
}

.dark-mode .role-muted {
    color: #999;
}

.form-card-spaced {
    margin-bottom: 20px;
}

.is-collapsed {
    display: none !important;
}

/* Rig service status colors (override via --status-* on .content-rig-status) */
.content-rig-status .warning {
    color: var(--status-warning, #e67e22);
    font-weight: bold;
}

.content-rig-status .overdue {
    color: var(--status-overdue, #e74c3c);
    font-weight: bold;
}

.content-rig-status .insp-warning {
    color: var(--status-insp-warning, #e67e22);
    font-weight: bold;
}

.content-rig-status .insp-overdue {
    color: var(--status-insp-overdue, #e74c3c);
    font-weight: bold;
}

/* Pack module */
.content-pack-home {
    padding-top: 10px !important;
    margin-top: 0 !important;
}

.packer-header {
    background: linear-gradient(135deg, #2980b9 0%, #2c3e50 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.packer-header .packer-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.btn-filter {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-filter.active {
    background: #3274d6;
    color: #fff;
    border-color: #3274d6;
}

.btn-filter:hover:not(.active) {
    background: #f0f0f0;
}

.packer-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.packer-select-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.15s;
}

.packer-select-card:hover {
    transform: translateY(-2px);
}

.packer-select-card-header {
    background: var(--card-accent, #3498db);
    padding: 14px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.packer-select-card-body {
    padding: 12px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.packer-select-card-body strong {
    color: #333;
    font-size: 1.05rem;
}

.dark-mode .packer-select-card {
    background: #2d2d2d;
}

.dark-mode .packer-select-card-body {
    color: #aaa;
}

.dark-mode .packer-select-card-body strong {
    color: #e0e0e0;
}

/* Dashboard tile variants */
.dashboard-tile-accent {
    background-color: #e67e22 !important;
}

.dashboard-tile-success {
    background-color: #27ae60 !important;
}

.dashboard-tile-danger {
    background-color: #c0392b !important;
}

.dashboard-tile-danger:hover {
    background-color: #a93226 !important;
}

/* Gear rent */
.rent-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.rent-card.in-use {
    border-left-color: #e74c3c;
}

.rent-header {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.rent-details {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.time-elapsed {
    font-weight: 700;
    color: #e67e22;
}

.dark-mode .rent-card {
    background: #2d2d2d;
}

.dark-mode .rent-details {
    color: #aaa;
}

/* NFC compact (rinfo, pack index) */
.nfc-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.nfc-compact-meta {
    font-size: 0.95rem;
    color: #666;
}

.dark-mode .nfc-compact-meta {
    color: #aaa;
}

.nfc-panel {
    margin-top: 10px;
}

/* Subtle NFC row — low-profile strip, not a full card */
.nfc-subtle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0 10px;
    gap: 10px;
}

.nfc-subtle-label {
    font-size: 0.8rem;
    color: #999;
}

.dark-mode .nfc-subtle-label {
    color: #666;
}

/* Extra-small button variant */
.btn-xs {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.4;
}

.nfc-panel .nfc-trigger-btn.vertical {
    padding: 10px;
    gap: 6px;
}

.nfc-panel #nfc_display_value {
    font-size: 1.05rem !important;
}

/* Receipt document (office) */
.receipt-document .receipt-logo-row {
    margin-bottom: 16px;
}

.receipt-document .receipt-logo-row img {
    max-width: 200px;
    height: auto;
}

.receipt-document .receipt-dz-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 6px 0 0 0;
    color: var(--text-primary, #333);
}

/* Rig component mobile card list (rinfo.php) */
.comp-mobile-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.comp-mobile-item.comp-has-alert {
    border-left: 3px solid var(--status-overdue, red);
}

.comp-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 12px;
    gap: 8px;
}

.comp-mobile-title {
    flex: 1;
    min-width: 0;
}

.comp-mobile-type {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.comp-mobile-desc {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.comp-mobile-alerts {
    margin-top: 5px;
}

.comp-mobile-alert {
    font-size: 0.82rem;
    margin-top: 2px;
    line-height: 1.3;
}

.comp-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.comp-mobile-details {
    border-top: 1px solid #eee;
    padding: 8px 12px;
    background: #f9f9f9;
}

.comp-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.comp-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 8px;
    flex-shrink: 0;
}

.dark-mode .comp-mobile-item {
    border-color: #444;
    background: #2d2d2d;
}

.dark-mode .comp-mobile-desc {
    color: #e0e0e0;
}

.dark-mode .comp-mobile-type,
.dark-mode .comp-detail-label {
    color: #aaa;
}

.dark-mode .comp-mobile-details {
    background: #252525;
    border-top-color: #444;
}

.dark-mode .comp-detail-row {
    border-bottom-color: #3a3a3a;
}

/* Compact datacard row (rinfo.php) */
.datacard-compact-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.datacard-thumb-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.datacard-thumb {
    max-height: 48px;
    max-width: 72px;
    border: 1px solid #ddd;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.datacard-none {
    font-size: 0.85rem;
    color: #999;
    flex: 1;
}

.dark-mode .datacard-thumb {
    border-color: #555;
}

.dark-mode .datacard-none {
    color: #777;
}

/* Service Due filter bar */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-btn-group {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.filter-btn {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #444;
    background: #f5f5f5;
    text-decoration: none;
    border-right: 1px solid #ddd;
    transition: background 0.15s, color 0.15s;
}

.filter-btn:last-child {
    border-right: none;
}

.filter-btn:hover {
    background: #e8e8e8;
    color: #222;
}

.filter-btn-active,
.filter-btn.filter-btn-active {
    background: #3274d6;
    color: #fff;
    font-weight: 600;
}

.filter-btn-active:hover {
    background: #2868c7;
    color: #fff;
}

.filter-date-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-date-input {
    flex: 1;
    min-width: 0;
}

/* Dark mode */
html.dark-mode .filter-btn-group {
    border-color: #444;
}

html.dark-mode .filter-btn {
    background: #2a2a2a;
    color: #ccc;
    border-right-color: #444;
}

html.dark-mode .filter-btn:hover {
    background: #333;
    color: #fff;
}

html.dark-mode .filter-btn-active,
html.dark-mode .filter-btn.filter-btn-active {
    background: #3274d6;
    color: #fff;
}

/* Compact geardue cards */
.geardue-primary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 6px;
}

.geardue-field {
    font-size: 0.85rem;
}

.geardue-field-label {
    color: #888;
    margin-right: 3px;
}

.geardue-details-toggle {
    margin-top: 2px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 2px 6px;
    font-size: 0.78rem;
    color: #3274d6;
    text-decoration: underline;
}

.geardue-details {
    margin-top: 6px;
    border-top: 1px solid #eee;
    padding-top: 6px;
}

.dark-mode .geardue-field-label {
    color: #888;
}

.dark-mode .geardue-details {
    border-top-color: #444;
}

/* Owner info collapse (rinfo.php) */
.owner-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.owner-details-toggle {
    cursor: pointer;
    border: none;
    background: none;
    padding: 2px 6px;
    font-size: 0.78rem;
    color: #3274d6;
    text-decoration: underline;
    flex-shrink: 0;
}

.owner-details {
    margin-top: 6px;
    border-top: 1px solid #eee;
    padding-top: 6px;
}

.dark-mode .owner-details {
    border-top-color: #444;
}

/* Gear Summary Card */
.gear-summary-card {
    margin-bottom: 16px;
}

.gear-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

@media (max-width: 480px) {
    .gear-summary-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.gear-summary-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gear-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    font-weight: 600;
}

.dark-mode .gear-summary-label {
    color: #777;
}

.gear-summary-value {
    font-size: 0.92rem;
    font-weight: 500;
}

.gear-summary-link {
    color: #3274d6;
    text-decoration: none;
}

.gear-summary-link:hover {
    text-decoration: underline;
}

/* Datacard header with toggle */
.datacard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-document .receipt-meta-grid {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.receipt-print-meta {
    width: auto;
    margin-bottom: 16px;
    border-collapse: collapse;
}

.receipt-print-meta td {
    padding: 2px 6px 2px 0;
    vertical-align: top;
}

.receipt-print-meta td:first-child {
    white-space: nowrap;
    padding-right: 12px;
}

.receipt-print-header {
    margin-bottom: 12px;
}

.receipt-print-logo {
    margin-bottom: 8px;
}

.receipt-print-logo .receipt-dz-name {
    margin: 4px 0 0 0;
    font-weight: bold;
    font-size: 1.1em;
}

@media print {
    /* Reset mobile-stacked table layout back to proper table for receipt */
    .receipt-document .compact-table,
    .receipt-document .compact-table thead,
    .receipt-document .compact-table tbody,
    .receipt-document .compact-table tfoot,
    .receipt-document .compact-table tr,
    .receipt-document .compact-table th,
    .receipt-document .compact-table td {
        display: revert !important;
    }

    .receipt-document .compact-table thead {
        display: table-header-group !important;
    }

    .receipt-document .compact-table tbody {
        display: table-row-group !important;
    }

    .receipt-document .compact-table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .receipt-document .compact-table th,
    .receipt-document .compact-table td {
        display: table-cell !important;
        width: auto !important;
        text-align: left !important;
        padding: 6px 8px !important;
        background: transparent !important;
        position: static !important;
        border-bottom: none !important;
    }

    .receipt-document .compact-table td:last-child,
    .receipt-document .compact-table th:last-child {
        text-align: right !important;
    }

    .receipt-document .compact-table td::before {
        display: none !important;
    }

    .receipt-document .table-scroll {
        overflow: visible !important;
    }
}

.nfc-trigger-btn {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #f0f8ff;
    border: 2px dashed #3498db;
    color: #333;
    cursor: pointer;
}

.nfc-trigger-btn.vertical {
    flex-direction: column;
    padding: 15px;
    gap: 5px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
}

/* Rigging Dark Mode Overrides */
.dark-mode .data-card-wide.tandem {
    background-color: #1a2634;
    /* Dark blueish background */
    border-left-color: #3498db;
    color: #e0e0e0;
}

.dark-mode .rig-card .rig-name,
.dark-mode .data-card-wide .rig-name {
    color: #e0e0e0;
}

.dark-mode .rig-detail {
    color: #aaa;
}

.dark-mode .nfc-trigger-btn {
    background: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

.dark-mode .nfc-trigger-btn div[style*="color: #2980b9"] {
    color: #5dade2 !important;
    /* Lighter blue for dark mode text */
}

/* Service Due / Warning Colors in Dark Mode */
.dark-mode .warning-compact-title {
    color: #e0e0e0;
}

.dark-mode .warning {
    color: #f39c12 !important;
}

.dark-mode .overdue {
    color: #e74c3c !important;
}

.dark-mode .insp-warning {
    color: #f39c12 !important;
}

.dark-mode .insp-overdue {
    color: #e74c3c !important;
}

/* Icon Buttons */
.btn-icon-danger {
    background: none;
    border: none;
    color: #dc3545;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
}

.dark-mode .btn-icon-danger {
    color: #e74c3c;
}

.status-completed,
.status-canceled {
    color: #fff;
    margin-bottom: 5px;
}

.status-completed {
    background-color: #2ecc71;
}

.status-canceled {
    background-color: #e74c3c;
}

/* Office: salary search & summary cards */
.search-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 15px;
}

.checkbox-wrapper label {
    float: none;
    font-weight: 500;
}

.report-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.report-header {
    background: #f8f9fa;
    padding: 8px 12px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.report-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

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

.report-label {
    color: #666;
}

.report-value {
    font-weight: 600;
    color: #333;
}

.report-row-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.report-row-detail-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-weight: 600;
}

.report-row-detail-sub {
    font-size: 0.9rem;
    color: #666;
    width: 100%;
}

.dark-mode .report-row-detail-sub {
    color: #aaa;
}

.section-title {
    font-size: 1.15rem;
    color: #444;
    margin: 20px 0 12px;
    font-weight: 600;
    border-bottom: none;
    padding-bottom: 0;
}

.dark-mode .section-title {
    color: #e0e0e0;
}

/* Office dashboard */
.office-stat-card {
    text-align: center;
    margin-top: 20px;
}

.office-stat-card .data-card-header {
    justify-content: center;
}

.office-stat-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    gap: 16px;
}

.office-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3274d6;
}

.dark-mode .office-stat-value {
    color: #6ea8fe;
}

.dashboard-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.dark-mode .dashboard-section {
    border-top-color: #444;
}

.chart-block {
    margin-bottom: 24px;
}

.chart-block-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 10px;
}

.dark-mode .chart-block-title {
    color: #bbb;
}

.chart-canvas-wrap {
    width: 100%;
    position: relative;
    min-height: 160px;
}

.chart-canvas-wrap--short {
    min-height: 140px;
}

.chart-timeframe-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.chart-timeframe-select {
    max-width: 280px;
    width: 100%;
}

.office-toolbar {
    text-align: center;
    margin: 16px 0;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 20px 12px;
    margin: 0;
}

.dark-mode .empty-state {
    color: #aaa;
}

.table-empty td {
    text-align: center !important;
    color: #777 !important;
    padding: 16px !important;
}

.cell-count {
    font-weight: 700;
    text-align: center;
}

.packer-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.packer-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

.packer-type {
    color: #777;
    font-size: 0.88rem;
    margin-top: 2px;
}

.receipt-list-table input[type='checkbox'] {
    transform: scale(1.15);
    cursor: pointer;
}

.filter-link {
    display: block;
    text-align: center;
    margin: 20px 0;
    color: #3274d6;
    text-decoration: none;
    font-weight: 600;
}

.filter-link:hover {
    text-decoration: underline;
}

.receipt-customer {
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.receipt-customer:hover {
    color: #3274d6;
}

.dark-mode .receipt-customer {
    color: #e0e0e0;
}

.dark-mode .receipt-customer:hover {
    color: #6ea8fe;
}

.form-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 16px 0;
}

/* Salary / legacy search form — match form-card */
.search-form.form-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    max-width: none;
}

.search-form .form-actions-bar {
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .packer-card {
        padding: 8px 12px;
    }

    .form-actions-bar {
        flex-direction: column;
    }

    .form-actions-bar .btn-action {
        width: 100%;
    }
}

/* Shared report / log tables */
.compact-table,
.job-list-table,
.jobstats-table,
.receipt-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.92rem;
    background: #fff;
}

.compact-table th,
.compact-table td,
.job-list-table th,
.job-list-table td,
.jobstats-table th,
.jobstats-table td,
.receipt-list-table th,
.receipt-list-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.compact-table th,
.job-list-table th,
.jobstats-table th,
.receipt-list-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.compact-table tr:last-child td,
.job-list-table tr:last-child td,
.jobstats-table tr:last-child td,
.receipt-list-table tr:last-child td {
    border-bottom: none;
}

.compact-table tbody tr:hover,
.job-list-table tbody tr:hover,
.jobstats-table tbody tr:hover,
.receipt-list-table tbody tr:hover {
    background-color: #f5f8fc;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.report-section {
    margin-top: 24px;
}

.report-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #444;
}

.job-list-meta {
    color: #666;
    font-size: 0.88rem;
}

.job-list-comment {
    color: #e67e22;
    font-size: 0.88rem;
    max-width: 220px;
}

.job-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-list-actions .btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    color: white;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-info {
    background-color: #3498db;
}

.btn-note {
    background-color: #95a5a6;
}

.dark-mode .compact-table,
.dark-mode .job-list-table,
.dark-mode .jobstats-table,
.dark-mode .receipt-list-table,
.dark-mode .data-table {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.dark-mode .compact-table th,
.dark-mode .job-list-table th,
.dark-mode .jobstats-table th,
.dark-mode .receipt-list-table th,
.dark-mode .data-table th {
    background-color: #333;
    color: #e0e0e0;
}

.dark-mode .compact-table td,
.dark-mode .job-list-table td,
.dark-mode .jobstats-table td,
.dark-mode .receipt-list-table td,
.dark-mode .data-table td {
    border-bottom-color: #444;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .data-table tr {
    background-color: #2d2d2d;
}

.dark-mode .compact-table tbody tr:hover,
.dark-mode .job-list-table tbody tr:hover,
.dark-mode .jobstats-table tbody tr:hover,
.dark-mode .receipt-list-table tbody tr:hover {
    background-color: #383838;
}

.dark-mode .report-section h4 {
    color: #ccc;
}

/* Job Stats Form */
.jobstats-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.jobstats-form .form-group {
    flex: 1 1 160px;
    min-width: 140px;
    margin-bottom: 0;
}

.jobstats-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.98em;
}

.jobstats-form select,
.jobstats-form input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.98rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.dark-mode .jobstats-form label {
    color: #ccc;
}

.dark-mode .jobstats-form select,
.dark-mode .jobstats-form input[type="date"] {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

/* Inactive Data Card Header */
.data-card-header.inactive {
    background-color: #95a5a6;
    color: white;
}

.dark-mode .data-card-header.inactive {
    background-color: #555;
    color: #e0e0e0;
}

/* Inline Search Bar */
.search-bar-inline {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar-inline .form-control {
    flex: 1;
    min-width: 0;
}

.search-bar-inline .btn-action {
    flex: 0 0 100px;
}

/* Info Card Styles */
.info-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
}

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

.info-label {
    font-weight: bold;
    color: #555;
}

.info-value {
    color: #333;
    text-align: right;
}

/* Dark Mode Info Card */
.dark-mode .info-card {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .info-row {
    border-bottom-color: #444;
}

.dark-mode .info-label {
    color: #aaa;
}

.dark-mode .info-value {
    color: #e0e0e0;
}

/* Form Container (Admin) */
/* Compact Card List (for parameters etc) */
.compact-list .data-card {
    padding: 10px;
    margin-bottom: 10px;
}

.compact-list .data-card-header {
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compact-list .data-card-row {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
}

.dark-mode .compact-list .data-card-row {
    color: #b0b0b0;
}

.compact-list .data-card-actions {
    margin-top: 5px;
    text-align: right;
}

.compact-list .btn-action {
    padding: 4px 10px;
    font-size: 0.85rem;
}

/* System Param Card */
.data-card.system-param {
    background-color: #f8f9fa;
}


/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Modern Form UI (used by office/rigging pages) */
.form-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin: 0 auto 20px;
    width: 100%;
}

.form-card-wide {
    max-width: 900px;
}

.form-card-narrow {
    max-width: 520px;
}

/* Override legacy .content form flex layout inside modern cards */
.form-card form {
    display: block !important;
    width: 100%;
}

/* Explicit form layouts */
.form-card form.form-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    justify-content: stretch;
    align-items: start;
}

.form-card form.form-inline {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-card form.form-inline .form-group {
    flex: 1;
    min-width: 240px;
}

.form-card form.form-inline .form-control {
    flex: 1;
}

/* Allow using the same layout helpers outside .form-card too */
form.form-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    justify-content: stretch;
    align-items: start;
    width: 100%;
}

form.form-inline {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
}

form.form-inline .form-group {
    flex: 1;
    min-width: 240px;
}

/* Two-column content sections (not necessarily forms) */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.split-col-divider {
    border-left: 1px solid #eee;
    padding-left: 20px;
}

@media (max-width: 768px) {
    .split-grid {
        grid-template-columns: 1fr;
    }

    .split-col-divider {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #eee;
        padding-top: 20px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.form-group label,
.form-label {
    float: none;
    text-align: left;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    float: none;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Small inline layout utilities (used for checkbox rows, etc.) */
.inline-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.form-span-full {
    grid-column: 1 / -1;
}

.btn-submit,
.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.btn-submit {
    background-color: #2ecc71;
    color: #fff;
}

.btn-submit:hover {
    background-color: #27ae60;
    color: #fff;
}

.btn-cancel {
    background-color: #95a5a6;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
    color: #fff;
}

/* Data Table (Admin/Reports) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.data-table th,
.data-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
}

/* Actions Bar & Search Box */
.actions-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

/* Dark Mode Actions */
.dark-mode .actions-bar {
    background-color: #333;
}

/* Responsive stacked tables (mobile) */
@media screen and (max-width: 768px) {
    .data-table thead,
    .compact-table thead,
    .job-list-table thead,
    .jobstats-table thead,
    .receipt-list-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td,
    .compact-table,
    .compact-table tbody,
    .compact-table tr,
    .compact-table td,
    .job-list-table,
    .job-list-table tbody,
    .job-list-table tr,
    .job-list-table td,
    .jobstats-table,
    .jobstats-table tbody,
    .jobstats-table tr,
    .jobstats-table td,
    .receipt-list-table,
    .receipt-list-table tbody,
    .receipt-list-table tr,
    .receipt-list-table td {
        display: block;
        width: 100%;
    }

    .data-table tr,
    .compact-table tr,
    .job-list-table tr,
    .jobstats-table tr,
    .receipt-list-table tr {
        margin-bottom: 12px;
        border: 1px solid #ddd;
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .dark-mode .data-table tr,
    .dark-mode .compact-table tr,
    .dark-mode .job-list-table tr,
    .dark-mode .jobstats-table tr,
    .dark-mode .receipt-list-table tr {
        background: #2d2d2d;
        border-color: #444;
    }

    .data-table td,
    .compact-table td,
    .job-list-table td,
    .jobstats-table td,
    .receipt-list-table td {
        text-align: right;
        padding: 7px 10px 7px 42%;
        position: relative;
        border-bottom: 1px solid #eee;
    }

    .dark-mode .data-table td,
    .dark-mode .compact-table td,
    .dark-mode .job-list-table td,
    .dark-mode .jobstats-table td,
    .dark-mode .receipt-list-table td {
        border-bottom-color: #444;
    }

    .data-table td:last-child,
    .compact-table td:last-child,
    .job-list-table td:last-child,
    .jobstats-table td:last-child,
    .receipt-list-table td:last-child {
        border-bottom: none;
    }

    .data-table td::before,
    .compact-table td::before,
    .job-list-table td::before,
    .jobstats-table td::before,
    .receipt-list-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 38%;
        padding-right: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
        font-weight: 600;
        color: #555;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    .dark-mode .data-table td::before,
    .dark-mode .compact-table td::before,
    .dark-mode .job-list-table td::before,
    .dark-mode .jobstats-table td::before,
    .dark-mode .receipt-list-table td::before {
        color: #aaa;
    }

    .data-table td:first-child,
    .compact-table td:first-child,
    .job-list-table td:first-child,
    .jobstats-table td:first-child,
    .receipt-list-table td:first-child {
        text-align: left;
        padding: 10px;
        background: #f8f9fa;
        font-weight: 600;
    }

    .dark-mode .data-table td:first-child,
    .dark-mode .compact-table td:first-child,
    .dark-mode .job-list-table td:first-child,
    .dark-mode .jobstats-table td:first-child,
    .dark-mode .receipt-list-table td:first-child {
        background: #333;
    }

    .data-table td:first-child::before,
    .compact-table td:first-child::before,
    .job-list-table td:first-child::before,
    .jobstats-table td:first-child::before,
    .receipt-list-table td:first-child::before {
        display: none;
    }

    .job-list-comment {
        max-width: none;
    }

    .data-card-wide {
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .data-card-wide .info-col {
        flex: 1;
        min-width: 0;
    }

    .data-card-wide .action-col {
        flex-shrink: 0;
        display: flex;
        justify-content: flex-end;
        gap: 4px;
    }
}

/* Utility Classes */

/* Screen-only / print-only helpers */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block;
    }
}

@media print {
    .no-print,
    .bottom-nav {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    /* Force light mode for printing — dark mode backgrounds waste ink */
    .dark-mode body,
    .dark-mode .content,
    .dark-mode .data-card,
    .dark-mode .form-card,
    .dark-mode .data-card-header,
    .dark-mode .section-header {
        background: #fff !important;
        color: #000 !important;
        border-color: #ccc !important;
    }

    .content {
        box-shadow: none !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 10px !important;
    }

    .data-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    /* Receipt document print styling */
    .receipt-document {
        font-size: 11pt;
    }

    .receipt-document .receipt-print-logo img {
        max-height: 60px;
        width: auto;
    }

    .receipt-document .section-header {
        font-size: 10pt;
        font-weight: bold;
        margin: 12pt 0 4pt;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        color: #000 !important;
    }

    .receipt-document .receipt-print-meta td {
        color: #000;
        font-size: 10pt;
    }

    .receipt-document .compact-table th {
        font-size: 9pt;
        border-bottom: 2px solid #000 !important;
        padding: 4px 6px !important;
    }

    .receipt-document .compact-table tr:last-child td {
        border-top: 1px solid #000 !important;
        font-weight: bold;
    }
}

.text-muted {
    color: #777;
    font-size: 0.92rem;
}

.dark-mode .text-muted {
    color: #999;
}

.text-danger {
    color: #e74c3c !important;
}

.text-primary {
    color: #3274d6;
}

.dark-mode .text-primary {
    color: #6ea8fe;
}

.text-warning {
    color: #e67e22;
}

.dark-mode .text-warning {
    color: #f39c12;
}

/* Note/info highlight box */
.note-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.dark-mode .note-box {
    background: #2a2a2a;
    border-color: #444;
}

.text-bold {
    font-weight: bold;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    background-color: #777;
    text-transform: uppercase;
}

.badge-1 {
    background-color: #3498db;
}

.badge-2 {
    background-color: #e67e22;
}

.badge-3 {
    background-color: #95a5a6;
}

.badge-4 {
    background-color: #9b59b6;
}

.badge-5 {
    background-color: #2ecc71;
}

.badge-6 {
    background-color: #f1c40f;
    color: #333;
}

/* OCR Scan Page */
.scan-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-preview {
    max-width: 100%;
    border: 2px dashed #ccc;
    padding: 10px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    overflow: hidden;
}

.dark-mode .image-preview {
    background: #444;
    border-color: #666;
}

.image-preview img {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.ocr-status {
    padding: 10px;
    background: #e8f4fc;
    border: 1px solid #3498db;
    border-radius: 4px;
    display: none;
    text-align: center;
    color: #000;
}

.dark-mode .ocr-status {
    background: #1a3a5a;
    border-color: #3498db;
    color: #fff;
}

.result-mapping {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .result-mapping {
        grid-template-columns: 1fr;
    }
}

.detected-text-area {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    height: 300px;
    overflow-y: auto;
}

.dark-mode .detected-text-area {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.detected-line {
    padding: 5px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.dark-mode .detected-line {
    border-bottom-color: #555;
}

.detected-line:hover {
    background-color: #eef;
}

.dark-mode .detected-line:hover {
    background-color: #444;
}

.component-section {
    border: 1px solid #eee;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}


/* NFC Scan UI */
.nfc-scan-container {
    position: relative;
    width: 100%;
}

.hidden-scanner-input {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
}

.nfc-icon {
    font-size: 2.5rem;
}

.nfc-text {
    text-align: left;
}

.nfc-label {
    font-weight: bold;
    color: #2980b9;
    font-size: 1.2rem;
}

.dark-mode .nfc-label {
    color: #5dade2;
}

.nfc-status {
    color: #666;
    font-size: 1rem;
}

.dark-mode .nfc-status {
    color: #aaa;
}

/* Dashboard Styles */
.dashboard-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
    padding: 20px;
    flex: 1;
    text-align: center;
    border: 1px solid #eee;
}

.dark-mode .dashboard-card {
    background: #2d2d2d;
    border-color: #444;
}

.dashboard-value {
    font-size: 2.2em;
    font-weight: bold;
    color: #007bff;
}

.dark-mode .dashboard-value {
    color: #5dade2;
}

.dashboard-section {
    margin-bottom: 40px;
}

a.dashboard-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.dashboard-hub-welcome {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-hub-welcome img {
    max-width: 200px;
    margin-bottom: 20px;
}

.dashboard-hub-welcome p {
    color: #666;
    font-size: 1.1rem;
}

.dark-mode .dashboard-hub-welcome p {
    color: #aaa;
}

.dashboard-hub-profile-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.dashboard-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.dashboard-card-icon--pack {
    color: #3274d6;
}

.dashboard-card-icon--rigging {
    color: #e67e22;
}

.dashboard-card-icon--office {
    color: #27ae60;
}

.dashboard-card-icon--admin {
    color: #c0392b;
}

.dashboard-card-icon--pricelist {
    color: #9b59b6;
}

.dashboard-card h3 {
    margin: 0 0 10px;
}

.dashboard-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.dark-mode .dashboard-card p {
    color: #aaa;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-bar {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.dark-mode .search-bar {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

.jumper-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jumper-info {
    flex: 1;
}

.jumper-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
    text-decoration: none;
}

.dark-mode .jumper-name {
    color: #e0e0e0;
}

.jumper-stats {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 4px;
}

.checkin-status {
    font-size: 0.85rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-checked-in {
    background-color: #d4edda;
    color: #155724;
}

.status-not-checked-in {
    background-color: #f8d7da;
    color: #721c24;
}

.template-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

.dark-mode .template-info {
    background: #2d2d2d;
    color: #e0e0e0;
}

.pricelist-public-card {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-mode .pricelist-public-card {
    background: #2d2d2d;
}

.pricelist-public-card h3 {
    margin-top: 0;
}

.pricelist-public-card p {
    color: #666;
    margin-bottom: 15px;
}

.dark-mode .pricelist-public-card p {
    color: #aaa;
}

.pricelist-qr {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}

.pricelist-public-url {
    margin-top: 10px;
}

.pricelist-public-url a {
    color: #3274d6;
    text-decoration: none;
    font-size: 0.9rem;
}

.pricelist-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.8rem;
}

/* Auth & account pages */
body.auth-page {
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

html.dark-mode body.auth-page {
    background-color: #121212;
}

.auth-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.auth-card--wide {
    max-width: 500px;
    text-align: left;
}

html.dark-mode .auth-card {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    max-width: 200px;
    max-height: 100px;
    margin-bottom: 20px;
    object-fit: contain;
}

.auth-title {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.5rem;
    border: none;
}

html.dark-mode .auth-title {
    color: #e0e0e0;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

html.dark-mode .auth-subtitle {
    color: #aaa;
}

.auth-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

html.dark-mode .auth-form-group label {
    color: #aaa;
}

.auth-form-group--icon {
    position: relative;
}

.auth-form-group--icon i {
    position: absolute;
    left: 15px;
    top: 42px;
    color: #aaa;
}

.auth-form-group--icon .form-control {
    padding-left: 40px;
}

.auth-page .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

html.dark-mode .auth-page .form-control {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    background-color: #3274d6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-auth:hover {
    background-color: #2868c7;
}

.btn-auth:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.auth-msg-error {
    color: #e74c3c;
    background-color: #fde8e7;
    padding: 10px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 0.9rem;
}

html.dark-mode .auth-msg-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.auth-msg-success {
    color: #155724;
    background-color: #d4edda;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

html.dark-mode .auth-msg-success {
    background-color: rgba(39, 174, 96, 0.2);
    color: #5dde8a;
}

.auth-link {
    display: block;
    margin-top: 15px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

html.dark-mode .auth-link {
    color: #aaa;
}

.auth-link:hover {
    color: #3274d6;
}

.auth-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 50%;
    z-index: 10;
}

html.dark-mode .auth-theme-toggle {
    color: #aaa;
}

.auth-icon-lg {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.auth-code-input {
    width: 100%;
    padding: 15px;
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
}

html.dark-mode .auth-code-input {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.auth-trust-box {
    text-align: left;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

html.dark-mode .auth-trust-box {
    background-color: #2d2d2d;
}

.auth-trust-box label {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #333;
}

html.dark-mode .auth-trust-box label {
    color: #e0e0e0;
}

.auth-help-text {
    color: #999;
    font-size: 0.85rem;
    margin-top: 15px;
}

.auth-error-list {
    background-color: #fde8e7;
    color: #e74c3c;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.auth-error-list ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.auth-info-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.9rem;
}

html.dark-mode .auth-info-box {
    background-color: rgba(33, 150, 243, 0.1);
    border-left-color: #64b5f6;
    color: #e0e0e0;
}

/* Refined login and two-factor authentication pages */
body.auth-page {
    background: linear-gradient(145deg, #edf4fb 0%, #f7f9fc 55%, #eef1f5 100%);
}

html.dark-mode body.auth-page {
    background: linear-gradient(145deg, #101722 0%, #15191f 55%, #111318 100%);
}

.auth-card {
    padding: 36px;
    border: 1px solid rgba(40, 74, 115, 0.1);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(31, 54, 79, 0.12);
}

html.dark-mode .auth-card {
    border-color: #303640;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-logo {
    max-width: 180px;
    max-height: 86px;
    margin-bottom: 14px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 1.65rem;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0 auto 26px;
    line-height: 1.5;
    max-width: 320px;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    margin-bottom: 7px;
}

.auth-page .form-control {
    min-height: 46px;
    padding: 12px 14px;
    border-color: #cfd7e2;
    border-radius: 8px;
}

.auth-page .form-control:focus,
.auth-code-input:focus {
    border-color: #3274d6;
    box-shadow: 0 0 0 3px rgba(50, 116, 214, 0.14);
    outline: none;
}

.auth-form-group label > i {
    width: 16px;
    margin-right: 4px;
    color: #7f8b9a;
    text-align: center;
}

.btn-auth {
    border-radius: 8px;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-auth:hover {
    box-shadow: 0 6px 16px rgba(50, 116, 214, 0.22);
}

.btn-auth:active {
    transform: translateY(1px);
}

.auth-theme-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(40, 74, 115, 0.12);
}

html.dark-mode .auth-theme-toggle {
    background: rgba(30, 30, 30, 0.8);
    border-color: #303640;
}

.auth-icon-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    color: #3274d6;
    background: #edf4ff;
    border-radius: 16px;
    font-size: 1.55rem;
}

html.dark-mode .auth-icon-lg {
    color: #7fb0fa;
    background: rgba(50, 116, 214, 0.16);
}

.auth-code-input {
    border: 1px solid #cfd7e2;
    border-radius: 8px;
    font-size: 1.65rem;
}

.auth-trust-box {
    background-color: #f5f7fa;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

html.dark-mode .auth-trust-box {
    border-color: #3a3a3a;
}

.auth-help-text {
    margin: 18px auto 0;
    line-height: 1.45;
    max-width: 320px;
}

@media (max-width: 480px) {
    body.auth-page {
        align-items: flex-start;
        padding: 70px 14px 24px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .auth-theme-toggle {
        top: 14px;
        right: 14px;
    }

    .auth-code-input {
        font-size: 1.45rem;
        letter-spacing: 6px;
    }
}

.password-strength {
    margin-top: 5px;
    font-size: 0.85rem;
}

.strength-weak {
    color: #e74c3c;
}

.strength-medium {
    color: #f39c12;
}

.strength-strong {
    color: #27ae60;
}

.text-hint {
    color: #666;
    font-size: 0.85rem;
}

html.dark-mode .text-hint {
    color: #999;
}

/* Account settings */
.settings-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

html.dark-mode .settings-section {
    background: #1e1e1e;
    border-color: #444;
}

.settings-section-intro {
    margin-bottom: 20px;
}

.settings-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
    border-bottom: 2px solid #3274d6;
    padding-bottom: 10px;
}

html.dark-mode .settings-section h2 {
    color: #e0e0e0;
}

.device-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

html.dark-mode .device-item {
    background: #2d2d2d;
}

.device-name {
    font-weight: bold;
    color: #333;
}

html.dark-mode .device-name {
    color: #e0e0e0;
}

.device-meta {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Receipt / rigging admin helpers */
.receipt-checklist-option {
    padding: 10px;
}

.receipt-checklist-option .form-inline {
    align-items: center;
    gap: 10px;
}

.receipt-checklist-label {
    flex: 1;
    font-weight: 500;
}

.data-card-inactive {
    opacity: 0.75;
    background: #f0f0f0;
}

html.dark-mode .data-card-inactive {
    background: #2a2a2a;
}

.receipt-customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.receipt-customer-name {
    font-size: 1.1rem;
}

.receipt-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.receipt-recent-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

html.dark-mode .receipt-recent-label {
    color: #aaa;
}

.form-panel-footer {
    margin-top: 15px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

html.dark-mode .form-panel-footer {
    border-top-color: #444;
}

.admin-bulk-warning {
    margin-bottom: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
}

html.dark-mode .admin-bulk-warning {
    background: rgba(255, 243, 205, 0.15);
    border-color: #665c00;
}

.admin-bulk-warning label {
    font-weight: bold;
    color: #856404;
}

html.dark-mode .admin-bulk-warning label {
    color: #e0c060;
}

.param-value-muted {
    font-size: 0.8rem;
    color: #666;
}

html.dark-mode .param-value-muted {
    color: #999;
}

.form-card h3.section-title--flush {
    margin-top: 0;
}

.subsection-title {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

html.dark-mode .subsection-title {
    border-bottom-color: #444;
}

.form-check--bold {
    font-weight: 600;
}

.form-control--date {
    width: auto;
    max-width: 200px;
}

.receipt-checklist-toolbar {
    margin-bottom: 20px;
}

.receipt-checklist-options {
    margin-top: 15px;
}

.search-box .form-control--search {
    width: 100%;
    max-width: 300px;
}

@media (min-width: 769px) {
    .search-box .form-control--search {
        width: 300px;
    }
}

/* -------------------------------------------------------
 * Data-card body / row / label / value
 * Used in rigging detail pages (rinfo, geardue, inspect,
 * ofline, customers, receipt_add, delete)
 * ------------------------------------------------------- */
.data-card-body {
    padding: 2px 0;
}

.data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    gap: 8px;
    font-size: 0.9rem;
}

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

.data-label {
    color: #666;
    font-weight: 500;
    font-size: 0.85rem;
    flex-shrink: 0;
    min-width: 80px;
}

.data-value {
    color: #333;
    text-align: right;
    word-break: break-word;
}

.dark-mode .data-row {
    border-bottom-color: #444;
}

.dark-mode .data-label {
    color: #999;
}

.dark-mode .data-value {
    color: #e0e0e0;
}
