:root {
    --primary: #1b367d;
    --primary-dark: #122452;
    --accent: #2e8c4a;
    --accent-hover: #226b38;
    --bg-light: #f5f6f8;
    --bg-white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border: #e2e8f0;
    --error: #e53e3e;
    --success: #38a169;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

body.test-body {
    background-color: var(--bg-light);
}

/* Split Login Layout */
.split-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-white);
    padding: 2rem;
}

.logo-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-white);
    border-left: 2px solid var(--border);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-card p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Sidebar Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
    max-height: 40px;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
}

.sidebar-menu a:hover {
    background-color: var(--bg-light);
}

.sidebar-menu a.active {
    background-color: var(--primary);
    color: var(--bg-white);
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
}

.topbar {
    height: 70px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2rem;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.card {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Document Layout Styles */
.document-container {
    max-width: 900px;
    margin: 2rem auto;
    background-color: transparent;
    padding: 0 1rem;
}

.document-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

.document-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.document-instructions {
    border: 2px solid #000;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    background-color: #f8f9fa;
}

.document-instructions h3 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.question-block {
    margin-bottom: 2.5rem;
}

.question-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.question-subtitle {
    font-size: 1.05rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.question-input-area {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaeaea;
    width: 100%;
    min-height: 120px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: box-shadow 0.2s;
}

.question-input-area:focus {
    outline: none;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaeaea;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-white);
}

.form-group input[type="file"] {
    background: transparent;
    border: none;
    padding: 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-accent {
    background-color: var(--accent);
}
.btn-accent:hover {
    background-color: var(--accent-hover);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-muted);
}
tr:hover {
    background-color: #f8fafc;
}

/* Utilities */
.hidden {
    display: none !important;
}

.message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: none;
    text-align: center;
}
.message.success { background-color: #d1fae5; color: #065f46; display: block; }
.message.error { background-color: #fee2e2; color: #991b1b; display: block; }

.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    background: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}
