* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
}

.topbar {
    background: #ffffff;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar strong {
    display: block;
    font-size: 20px;
}

.topbar span {
    color: #6b7280;
    font-size: 14px;
}

.topbar nav {
    display: flex;
    gap: 12px;
}

.topbar a {
    text-decoration: none;
    color: #ffffff;
    background: #2563eb;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: bold;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 18px;
}

.card {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

.form-card h1 {
    margin-top: 0;
    font-size: 30px;
}

section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

h2 {
    font-size: 21px;
    margin-bottom: 18px;
    color: #111827;
}

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

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

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

input,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 18px;
    background: #ffffff;
}

textarea {
    min-height: 110px;
    resize: vertical;
    margin-bottom: 16px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: normal;
    line-height: 1.5;
    margin-bottom: 15px;
}

.check input {
    width: 22px;
    height: 22px;
    margin-top: 3px;
}

.signature-wrap {
    width: 100%;
    border: 2px dashed #94a3b8;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    touch-action: none;
}

#signaturePad {
    display: block;
    width: 100%;
    height: 220px;
    touch-action: none;
}

button,
.submit-btn,
.secondary,
.small-btn {
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.submit-btn {
    width: 100%;
    margin-top: 30px;
    padding: 18px;
    font-size: 22px;
    font-weight: bold;
    background: #16a34a;
    color: white;
    border-radius: 16px;
}

.secondary {
    margin-top: 12px;
    background: #e5e7eb;
    color: #111827;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 16px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background: #f9fafb;
}

.small-btn {
    background: #2563eb;
    color: white;
    padding: 9px 14px;
    border-radius: 10px;
}

.signature-img {
    max-width: 420px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
}

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

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.login-box h1 {
    margin-top: 0;
}

.login-box button {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 18px;
    background: #2563eb;
    color: white;
    border-radius: 14px;
}

@media (max-width: 800px) {
    .grid,
    .view-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    input,
    textarea {
        font-size: 17px;
    }
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 18px;
}

.radio-group input {
    transform: scale(1.3);
    margin-right: 10px;
}