:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #0f766e;
    --accent-light: #14b8a6;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #cbd5e1;
    --text-main: #334155;
    --text-heading: #0f172a;
    --danger: #be123c;
    --success: #15803d;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--primary);
    color: #ffffff;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--primary-light);
}

.sidebar-header {
    margin-bottom: 36px;
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--accent-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.nav-divider {
    border: none;
    border-top: 1px solid var(--primary-light);
    margin: 12px 0;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--primary-light);
}

.badge {
    background-color: var(--primary-light);
    color: var(--accent-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-light);
}

.btn-secondary {
    background-color: var(--primary-light);
    color: #f1f5f9;
}

.btn-secondary:hover {
    background-color: #334155;
}

.btn-print {
    background-color: #0284c7;
    color: #ffffff;
}

.btn-print:hover {
    background-color: #0ea5e9;
}

.btn-danger {
    background-color: transparent;
    color: #fda4af;
    border: 1px dashed #be123c;
}

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

.file-input-label {
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 40px 48px;
    max-width: 960px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 16px;
    margin-bottom: 30px;
}

.form-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-heading);
}

.form-subtitle {
    font-size: 13.5px;
    color: var(--accent);
    font-weight: 600;
}

.save-indicator {
    font-size: 12px;
    color: var(--success);
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

/* Cards & Layout */
.form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.section-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-col-span-2 {
    grid-column: span 2;
}

/* Inputs & Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-heading);
}

input[type="text"],
input[type="date"],
input[type="number"],
textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: #ffffff;
    color: var(--text-heading);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

textarea {
    resize: vertical;
}

/* Checkbox Layout */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background-color: var(--bg);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-main);
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Signature Layout */
.signature-card {
    background-color: #fafafa;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.signature-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    background-color: #ffffff;
}

.sig-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 40px;
}

.sig-line {
    border-bottom: 1.5px dashed var(--border);
    margin-bottom: 8px;
}

.sig-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-main);
    font-weight: 500;
}

/* Export Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 80%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    color: var(--text-heading);
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-body textarea {
    width: 100%;
    height: 360px;
    font-family: monospace;
    font-size: 12px;
    background-color: #f1f5f9;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer .btn {
    width: auto;
}

/* Print Layout */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: #ffffff;
    }
    .sidebar {
        display: none !important;
    }
    .app-container {
        display: block;
    }
    .main-content {
        margin-left: 0;
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
    .form-card {
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 30px;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .checkbox-group {
        border: none;
        background-color: transparent;
        padding: 0;
        grid-template-columns: repeat(3, 1fr);
    }
    .checkbox-label {
        font-size: 12px;
    }
    .checkbox-label input {
        display: inline-block;
    }
    .page-break-before {
        page-break-before: always;
        break-before: page;
    }
    @page {
        size: letter portrait;
        margin: 0.5in;
    }
}
