/* Form Styles */

/* Login Container */
.login-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 25px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: calc(100% - 20px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 300;
}

.login-school-name {
    color: var(--agnon-gold);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-group.required label::after {
    content: ' *';
    color: var(--danger-color);
}

/* Input Fields */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
    color: #333;
    direction: rtl;
    text-align: right;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

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

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Select dropdown arrow */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 30px;
}

/* File Input */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 12px 16px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.file-input-label:hover {
    border-color: var(--primary-color);
    background: rgba(79, 172, 254, 0.05);
}

/* CSV Section */
.csv-section {
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
}

.csv-template {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
}

/* Vision Form Specific */
.vision-form {
    max-width: 800px;
    margin: 0 auto;
}

.vision-question {
    background: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.vision-question h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.filter-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.filter-select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* Enrollment Section */
.enrollment-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.enrolled-students {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Password Display Grid */
.password-display-grid {
    display: grid;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.password-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 150px 80px;
    gap: 10px;
    align-items: center;
}

.password-item-info {
    display: flex;
    flex-direction: column;
}

.password-item-name {
    font-weight: bold;
}

.password-item-username {
    font-size: 12px;
    color: #6c757d;
}

.password-value {
    font-family: monospace;
    font-size: 14px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.copy-btn {
    padding: 4px 8px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background: #218838;
}

/* Form validation states */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger-color);
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: var(--success-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-help {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* OTP Section Styles */
.otp-section {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.otp-section.active {
    display: block;
}

.otp-section h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.otp-section > p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    direction: ltr; /* Keep OTP inputs LTR even in RTL layout */
}

.otp-input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.otp-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.otp-timer {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 5px 10px;
    display: inline-block;
    margin-top: 10px;
}

.resend-btn:hover:not(:disabled) {
    color: #0056b3;
}

.resend-btn:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}