/* Basic reset for mobile responsiveness */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styling */
.app-header {
    background-color: #4f46e5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

/* Main Container */
.app-container {
    margin-top: 70px;
    padding: 15px;
    flex: 1;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1f2937;
}

/* Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.feature-card:active {
    transform: scale(0.95);
}

.feature-card .icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #111827;
}

.feature-card p {
    font-size: 12px;
    color: #6b7280;
}

/* Test Screen Specific Styles */
.test-header {
    background-color: #1e293b;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.timer {
    font-weight: bold;
    background-color: #ef4444;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.test-container {
    margin-top: 70px;
    padding: 15px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 20%;
    background-color: #10b981;
    height: 100%;
    transition: width 0.3s;
}

/* Question Card Styling */
.question-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.question-number {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: bold;
}

.question-text {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 20px;
}

/* Options Layout */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.option-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.option-item.selected {
    background-color: #e0e7ff;
    border-color: #6366f1;
    color: #4f46e5;
    font-weight: 600;
}

/* Bottom Navigation Footer */
.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: white;
    font-size: 16px;
    cursor: pointer;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background-color: #4f46e5;
    color: white;
    border: none;
}

/* Result Dashboard Layout Metrics */
.text-center {
    text-align: center;
}

#score-percentage {
    font-size: 48px;
    margin-bottom: 5px;
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    font-weight: 500;
}

.breakdown-item.correct {
    border-left: 5px solid #10b981;
}

.breakdown-item.incorrect {
    border-left: 5px solid #ef4444;
}

.breakdown-item.unattempted {
    border-left: 5px solid #6b7280;
}

.badge {
    padding: 4px 12px;
    border-radius: 15px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.correct .badge { background-color: #10b981; }
.incorrect .badge { background-color: #ef4444; }
.unattempted .badge { background-color: #6b7280; }

/* Authentication Layout Styles */
.auth-body {
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    color: #4f46e5;
    font-size: 28px;
    margin-bottom: 5px;
}

.auth-header p {
    color: #6b7280;
    font-size: 14px;
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #4b5563;
}

.auth-toggle a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* Dashboard Navigation Tabs */
.admin-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: #e2e8f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    color: #475569;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: #4f46e5;
    color: white;
}

/* Tab Content Controllers */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Analytics Metrics Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.metric-card {
    padding: 20px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.metric-card h3 { font-size: 14px; opacity: 0.9; font-weight: 500; }
.metric-card p { font-size: 28px; font-weight: 700; margin-top: 5px; }

.metric-card.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.metric-card.indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.metric-card.emerald { background: linear-gradient(135deg, #10b981, #059669); }

/* Form Structures & Inputs */
.form-section-title { font-size: 18px; margin-bottom: 20px; color: #0f172a; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.btn-success { background-color: #10b981; color: white; border: none; font-weight: 600; }
.btn-indigo { background-color: #4f46e5; color: white; border: none; font-weight: 600; }

/* Filter Bar Setup */
.filter-bar input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

/* Data Table Grid Architecture */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background-color: #f8fafc;
    color: #64748b;
    padding: 12px;
    font-weight: 600;
    border-bottom: 2px solid #edf2f7;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

/* Status Flags Badges */
.status-pass { background-color: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-fail { background-color: #fee2e2; color: #991b1b; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* UI Global Upscaling - Increases baseline read sizes */
* {
    font-size: 16px; /* Scaled from 14px to standard web readable size */
}

body {
    font-size: 16px;
}

/* Upscale Main Headers text sizes */
.app-header .logo {
    font-size: 24px;
}

.app-header .back-btn {
    font-size: 18px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Increase Analytics Metrics Cards Font Frameworks */
.metric-card h3 {
    font-size: 16px;
    font-weight: 600;
}

.metric-card p {
    font-size: 42px; /* Huge clear metric numbers */
    font-weight: 800;
}

/* Custom action layout structure padding refinements */
.action-card-style {
    padding: 25px 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.action-card-style:hover {
    border-color: #4f46e5;
    background-color: #fafafa;
    transform: translateY(-2px);
}

.action-card-style h3 {
    font-size: 18px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.action-card-style p {
    font-size: 14px;
}

/* Form elements sizing updates */
.form-section-title {
    font-size: 20px;
    font-weight: 700;
}

.form-group label {
    font-size: 16px;
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 8px;
}

.nav-btn {
    font-size: 18px;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
}

/* Table Registry Size Upgrades */
.data-table {
    font-size: 16px;
}

.data-table th {
    font-size: 16px;
    padding: 14px;
}

.data-table td {
    font-size: 16px;
    padding: 16px 14px;
}

/* Workspace panel state visibility core configuration */
.workspace-panel {
    display: none;
}
/* Realtime Popup Layer Modal Window Configurations */
.modal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Translucent backdrop overlay filter */
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content-card {
    background: white;
    width: 100%;
    max-width: 650px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: fadePopupIntoView 0.2s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
}

.close-modal-btn:hover {
    color: #ef4444;
}

/* Action button inside tables list design system */
.edit-action-btn {
    background-color: #f59e0b;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-action-btn:hover {
    background-color: #d97706;
}

/* Structural smooth scale layout animations wrapper */
@keyframes fadePopupIntoView {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================
   PROFESSIONAL FORM CONTROLS & GRID OVERHAUL
   ========================================== */

/* Force each form row group to be a clean vertical stack */
.form-group {
    display: block !important;
    width: 100% !important;
    margin-bottom: 22px !important;
    clear: both;
}

/* Ensure labels sit clearly ABOVE the inputs, never inline or squeezed */
.form-group label {
    display: block !important;
    width: 100% !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #334155 !important; /* Premium Slate Text */
    margin-bottom: 8px !important;
    text-align: left !important;
}

/* Force all input fields and selectors to span full container width safely */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important; /* Prevents dimensional overflow blowout */
    padding: 12px 16px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Interactive focus feedback engine rings */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4f46e5 !important; /* Premium Indigo */
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}

/* Standardized 2-Column Responsive Grid Architecture */
.form-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 5px !important;
}

/* Adjust layout spacing parameters inside floating modal cards */
.modal-content-card {
    background: #ffffff !important;
    padding: 35px !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Mobile responsive fallback architecture wrapper */
@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr !important; /* Collapses to single column grid on tiny devices */
        gap: 0 !important;
    }
}