/* RAIsonance Field Screener Styles */
/* Color Palette */
:root {
    --background: #ffffff;
    --primary-blue: #006BA6;
    --text-dark: #333333;
    --text-medium: #4D4D4D;
    --text-light: #666666;
    --card-bg: #f8f9fa;
    --deep-magenta: #D82B74;
    --bright-blue: #29ABE2;
    --mid-blue: #006BA6;
    --golden: #F58546;
    --border-color: #ddd;
    --error-color: #dc3545;
    --success-color: #28a745;
}

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

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: var(--text-medium);
    background-color: var(--background);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: #ffffff;
}

.login-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo {
    width: 80px;
    height: 80px;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.login-card h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.forgot-password {
    display: block;
    text-align: right;
    color: var(--primary-blue);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-sign-in {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
    border-radius: 25px;
}

.login-footer {
    width: 100%;
    padding: 1rem;
    text-align: center;
    color: var(--text-medium);
    font-size: 0.75rem;
    background: #ffffff;
}

.login-footer p {
    margin: 0.125rem 0;
    font-size: 0.75rem;
}

/* Main Page */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: linear-gradient(135deg, var(--bright-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: calc(100% - 3rem);
}

.header-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 6px;
    padding: 0.125rem;
    flex-shrink: 0;
}

.main-header h1 {
    color: white;
    margin: 0;
    font-size: 1.125rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-btn {
    background: transparent;
    border: none;
    color: #d3d3d3;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0.5rem;
    flex-shrink: 0;
}

.settings-btn:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.screener-types-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.loading-message {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--card-bg);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error-message {
    background: #f8d7da;
    color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--error-color);
}

.success-message {
    background: #d4edda;
    color: var(--success-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--success-color);
}

.screener-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.screener-table th,
.screener-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.screener-table th {
    background: var(--card-bg);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.screener-table td {
    font-size: 0.9375rem;
}

.screener-table tbody tr {
    cursor: pointer;
}

.screener-table tbody tr:hover {
    background: var(--card-bg);
}

.screener-table tbody tr:active {
    background: #e9ecef;
}

.screener-table input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

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

/* Screening Page */
.screening-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

.screening-header {
    background: linear-gradient(135deg, var(--bright-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.screening-header h1 {
    color: white;
    margin: 0;
    font-size: 1.125rem;
    text-align: center;
}

.screening-header .header-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 6px;
    padding: 0.125rem;
}

.screening-step {
    display: none;
    flex: 1;
    padding: 2rem 1rem;
}

.screening-step.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.loading-card {
    text-align: center;
    padding: 4rem 2.5rem;
}

.loading-spinner {
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* iFrame Container */
.iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
}

.iframe-header {
    display: none;
}

#closeScreening {
    position: fixed;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#closeScreening:hover {
    background: rgba(0, 0, 0, 0.9);
}

#screenerFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Settings Page */
.settings-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.settings-header {
    background: linear-gradient(135deg, var(--bright-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-header h1 {
    color: white;
    margin: 0;
    font-size: 1.125rem;
    text-align: center;
}

.settings-header .header-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 6px;
    padding: 0.125rem;
}

.settings-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.settings-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.api-key-input {
    display: flex;
    gap: 0.5rem;
}

.api-key-input input {
    flex: 1;
}

.btn-icon {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--border-color);
}

.default-key-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.api-info {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.endpoint-info {
    margin: 1rem 0;
}

.endpoint-url {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--primary-blue);
    word-break: break-all;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.checkbox-label span {
    user-select: none;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--mid-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 107, 166, 0.3);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background: #cccccc;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #ffffff;
    color: var(--text-medium);
    padding: 0.5rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer p {
    margin: 0.125rem 0;
    font-size: 0.75rem;
}

/* Results Page */
.results-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.results-info {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.results-info strong {
    color: var(--text-dark);
    font-weight: 500;
}

.results-disclaimer {
    background: #fff8e1;
    border: 1px solid #ffc107;
    color: var(--text-dark);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-type {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-dark);
    flex: 1;
    margin-right: 1rem;
}

.result-box {
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 500;
    color: white;
    text-align: center;
    min-width: 180px;
    white-space: nowrap;
}

.result-box-low-risk {
    background: var(--success-color);
}

.result-box-high-risk {
    background: var(--error-color);
}

.result-box-unknown {
    background: #c7c7c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .step-card,
    .settings-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .result-card {
        padding: 1rem;
    }

    .result-type {
        font-size: 1.125rem;
    }

    .result-box {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }

    .screener-types-section,
    .results-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .result-card {
        padding: 0.875rem 1rem;
    }

    .result-type {
        font-size: 1rem;
        margin-right: 0.5rem;
    }

    .result-box {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        min-width: 120px;
    }
}

/* ================== HAMBURGER MENU ================== */

/* Hamburger Button */
.hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    position: absolute;
    right: 0.5rem;
    flex-shrink: 0;
    z-index: 100;
}

.hamburger-btn:hover {
    color: #d3d3d3;
}

.hamburger-btn svg {
    width: 24px;
    height: 24px;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
}

/* Hamburger Menu Panel */
.hamburger-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: var(--background);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.hamburger-menu.active {
    right: 0;
}

/* Menu Header */
.menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.menu-user-info {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.menu-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--bright-blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.menu-user-details {
    flex: 1;
    min-width: 0;
}

.menu-user-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-user-email {
    color: var(--text-light);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-close-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.menu-close-btn:hover {
    color: var(--text-dark);
}

/* Menu Navigation */
.menu-nav {
    padding: 0.5rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.menu-item:hover {
    background-color: var(--card-bg);
}

.menu-item svg {
    flex-shrink: 0;
    color: var(--text-light);
}

.menu-item:hover svg {
    color: var(--primary-blue);
}

.menu-item span {
    flex: 1;
}

.menu-item-logout {
    color: var(--deep-magenta);
}

.menu-item-logout svg {
    color: var(--deep-magenta);
}

.menu-item-logout:hover {
    background-color: #FFE5EE;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .hamburger-menu {
        width: 280px;
        right: -280px;
    }

    .menu-header {
        padding: 1rem;
    }

    .menu-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .menu-item {
        padding: 0.875rem 1rem;
    }
}

/* ================== PROFILE PAGE ================== */

.profile-section {
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background-color: var(--background);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--bright-blue));
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 500;
    flex-shrink: 0;
}

.profile-name-section h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.profile-email {
    opacity: 0.9;
    font-size: 1rem;
}

.profile-details {
    padding: 2rem;
}

.profile-detail-group {
    margin-bottom: 2rem;
}

.profile-detail-group:last-child {
    margin-bottom: 0;
}

.profile-detail-group h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--card-bg);
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--card-bg);
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-label {
    font-weight: 500;
    color: var(--text-medium);
    flex-shrink: 0;
    margin-right: 1rem;
}

.profile-value {
    color: var(--text-dark);
    text-align: right;
    word-break: break-word;
}

/* API Key Container */
.api-key-container {
    margin-top: 1rem;
}

.api-key-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.api-key-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: var(--card-bg);
    color: var(--text-dark);
}

.btn-icon {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
}

.btn-icon:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.api-key-note {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

/* Profile Actions */
.profile-actions {
    padding: 1.5rem 2rem;
    background-color: var(--card-bg);
    display: flex;
    justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-section {
        padding: 1rem 0.5rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .profile-name-section h2 {
        font-size: 1.5rem;
    }

    .profile-details {
        padding: 1.5rem 1rem;
    }

    .profile-detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .profile-value {
        text-align: left;
    }

    .api-key-row {
        flex-wrap: wrap;
    }

    .api-key-input {
        flex-basis: 100%;
    }

    .profile-actions {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-name-section h2 {
        font-size: 1.25rem;
    }

    .profile-email {
        font-size: 0.875rem;
    }

    .profile-detail-group h3 {
        font-size: 1rem;
    }
}

/* ========================================
   OFFLINE MODE STYLES (v0.3.0)
   ======================================== */

/* Offline Banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #D82B74, #F58546);
    color: white;
    padding: 0.75rem 1rem;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.offline-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.offline-banner svg {
    flex-shrink: 0;
}

/* ========================================
   OFFLINE COLLECTION STYLES (v0.3.0)
   ======================================== */

/* Collection Steps Container */
.collection-steps {
    max-width: 800px;
    margin: 0 auto;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: #E0E0E0;
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: #006BA6;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #999999;
    text-align: center;
}

.step-item.active .step-label {
    color: #006BA6;
    font-weight: 500;
}

/* Collection Step Content */
.collection-step {
    display: none;
}

.collection-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.step-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333333;
}

.step-description {
    color: #666666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Collection Form */
.collection-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #006BA6;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #999999;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
}

/* Page Messages */
.page-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.page-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.page-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.page-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.page-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Recording Section */
.recording-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cough-o-meter */
.coughometer-container {
    margin: 2rem 0;
    text-align: center;
}

#coughometer {
    display: block;
    margin: 0 auto;
}

.coughometer-help {
    margin-top: 1rem;
    color: #666666;
    font-size: 0.9rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

#needle {
    transition: transform 0.1s ease-out;
}

/* Recording Timer */
.recording-timer {
    margin: 2rem 0;
    text-align: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: 300;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.recording-dot {
    width: 16px;
    height: 16px;
    background: #D82B74;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.timer-info {
    color: #666666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Recording Controls */
.recording-controls {
    margin: 2rem 0;
}

.btn-record {
    background: #D82B74;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-record:hover {
    background: #C02060;
}

.btn-stop {
    background: #666666;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-stop:hover {
    background: #555555;
}

/* Recording Message */
.recording-message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    text-align: center;
    max-width: 600px;
}

.recording-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.recording-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.recording-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Success Section */
.success-section {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-icon svg {
    display: inline-block;
}

.success-section h2 {
    color: #4CAF50;
    margin-bottom: 2rem;
}

.success-details {
    background: #F8F9FA;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
}

.success-details p {
    margin: 0.5rem 0;
    color: #333333;
}

.success-note {
    color: #666666;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E0E0E0;
}

/* Mobile Responsive - Collection */
@media (max-width: 768px) {
    .step-indicator {
        margin-bottom: 2rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-content {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    #coughometer {
        width: 100%;
        height: auto;
    }

    .timer-display {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .step-indicator::before {
        left: 10%;
        right: 10%;
    }

    .step-content {
        padding: 1rem;
    }

    .step-content h2 {
        font-size: 1.25rem;
    }

    .timer-display {
        font-size: 2rem;
    }

    .btn-record,
    .btn-stop {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================================
   OFFLINE MODE INDICATOR (main.html)
   ============================================================ */

.offline-mode-section {
    background: white;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.offline-mode-icon {
    margin-bottom: 1.5rem;
}

.offline-mode-icon svg {
    opacity: 0.6;
}

.offline-mode-section h2 {
    color: #F44336;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.offline-message {
    color: #333333;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.offline-submessage {
    color: #666666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.offline-mode-section .btn {
    margin: 0.5rem;
}

.offline-mode-section .btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ============================================================
   OFFLINE SAMPLES PAGE STYLES
   ============================================================ */

/* Storage Info Section */
.storage-info {
    background: linear-gradient(135deg, #006BA6, #29ABE2);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.storage-stats {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.storage-actions {
    display: flex;
    justify-content: center;
}

/* Samples Table */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.samples-table {
    width: 100%;
    border-collapse: collapse;
}

.samples-table thead {
    background: linear-gradient(135deg, #006BA6, #29ABE2);
    color: white;
}

.samples-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.samples-table tbody tr {
    border-bottom: 1px solid #E0E0E0;
    transition: background-color 0.2s ease;
}

.samples-table tbody tr:hover {
    background-color: #f8f9fa;
}

.samples-table tbody tr:last-child {
    border-bottom: none;
}

.samples-table td {
    padding: 1rem;
    vertical-align: middle;
}

.time-secondary {
    display: block;
    font-size: 0.85rem;
    color: #666666;
    margin-top: 0.25rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pending {
    background: #FFC107;
    color: #000000;
}

.status-badge.status-uploaded {
    background: #4CAF50;
    color: white;
}

.status-badge.status-failed {
    background: #F44336;
    color: white;
}

/* Action Buttons */
.actions-cell {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(0, 107, 166, 0.1);
}

.btn-icon.btn-play {
    color: #006BA6;
}

.btn-icon.btn-play:hover {
    background: rgba(0, 107, 166, 0.1);
    transform: scale(1.1);
}

.btn-icon.btn-delete {
    color: #F44336;
}

.btn-icon.btn-delete:hover {
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: #666666;
}

.loading-state p {
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #333333;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
}

/* Toast Messages */
.toast-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
}

.toast-success {
    background: #4CAF50;
}

.toast-error {
    background: #F44336;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Overlay (Confirmation Dialog) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333333;
}

.modal-content p {
    color: #666666;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-danger {
    background: #F44336;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-danger:hover {
    background: #d32f2f;
}

/* Mobile Responsive - Samples Table */
@media (max-width: 768px) {
    .storage-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .samples-table {
        font-size: 0.85rem;
    }

    .samples-table th,
    .samples-table td {
        padding: 0.75rem 0.5rem;
    }

    .time-secondary {
        font-size: 0.75rem;
    }

    .toast-message {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .storage-info {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Make table scrollable on very small screens */
    .table-container {
        overflow-x: auto;
    }

    .samples-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .samples-table th,
    .samples-table td {
        padding: 0.5rem 0.25rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* ============================================================
   OFFLINE MODE v0.5.0 ADDITIONS
   ============================================================ */

/* Screener Selection List (Step 0) */
.screener-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.screener-checkbox-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.screener-checkbox-item:hover {
    border-color: #006BA6;
    background-color: #F8F9FA;
}

.screener-checkbox-item.selected {
    border-color: #006BA6;
    background-color: #E3F2FD;
}

.screener-checkbox-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: #006BA6;
}

.screener-checkbox-label {
    flex: 1;
    font-size: 1rem;
    color: #333333;
    cursor: pointer;
    user-select: none;
}

/* Upload Status Page Styles */
.top-bar {
    background: linear-gradient(135deg, #29ABE2, #006BA6);
    color: white;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.page-title {
    color: white;
    margin: 0;
    font-size: 1.125rem;
    text-align: center;
    font-weight: 500;
}

.menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    right: 0.5rem;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* Storage Info Banner */
.storage-info-info {
    background: #E3F2FD;
    border: 1px solid #006BA6;
    color: #333333;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.storage-info-warning {
    background: #FFF3CD;
    border: 1px solid #FFC107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.storage-info-error {
    background: #F8D7DA;
    border: 1px solid #F44336;
    color: #721C24;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Network Status Banner */
.network-status {
    margin-bottom: 1.5rem;
}

.network-status-offline {
    background: #F8D7DA;
    border: 1px solid #F44336;
    color: #721C24;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.network-status-offline svg {
    flex-shrink: 0;
    color: #F44336;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.bulk-actions .btn {
    flex: 1;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bulk-actions .btn svg {
    flex-shrink: 0;
}

/* Samples Table Container */
.samples-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Sample ID in table */
.sample-id {
    display: flex;
    flex-direction: column;
}

.sample-id strong {
    color: #333333;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.sample-meta {
    font-size: 0.85rem;
    color: #666666;
}

/* Status Cell */
.status-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge.status-success {
    background: #4CAF50;
    color: white;
}

.status-badge.status-uploading {
    background: #29ABE2;
    color: white;
    animation: pulse 2s infinite;
}

.status-badge.status-error {
    background: #F44336;
    color: white;
}

/* Upload Button in table */
.upload-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Upload Progress Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.upload-progress {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #E0E0E0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #29ABE2, #006BA6);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    color: #666666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.progress-percent {
    text-align: center;
    color: #333333;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Menu Badge */
.menu-badge {
    background: #F44336;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
    min-width: 24px;
    text-align: center;
}

/* Mobile Responsive - Upload Status */
@media (max-width: 768px) {
    .bulk-actions {
        flex-direction: column;
    }

    .bulk-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .status-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sample-id strong {
        font-size: 0.9rem;
    }

    .sample-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0.75rem 3rem 0.75rem 0.75rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .bulk-actions {
        gap: 0.75rem;
    }

    .screener-checkbox-item {
        padding: 0.75rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}
