:root {
    /* Core Colors */
    --background: #ffffff;
    --foreground: #0a0f1e;
    
    /* Alternate Foregrounds */
    --muted-foreground: #3c444e;
    --subtle-foreground: #94a3b8;

    /* Alternate Backgrounds */
    --surface-background: #f8fafc;
    --card-background: #ffffff;
    --muted-background: #f1f5f9;
    
    /* Primary Colors */
    --primary: #2463EB;
    --primary-foreground: #F8FAFC;
    --primary-muted: #93C5FD;
    --primary-subtle: #EBF8FF;
    --primary-border: #D1E2FF;
    --primary-gradient: linear-gradient(135deg, #2463EB, #1D4ED8);
    --primary-gradient-muted: linear-gradient(135deg, #93C5FD, #EBF8FF);
    --primary-gradient-subtle: linear-gradient(135deg, #D1E2FF, #F8FAFC);
    --primary-gradient-border: linear-gradient(135deg, #D1E2FF, #93C5FD);

    /* Success Colors */
    --success: #16a34a;
    --success-foreground: #f0fdf4;
    --success-soft: #dcfce7;
    --success-border: #86efac;

    /* Error Colors */
    --error: #dc2626;
    --error-foreground: #fef2f2;
    --error-soft: #fee2e2;
    --error-border: #fca5a5;

    /* Warning Colors */
    --warning: #ea580c;
    --warning-foreground: #fff7ed;
    --warning-soft: #ffedd5;
    --warning-border: #fdba74;
    
    /* Disagree Colors */
    --disagree: #ffda4b;

    /* Info Colors */
    --info: #0284c7;
    --info-foreground: #f0f9ff;
    --info-soft: #e0f2fe;
    --info-border: #7dd3fc;

    /* Specific Color Variants */
    --blue: #2463EB;
    --blue-soft: #EFF6FF;
    --blue-border: #BFDBFE;

    --green: #21C45D;
    --green-soft: #dcfce7;
    --green-border: #86efac;

    --orange: #F59F0A;
    --orange-soft: #FEF7EB;
    --orange-border: #fcd34d;

    --red: #dc2626;
    --red-soft: #fee2e2;
    --red-border: #fca5a5;

    --yellow: #eab308;
    --yellow-soft: #fefce8;
    --yellow-border: #fde047;

    --purple: #9333ea;
    --purple-soft: #faf5ff;
    --purple-border: #d8b4fe;

    /* UI Elements */
    --border: #e2e8f0;
    --input: #e2e8f0;
    --radius: 0.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-all: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font Sizes - Small Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Images */
    --logo-image: url('/images/BitwiseLogo-Light.png');
}

:root.dark {
    /* Core Colors */
    --background: #0a0f1e;
    --foreground: #f8fafc;

    /* Alternate Foregrounds */
    --muted-foreground: #94a3b8;
    --subtle-foreground: #64748b;

    /* Alternate Backgrounds */
    --surface-background: #141b2e;
    --card-background: #1e293b;
    --muted-background: #0f172a;

    /* Primary Colors */
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --primary-muted: #1e40af;
    --primary-subtle: #1e3a5f;
    --primary-border: #1e40af;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
    --primary-gradient-muted: linear-gradient(135deg, #1e40af, #1e3a5f);
    --primary-gradient-subtle: linear-gradient(135deg, #1e3a5f, #0a0f1e);
    --primary-gradient-border: linear-gradient(135deg, #1e40af, #3b82f6);

    /* Success Colors */
    --success: #22c55e;
    --success-foreground: #052e16;
    --success-soft: #14532d;
    --success-border: #166534;

    /* Error Colors */
    --error: #ef4444;
    --error-foreground: #7f1d1d;
    --error-soft: #450a0a;
    --error-border: #991b1b;

    /* Warning Colors */
    --warning: #f97316;
    --warning-foreground: #431407;
    --warning-soft: #431407;
    --warning-border: #9a3412;

    /* Disagree Colors */
    --disagree: #f1cc3f;

    /* Info Colors */
    --info: #06b6d4;
    --info-foreground: #083344;
    --info-soft: #164e63;
    --info-border: #0e7490;

    /* Specific Color Variants */
    --blue: #3b82f6;
    --blue-soft: #1e3a5f;
    --blue-border: #1e40af;

    --green: #22c55e;
    --green-soft: #14532d;
    --green-border: #166534;

    --orange: #f59e0b;
    --orange-soft: #451a03;
    --orange-border: #92400e;

    --red: #ef4444;
    --red-soft: #450a0a;
    --red-border: #991b1b;

    --yellow: #eab308;
    --yellow-soft: #422006;
    --yellow-border: #854d0e;

    --purple: #a855f7;
    --purple-soft: #3b0764;
    --purple-border: #6b21a8;

    /* UI Elements */
    --border: #334155;
    --input: #334155;
    
    /* Images */
    --logo-image: url('/images/BitwiseLogo-Dark.png');
}

/* Global Layout Styles */

.layout-grid {
    display: grid;
    grid-template-columns: 16rem 1fr;
    grid-template-rows: 4rem 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar main";
    width: 100vw;
    height: 100vh;
    transition: grid-template-columns 0.3s ease;
}

.layout-grid.sidebar-collapsed {
    grid-template-columns: 4rem 1fr;
}

.main-content {
    grid-area: main;
    overflow-y: auto;
    padding: 2rem;
    background-color: var(--background);
}

.sidebar {
    grid-area: sidebar;
}

.dashboard-header {
    grid-area: header;
}

/* Base card styles */
.custom-card {
    border: 1px solid var(--border);
    background-color: var(--card-background);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    padding: 1.5rem;
}

.hover-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Card sections */
/*
.card-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    letter-spacing: -0.025em;
    padding-bottom: 1.25rem;
}

.card-header span {
    font-size: var(--text-2xl);
}

.card-header h3 {
    margin: 0;
    font-size: var(--text-base);
    color: var(--foreground);
}
*/

/* Error and Success Messages with Auto-Hide */
.notification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.notification {
    display: none;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.notification:nth-last-child(-n+3) {
    display: flex;
}

/* Icons via CSS pseudo-elements */
.notification-success::before {
    content: "check_circle";
    font-family: 'Material Symbols Outlined';
    margin-right: 12px;
    font-size: 20px;
}

.notification-error::before {
    content: "error";
    font-family: 'Material Symbols Outlined';
    margin-right: 12px;
    font-size: 20px;
}

.notification-warning::before {
    content: "warning";
    font-family: 'Material Symbols Outlined';
    margin-right: 12px;
    font-size: 20px;
}

.notification-info::before {
    content: "info";
    font-family: 'Material Symbols Outlined';
    margin-right: 12px;
    font-size: 20px;
}

/* Colors for each type */
.notification-success {
    background-color: #f0f9ff;
    border-left-color: #10b981;
    color: #065f46;
}

.notification-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}

.notification-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #78350f;
}

.notification-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e3a8a;
}

.notifications {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    width: 300px;
    max-width: 80%;
    background: transparent;
}

.error-message,
.success-message {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: var(--text-sm);
    text-align: center;
    animation: slideInAndFade 0.4s ease-in-out;
    position: relative;
    overflow: hidden;
}

.error-message {
    background: var(--error-soft);
    color: var(--error);
    border: 1px solid var(--error-border);
}

.success-message {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.success-message, .error-message span {
    font-size: var(--text-base);
}

.error-message::after,
.success-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: progressBar 4s linear forwards;
}

.error-message.fade-out,
.success-message.fade-out {
    animation: slideOutAndFade 0.4s ease-in-out forwards;
}

/* Animations */

@keyframes slideInAndFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutAndFade {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0; }
}

/* Top text of most pages. */

.welcome-message {
    color: var(--foreground);
    font-size: var(--text-4xl);
}

/* Radio Button Styling */
.radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 6px;
    border-radius: var(--radius);
    transition: var(--transition-all);
}

.radio:hover {
    background-color: var(--muted-background);
}

.radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radiomark {
    position: relative;
    height: 20px;
    width: 20px;
    min-width: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-all);
}

.radiomark .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-foreground);
    opacity: 0;
    transition: var(--transition-all);
}

