* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}

a {
    color: inherit;
}

/* Header */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand {
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.username {
    color: #6b7280;
    font-size: 14px;
}

.home-link {
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.home-link:hover {
    text-decoration: underline;
}


/* Main */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 28px;
}


/* Buttons */

.btn {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-logout {
    background: transparent;
    border: 0;
    padding: 0;
    color: #dc2626;
    cursor: pointer;
    font-size: 14px;
}


/* Cards */

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-title {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}


/* Tables */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 13px 12px;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f9fafb;
}


/* Status */

.status {
    display: inline-block;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
}

.status-sent {
    background: #fef3c7;
    color: #92400e;
}

.status-viewed {
    background: #dbeafe;
    color: #1e40af;
}

.status-signed {
    background: #dcfce7;
    color: #166534;
}


/* Forms */

.form-card {
    max-width: 760px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #ffffff;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* Checkbox list */

.recipient-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recipient-list li {
    padding: 7px 0;
}

.recipient-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}


/* Messages */

.message {
    padding: 13px 16px;
    margin-bottom: 20px;
    border-radius: 7px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}


/* Login */

.login-container {
    min-height: calc(100vh - 75px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 25px;
}


/* Errors */

.errorlist {
    color: #b91c1c;
    margin: 5px 0;
    padding-left: 20px;
}


/* Responsive */

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-right {
        flex-wrap: wrap;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px 15px;
    }
}
.pdf-frame {
    width: 100%;
    height: 720px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.sign-card {
    margin-top: 24px;
}

.sign-card h2 {
    margin-top: 0;
}
.pdf-frame {
    width: 100%;
    height: 720px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.sign-card {
    margin-top: 24px;
}

.sign-card h2 {
    margin-top: 0;
}