/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e40af;
    --primary-blue-light: #3b82f6;
    --secondary-gray: #f3f4f6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border-gray: #e5e7eb;
    --success-green: #22c55e;
    --error-red: #ef4444;
    --warning-orange: #f97316;
    --purple: #a855f7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: #f9fafb;
    line-height: 1.6;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.3);
    overflow: hidden;
    padding: 3px;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
}

.logo-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.btn-signin {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-signin:hover {
    background: rgba(255,255,255,0.1);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto;
}

/* Form Styles */
.arta-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-gray);
}

.form-section:last-child {
    border-bottom: none;
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.gate-context-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    color: #1e3a5f;
    font-size: 0.95rem;
}

.gate-context-meta {
    color: #64748b;
    font-size: 0.88rem;
}

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

.service-other-box {
    display: none !important;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.service-other-box.is-visible,
.service-other-box:not([hidden]) {
    display: block !important;
}

.service-other-box[hidden] {
    display: none !important;
}

.service-other-textbox {
    width: 100%;
    margin-top: 0.35rem;
}

.service-other-hint {
    font-style: italic;
    display: block;
    margin-top: 0.35rem;
}

.assessment-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-style: italic;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.required {
    color: var(--error-red);
}

/* Rating Sections */
.rating-section {
    margin-bottom: 2rem;
}

.rating-section-title {
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--primary-blue);
}

.rating-table {
    width: 100%;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--secondary-gray);
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.rating-header .rating-label {
    flex: 1;
}

.rating-options {
    display: flex;
    gap: 1rem;
    flex: 2;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.rating-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.rating-row label {
    flex: 1;
    margin: 0;
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex: 2;
    justify-content: space-between;
}

.radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-group input[type="radio"]:checked {
    accent-color: var(--primary-blue);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"]:checked {
    accent-color: var(--primary-blue);
}

.link {
    color: var(--primary-blue);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
}

.btn-outline:hover {
    background: var(--secondary-gray);
}

.btn-success {
    background: var(--success-green);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo-circle {
    margin: 0 auto 1rem;
    width: 80px;
    height: 80px;
}

.login-header h2 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-gray);
    font-size: 0.875rem;
}

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

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
}

.login-footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .rating-options {
        display: none;
    }
    
    .rating-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .radio-group {
        width: 100%;
        justify-content: flex-start;
    }
}