.radio input[type="radio"]:checked ~ .radiomark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.radio input[type="radio"]:checked ~ .radiomark .material-symbols-outlined {
    opacity: 1;
}

.radio:hover .radiomark {
    border-color: var(--primary);
}

.radio input[type="radio"]:focus ~ .radiomark {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.radio input[type="radio"]:focus:not(:focus-visible) ~ .radiomark {
    outline: none;
}

.radio input[type="radio"]:disabled ~ .radiomark {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rating Item */
.rating-item {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex: 1;
}

.rating-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Text Item */
.text-item {
    width: 100%;
    flex: 1;
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 400;
    height: 8rem;
    padding: 0.5rem;
    color: var(--foreground);
    background-color: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    resize: none;
}

.text-item:hover:not(:disabled):not(:focus) {
    border-color: var(--primary-muted);
}

.text-item:focus {
    border-color: var(--primary);
    background-color: var(--background);
}

.text-item:focus:not(:focus-visible) {
    outline: none;
}

.text-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--muted-foreground);
}

.text-item::placeholder {
    color: var(--subtle-foreground);
    font-style: italic;
}

/* Search Bar */
.search-container svg {
    position: absolute;
    left: 0.75rem;
    fill: var(--subtle-foreground);
    width: 1rem;
    height: 1rem;
    cursor: text;
}

.search-container input {
    padding-left: 2.25rem;
}

/* Date Icon */
.custom-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    color: var(--primary);
    transition: color 0.2s ease;
}

.input-container:hover + .custom-date-icon {
    color: var(--primary-muted);
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background-color: var(--border);
}

.vdivider {
    width: 1px;
    height: 100%;
    background-color: var(--border);
}

/* Checkbox */
.chk {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: var(--transition-all);
}

.chk:hover {
    background-color: var(--muted-background);
}

.chk input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    min-width: 20px;
    border: 2px solid var(--border);
    border-radius: calc(var(--radius) * 0.5);
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-all);
}

.checkmark .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-foreground);
    opacity: 0;
    transition: var(--transition-all);
}

.chk input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.chk input[type="checkbox"]:checked ~ .checkmark .material-symbols-outlined {
    opacity: 1;
}

.chk:hover .checkmark {
    border-color: var(--primary);
}

.chk input[type="checkbox"]:focus ~ .checkmark {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.chk input[type="checkbox"]:focus:not(:focus-visible) ~ .checkmark {
    outline: none;
}

.label-text {
    font-size: var(--text-sm);
    color: var(--foreground);
    font-weight: 500;
}

/* Dropdown */
.dropdown-content {
    display: block;
    position: absolute;
    background: white;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
}

    .dropdown-content.show {
        pointer-events: auto;
        opacity: 1;
    }

.show {
    opacity: 1;
}

/* Print Option */
.page-break {
    page-break-before: always;
}