input[type="file"] {
    padding: 8px;
    background: #fff;
}

.nav-bar {
    background: #1f4f99;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 48px;
}

.nav-bar a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.nav-brand {
    font-weight: bold;
    font-size: 16px !important;
    margin-right: 12px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-header h1 {
    margin: 0;
}

.btn-edit {
    background: #2e7d32;
}

.btn-danger {
    display: inline-block;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: #c62828;
    color: #fff;
    cursor: pointer;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.file-meta {
    color: #888;
    font-size: 12px;
    margin-left: 8px;
}

.pre-wrap {
    white-space: pre-wrap;
}

.empty-msg {
    color: #777;
    font-style: italic;
}

.required {
    color: #c62828;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h1,
h2 {
    margin-top: 0;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

input,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

textarea {
    min-height: 100px;
}

.actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

button,
.btn-link {
    display: inline-block;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: #1f4f99;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.btn-link {
    background: #777;
}

.list-table,
.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.list-table th,
.list-table td,
.detail-table th,
.detail-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.list-table th {
    background: #f0f2f5;
}

.empty {
    text-align: center;
    color: #777;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.thumb {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.drop-zone {
    border: 2px dashed #999;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
}

.drop-zone.dragover {
    background: #eef5ff;
    border-color: #1f4f99;
}

.job-item {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.error {
    color: #c62828;
    margin-top: 6px;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 860px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    margin: auto;
    flex-shrink: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    border-radius: 10px 10px 0 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #222;
}

.btn-success {
    background: #2e7d32;
}

.btn-success:hover {
    background: #1b5e20;
}

/* === Search Condition Table === */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.card-header strong {
    font-size: 14px;
    font-weight: 600;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.result-count {
    background: #1f4f99;
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
}

.search-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
}

.search-table th {
    background: #f0f2f5;
    border: 1px solid #ddd;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    color: #444;
    width: 90px;
    text-align: left;
}

.search-table td {
    border: 1px solid #ddd;
    padding: 0;
}

.search-table td > input {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    padding: 6px 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.search-table td > input:focus {
    background: #f5f8ff;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
}

.date-range > input {
    flex: 1;
    min-width: 0;
    width: auto !important;
    padding: 6px 3px !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none;
    background: #fff;
    font-size: 12px;
}

.date-range > input:focus {
    background: #f5f8ff;
}

.date-range > span {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

.btn-excel {
    background: #217346;
}

.btn-excel:hover {
    background: #185c37;
}

.btn-view {
    display: inline-block;
    padding: 3px 10px;
    background: #1f4f99;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.btn-view:hover {
    background: #163d80;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}
.status-open { background: #fff3cd; color: #856404; }
.status-in-progress { background: #cce5ff; color: #004085; }
.status-closed { background: #d4edda; color: #155724; }

/* File attachment section */
.file-section {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 12px;
    padding: 12px;
}
.file-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.file-section-header strong { font-size: 13px; color: #333; }
.btn-file-upload {
    background: none;
    border: 1px solid #1f4f99;
    color: #1f4f99;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
}
.btn-file-upload:hover { background: #f0f4ff; }
.file-empty { color: #999; font-size: 13px; margin: 4px 0; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.file-list li a { color: #1f4f99; text-decoration: none; }
.btn-print {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    background: none;
}
.btn-print:hover { background: #f5f5f5; }
.btn-file-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: #c00;
    font-size: 13px;
    margin-left: auto;
    padding: 0 4px;
}
.td-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modal-wide { max-width: 800px; }

.search-table td > select {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    padding: 6px 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    cursor: pointer;
}

.search-table td > select:focus {
    background: #f5f8ff;
}

.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}