* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #2b2b2b;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #2b2b2b, #4a4a4a);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
    text-align: center;
}

.logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.login-card h1 {
    margin: 0;
    color: #2b2b2b;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin: 10px 0 28px;
}

form {
    text-align: left;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 14px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 18px;
}

button,
.btn-primary,
.btn-secondary {
    display: inline-block;
    width: 100%;
    text-align: center;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

button,
.btn-primary {
    background: #c81e1e;
    color: #ffffff;
}

button:hover,
.btn-primary:hover {
    background: #a81616;
}

.btn-secondary {
    background: #eeeeee;
    color: #333333;
}

.alert-error {
    background: #ffe5e5;
    color: #a80000;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.footer-login {
    font-size: 13px;
    color: #777;
    margin-top: 24px;
}

.topbar {
    height: 72px;
    background: #2b2b2b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-left img {
    height: 42px;
}

.topbar-left span {
    font-size: 20px;
    font-weight: bold;
}

.topbar-right a {
    color: #ffffff;
    background: #c81e1e;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.main-content {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 20px;
}

.welcome-box,
.viewer-header,
.accept-box {
    background: #ffffff;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.welcome-box h1,
.viewer-header h1 {
    margin-top: 0;
    color: #2b2b2b;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.document-card {
    position: relative;
    background: #ffffff;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.document-card h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2b2b2b;
}

.document-card p {
    color: #666;
}

.document-status {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 13px;
    font-weight: bold;
    padding: 7px 12px;
    border-radius: 20px;
}

.status-ok {
    background: #e6f7ed;
    color: #147a3d;
}

.status-pending {
    background: #fff4d6;
    color: #946200;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #777;
    margin: 18px 0;
}

.read-date {
    font-size: 13px;
    color: #147a3d !important;
    font-weight: bold;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.viewer-header .btn-secondary {
    max-width: 130px;
}

.pdf-container {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    height: 75vh;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
}

.checkbox-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: normal;
    margin-bottom: 18px;
}

.checkbox-label input {
    margin-top: 4px;
}

.accept-box.success {
    background: #e6f7ed;
    color: #147a3d;
    font-weight: bold;
}

.footer {
    text-align: center;
    color: #777;
    font-size: 13px;
    padding: 30px;
}

@media (max-width: 700px) {
    .topbar {
        height: auto;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .viewer-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .viewer-header .btn-secondary {
        max-width: 100%;
    }

    .pdf-container {
        height: 65vh;
    }
}

.gh-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.gh-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.gh-table th,
.gh-table td {
    padding: 14px;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
}

.gh-table th {
    background: #2b2b2b;
    color: #ffffff;
}

.gh-table tr:hover {
    background: #f7f7f7;
}

.alert-success {
    background: #e6f7ed;
    color: #147a3d;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: bold;
}
.btn-table {
    display: inline-block;
    background: #c81e1e;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.badge-ok {
    background: #e6f7ed;
    color: #147a3d;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
}

.badge-pending {
    background: #fff4d6;
    color: #946200;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
}
.btn-danger {
    background: #8b0000;
    color: #ffffff;
    width: 100%;
}

.btn-danger:hover {
    background: #650000;
}
