html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Fix for date input in RTL */
[dir="rtl"] input[type="date"] {
    text-align: right;
    direction: ltr; /* Keep the date format LTR */
}

/* Custom date picker styling */
input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") no-repeat right 0.75rem center/1rem 1rem;
    background-size: 1.25rem;
}

    input[type="date"]::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 2rem;
        height: 2rem;
        cursor: pointer;
    }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    input[type="date"] {
        background-color: #1f2937;
        color: white;
        border-color: #4b5563;
    }
}

/* Focus state */
input[type="date"]:focus {
    border-color: #27AAE1;
    box-shadow: 0 0 0 2px rgba(39, 170, 225, 0.2);
    outline: none;
}

/* Disabled state */
input[type="date"]:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Placeholder styling */
input[type="date"]::placeholder {
    color: #9ca3af;
    text-align: right;
}




/*Updates*/

/* Grade badges */
.grade-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    min-width: 2.5rem;
}

.grade-a {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.grade-b {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.grade-c {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.grade-d {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.grade-f {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #9ca3af;
}

.grade-unknown {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

/* Info items */
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: #4b5563;
}

.info-value {
    color: #1f2937;
    font-weight: 500;
}

/* Results card */
.results-card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

    .results-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

/* Upload area */
.upload-area {
    border: 2px dashed #27AAE1;
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f0f9ff;
}

    .upload-area:hover {
        border-color: #1e3a8a;
        background: #e0f2fe;
    }

/* Table styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: linear-gradient(135deg, #1e3a8a 0%, #273D90 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: right;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

tr:hover td {
    background-color: #f9fafb;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-family: 'Arial', sans-serif;
        line-height: 1.4;
    }

    table {
        font-size: 12px;
    }

    .grade-badge {
        border: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
}

/* RTL support */
[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

[dir="rtl"] table {
    text-align: right;
}










/*update 2*/

/* Edit form styles */
.subject-row:hover {
    background-color: #f8fafc;
}

/* Input focus styles */
input:focus, select:focus {
    outline: none;
    border-color: #27AAE1;
    box-shadow: 0 0 0 3px rgba(39, 170, 225, 0.1);
}

/* Readonly inputs */
input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Action buttons */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #273D90 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

    .btn-primary:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

    .btn-danger:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

/* Stats indicators */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #27AAE1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3a8a;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Auto-calculate button */
.auto-calc-btn {
    background: linear-gradient(135deg, #27AAE1 0%, #00a4dc 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .auto-calc-btn:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

/* Warning messages */
.warning-box {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

/* Success messages */
.success-box {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}