:root {
    --primary: #0e7490;
    /* Professional Ocean/Industrial Blue */
    --primary-dark: #164e63;
    /* Deep Cyan Slate */
    --primary-light: #155e75;
    /* Muted Blue-Green for backgrounds */
    --accent: #f59e0b;
    /* Amber remains for highlights */
    --text-main: #f8fafc;
    /* Crisp White Text */
    --text-light: #cbd5e1;
    /* Soft Gray */
    --bg-app: #0f172a;
    /* Deep Slate Background */
    --white: #1e293b;
    /* Card Background */
    --border: #334155;
    /* Subtle Border */
    --input-bg: #334155;
    /* Input Background */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    padding-bottom: 80px;
    /* Space for bottom nav */
    min-height: 100vh;
    background-image: none !important;
}

/* Fix z-index for content */
#app {
    position: relative;
    z-index: 1;
}

/* Header Branding */
.header {
    background: var(--white);
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 3px solid var(--primary);
    /* Teal line */
}

.header h1 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--white);
    margin: 15px 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    border: 1px solid var(--border);
}

.section-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
    font-weight: 600;
}

.subsection-title {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.2s;
    background: var(--input-bg);
    color: var(--text-main);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg);
    /* Keep base color */
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
    /* Teal glow */
}

.form-row {
    display: flex;
    gap: 15px;
}

/* Checkboxes */
/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    /* Restore filled teal look */
    /* border: 1px solid var(--border); Remove border */
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.checkbox-item:hover {
    filter: brightness(1.1);
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin: 0;
}

/* Photos */
.photo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 15px;
    background: var(--primary-dark);
    /* Dark Ocean Blue - Professional */
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(12, 166, 166, 0.3);
    transition: transform 0.1s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Nav Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--bg-app);
    /* Blend with body */
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 8px;
    transition: color 0.2s;
    background: none;
    /* Remove default button bg */
    border: none;
    /* Remove default button border */
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    width: 24px;
    height: 24px;
}

/* History List */
.report-item {
    background: var(--white);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.report-item:active {
    background: var(--primary-light);
}

.report-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.report-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Utilities */
.hidden {
    display: none;
}

.input-disabled {
    background-color: #e2e8f0;
    color: #64748b;
}

/* Signature Canvas */
.sig-pad-container {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.sig-canvas {
    width: 100%;
    height: 100%;
    touch-action: none;
}

.btn-clear-sig {
    margin-top: 5px;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}