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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 0;
}

.header-with-logo {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2ecc71;
}

.company-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    flex: 1;
}

h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
    text-align: left;
}

h2 {
    color: #34495e;
    font-size: 18px;
    margin-bottom: 5px;
    text-align: left;
    font-weight: 500;
}

.subtitle {
    text-align: left;
    color: #7f8c8d;
    margin-bottom: 0;
    font-size: 14px;
}

fieldset {
    border: 3px solid #2ecc71;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    color: #2ecc71;
    font-weight: 600;
    font-size: 18px;
    padding: 0 10px;
}

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

label {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #2ecc71;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.checkbox-group {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #2ecc71;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2ecc71;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

button,
.btn-primary,
.btn-secondary {
    padding: 14px 30px;
    border: 3px solid #2ecc71;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #2ecc71;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn-primary:hover {
    background: #2ecc71;
    color: white;
}

.btn-secondary {
    border-color: #95a5a6;
    color: #95a5a6;
}

.btn-secondary:hover {
    background: #95a5a6;
    color: white;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid #2ecc71;
}

.alert-success {
    background: white;
    color: #2ecc71;
    border-color: #2ecc71;
}

/* Mobile optimization */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .header-with-logo {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
    }
    
    .header-text {
        width: 100%;
    }
    
    h1 {
        font-size: 20px;
        text-align: center;
    }
    
    h2 {
        font-size: 16px;
        text-align: center;
    }
    
    .subtitle {
        text-align: center;
    }
    
    fieldset {
        padding: 15px;
    }
    
    legend {
        font-size: 16px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="password"] {
        font-size: 16px;
        padding: 14px 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    button,
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .checkbox-group {
        padding: 12px;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
    
    .signature-canvas {
        height: 120px;
    }
    
    .signature-clear-btn {
        position: static;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
    }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 25px;
    }
    
    .header-with-logo {
        gap: 25px;
    }
    
    .company-logo {
        width: 90px;
        height: 90px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="password"] {
        font-size: 16px;
        padding: 14px 15px;
    }
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border: 3px solid #2ecc71;
    border-radius: 8px;
}

.login-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-message {
    background: white;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    border: 2px solid #e74c3c;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #2ecc71;
    text-decoration: none;
}

.signature-wrapper {
    position: relative;
    border: 3px solid #2ecc71;
    border-radius: 8px;
    background: white;
    padding: 10px;
    margin-top: 8px;
}

.signature-canvas {
    width: 100%;
    height: 150px;
    cursor: crosshair;
    display: block;
    border: 2px dashed #2ecc71;
    border-radius: 4px;
    touch-action: none;
}

.signature-clear-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

.signature-clear-btn:hover {
    background: #e74c3c;
    color: white;
}

@media (max-width: 768px) {
    .login-container {
        margin: 50px auto;
        padding: 25px;
    }
}