/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.header h1 {
    color: #2c5aa0;
    font-size: 28px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

/* Logo section for login */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    color: #2c5aa0;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.logo p {
    color: #666;
    font-size: 16px;
}

/* Forms */
.login-form, .company-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.login-form {
    max-width: 400px;
    margin-top: 80px;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.form-section h2 {
    color: #2c5aa0;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.required {
    color: #dc2626;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-group input.error {
    border-color: #dc2626;
}

/* Checkbox styling */
.checkbox-group {
    position: relative;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.checkbox-label input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2c5aa0;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1e3a72;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Special button styling for SIREN prefill */
.form-group {
    position: relative;
}

.form-group .btn-secondary.btn-small {
    position: absolute;
    right: 8px;
    top: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

.form-group:has(.btn-secondary.btn-small) input {
    padding-right: 100px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Messages */
.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.global-error {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.success-message {
    background-color: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.success-message.show {
    display: block;
}

/* Forgot password link */
.forgot-password {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    display: block;
    margin-top: 15px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Case detail page */
.case-detail {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row strong {
    min-width: 150px;
    color: #374151;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.accepted {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-primary:after {
    content: " ...";
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .login-form, .company-form {
        padding: 25px;
        margin-top: 40px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-group:has(.btn-secondary.btn-small) input {
        padding-right: 16px;
    }
    
    .form-group .btn-secondary.btn-small {
        position: static;
        margin-top: 8px;
        width: fit-content;
    }
}

/* Animation for form submission */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.submitting {
    animation: pulse 1.5s infinite;
}

/* Confirmation message section */
.confirmation-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none !important;
}

.confirmation-section h2 {
    color: white;
    margin-bottom: 15px;
}

.confirmation-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 16px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    white-space: pre-wrap;
}