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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 0 40px;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.header {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0 40px 20px 0;
    text-align: center;
}

.header img {
    max-width: 120px;
    height: auto;
    margin-bottom: 8px;
}

.header h1 {
    color: #000;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 6px;
    margin-top: 0;
}

.manstir-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

.manstir-left {
    background: white;
    border-right: 1px solid #dee2e6;
    padding: 30px 40px;
    overflow-y: auto;
}

.manstir-right {
    background: white;
    display: flex;
    flex-direction: column;
}

.manstir-right-top {
    flex: 0 0 auto;
    padding: 30px 40px;
    border-bottom: 1px solid #dee2e6;
    min-height: 200px;
}

.manstir-right-bottom {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.section-label {
    color: #0056b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-group.error .field-hint {
    color: #dc3545;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #212529;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    font-family: Monaco, monospace;
    background: #f8f9fa;
    color: #212529;
    transition: all 0.2s;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #adb5bd;
    opacity: 1;
    font-style: italic;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #80bdff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.field-hint {
    font-size: 11px;
    color: #495057;
    margin-top: 6px;
    font-weight: 400;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

button {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.btn-primary:hover:not(:disabled) {
    background: #0b5ed7;
    border-color: #0a58ca;
}

.btn-secondary {
    background: white;
    color: #212529;
    border: 1px solid #ced4da;
}

.btn-secondary:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.spinner {
    border: 3px solid #e9ecef;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Verification Result */
.verification-result {
    display: none;
}

.verification-result.show {
    display: block;
    padding-top: 10px;
}

.result-box {
    padding: 18px 24px;
    border-radius: 4px;
    font-size: 14px;
    border-left: 4px solid;
}

.result-box.success {
    background: #d1e7dd;
    color: #0f5132;
    border-left-color: #198754;
}

.result-box.error {
    background: #f8d7da;
    color: #842029;
    border-left-color: #dc3545;
}

.result-box.info {
    background: #cfe2ff;
    color: #084298;
    border-left-color: #0d6efd;
}

.result-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}

.result-content {
    font-family: Monaco, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Decoded JWT Display */
.decoded-container {
    display: none;
}

.decoded-container.show {
    display: block;
    padding-top: 2px;
}

.decoded-empty {
    color: #495057;
    font-style: italic;
    font-size: 14px;
    padding: 20px;
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.table-view {
    margin-top: 8px;
    margin-bottom: 8px;
}

.table-view table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.table-view th {
    background: #e9ecef;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ced4da;
    color: #212529;
}

.table-view th:first-child,
.table-view td:first-child {
    width: 120px;
}

.table-view td {
    padding: 12px 16px;
    border: 1px solid #ced4da;
    font-family: Monaco, monospace;
    color: #212529;
    background: white;
}

.table-view tr:nth-child(even) td {
    background: #f8f9fa;
}

.jwt-section {
    margin-bottom: 35px;
}

.jwt-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.jwt-section-title {
    color: #212529;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 8px;
}

.footer {
    background: white;
    padding: 20px 40px;
    text-align: center;
    color: #343a40;
    font-size: 12px;
    line-height: 1.6;
    border-top: 1px solid #dee2e6;
}

.footer strong {
    color: #212529;
}

.footer a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    color: #004085;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    body {
        padding: 0 20px;
    }

    .manstir-container {
        grid-template-columns: 1fr;
    }

    .manstir-left,
    .manstir-right-top,
    .manstir-right-bottom {
        padding: 30px 25px;
    }

    .header,
    .footer {
        padding: 20px 25px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 10px;
    }

    .manstir-left,
    .manstir-right-top,
    .manstir-right-bottom {
        padding: 20px 15px;
    }

    .header,
    .footer {
        padding: 15px;
    }
}
