/* Base Styles */
:root {
    --primary-color: #4a6bff;
    --primary-dark: #3a5bef;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --card-bg: #fff;
    --navbar-bg: #2A2A2A;
    --unregistered-bg: #f2f2f2;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f0f2f5;
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

.logo img {
    height: 30px;
    margin-right: 10px;
    filter: brightness(0) invert(1); /* Make logo white */
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 2rem 1rem;
}

.content {
    width: 100%;
    max-width: 900px;
}

.page-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: none;
    border: 1px solid var(--border-color);
}

.card.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f9f9f9;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.input-group {
    display: flex;
    margin: 1rem 0;
}

input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.25);
    outline: none;
}

button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: var(--primary-dark);
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background-color: #b0b0b0;
    cursor: not-allowed;
}

.input-group button {
    margin-left: 10px;
}

/* Upload Area */
.upload-section {
    margin-top: 1.5rem;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
    transition: all 0.3s;
    cursor: pointer;
    background-color: #fcfcfc;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.1);
    transform: scale(1.01);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.upload-area label {
    cursor: pointer;
    display: block;
}

.file-limit {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-info {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.file-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.file-info p {
    margin: 0.25rem 0;
    color: var(--text-color);
}

/* Results Table */
.results-table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f4f9;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

tr:hover {
    background-color: #f9fafc;
}

tr.unregistered {
    background-color: var(--unregistered-bg);
}

tr.unregistered td {
    color: #666;
}

tr.unregistered:hover {
    background-color: #eaeaea;
}

/* Add status pill */
td.status-cell {
    white-space: nowrap;
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.status-registered {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.status-unregistered {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

/* Stats Row */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background-color: white;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* School Info */
.school-info {
    padding: 1.25rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.school-info h3 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .school-info h3 .school-name,
  .school-info h3 .school-code {
    color:var(--primary-color); /* Dark blue color */
    text-align: left;
  }
  
  .school-info h3 .school-code {
    text-align: right;
  }

.school-info p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
}

.school-info span {
    color: var(--text-secondary);
}

.school-info strong {
    font-weight: 500;
}

/* Verification Result */
.verification-result {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 6px;
    font-weight: 500;
}

.verification-result.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.verification-result.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}
.results-table-container {
    overflow-x: auto;
    cursor: grab; /* Shows "grab" cursor by default */
    scrollbar-width: thin; /* For Firefox */
}
/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    backdrop-filter: blur(3px);
}

/* Improved spinner */
.spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    position: relative;
}

.spinner:before,
.spinner:after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.spinner:before {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, var(--primary-color) 10%, rgba(74, 107, 255, 0.1) 42%);
    animation: spin 1s infinite linear;
}

.spinner:after {
    width: 70%;
    height: 70%;
    background-color: white;
    top: 15%;
    left: 15%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-indicator p {
    font-weight: 500;
    color: var(--primary-color);
}

/* Button with spinner */
.btn-spinner {
    position: relative;
}

.btn-spinner .spinner-small {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
    display: none;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-processing {
    padding-right: 40px;
}

.btn-processing .spinner-small {
    display: block;
}

/* Actions Row */
.actions-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
}

#exportResultsBtn {
    background-color: var(--primary-color);
}

#startOverBtn {
    background-color: var(--text-secondary);
}

#startOverBtn:hover {
    background-color: #5a6268;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group button {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .stats-row {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .actions-row {
        flex-direction: column;
    }
    
    .actions-row button {
        width: 100%;
    }
}