:root {
    /* Primary colors matching SmartVisualizer design */
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 15%);
    --muted: hsl(0, 0%, 96%);
    --muted-foreground: hsl(0, 0%, 45%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(0, 0%, 15%);
    --border: hsl(0, 0%, 90%);
    --input: hsl(0, 0%, 90%);
    --primary: hsl(8, 54%, 51%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(0, 0%, 85%);
    --secondary-foreground: hsl(0, 0%, 20%);
    --accent: hsl(0, 0%, 95%);
    --accent-foreground: hsl(0, 0%, 33%);
    --ring: hsl(8, 54%, 51%);
    --radius: 0.5rem;
    
    /* Legacy color variables for backwards compatibility */
    --color-red: #b3261e;
    --color-green: #3e8e41;
    --color-light-grey: hsl(0, 0%, 65%);
    --color-dark-grey: hsl(0, 0%, 33%);
    --color-black: hsl(0, 0%, 15%);
    --color-white: hsl(0, 0%, 100%);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 16px;
    background-color: white !important;
}

body {
    background-color: white !important;
    color: var(--foreground);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
    font-feature-settings: "rlig" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card {
    background-color: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.navbar {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    padding: 1.75rem 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.navbar h3 {
    color: var(--foreground);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar a:hover {
    color: var(--foreground);
}

.btn-primary, button[type="submit"], input[type="submit"], .primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover, button[type="submit"]:hover, input[type="submit"]:hover, .primary:hover {
    background-color: hsl(8, 54%, 45%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.secondary, .outline {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    color: var(--secondary-foreground);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.secondary:hover, .outline:hover {
    background-color: var(--accent);
    border-color: var(--primary);
    color: var(--accent-foreground);
    transform: translateY(-1px);
}

.flash-messages {
    margin: 0.75rem 0;
}

.flash-error {
    background-color: #fef2f2;
    color: var(--color-red);
    border: 1px solid #fecaca;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 1rem; /* 16px */
    border-left: 3px solid var(--color-red);
}

.flash-success {
    background-color: #f0fdf4;
    color: var(--color-green);
    border: 1px solid #bbf7d0;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 1rem; /* 16px */
    border-left: 3px solid var(--color-green);
}

.flash-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 1rem; /* 16px */
    border-left: 3px solid #3b82f6;
}

.form-errors {
    color: var(--color-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

input:not(.form-input), textarea:not(.form-input), select:not(.form-input) {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    background-color: var(--color-white);
    font-size: 0.85rem;
    transition: border-color 0.2s ease;
    line-height: 1.2;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-red);
    outline: none;
    box-shadow: 0 0 0 2px rgba(179, 38, 30, 0.1);
}

label {
    color: var(--color-dark-grey);
    font-weight: 500;
    font-size: 1rem; /* 16px */
    margin-bottom: 0.25rem;
    display: block;
}

/* Markdown Tables - Updated to match app design language */
/* Create a dedicated table wrapper for horizontal scrolling */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    border: 1px solid #e5e5e5;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Table styling within wrapper */
.table-wrapper table, .card table, .card-content table, table {
    background-color: transparent !important;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border: none !important;
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.875rem;
}

.card th, .card-content th, th {
    background-color: #f5f5f5 !important;
    color: #262626 !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5 !important;
    border-right: 1px solid #e5e5e5 !important;
    white-space: nowrap;
    min-width: 120px;
}

.card th:last-child, .card-content th:last-child, th:last-child {
    border-right: none !important;
}

/* Start Analysis Button Animation */
.start-analysis-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.start-analysis-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.start-analysis-btn.loading .btn-text {
    opacity: 0;
}

.start-analysis-btn.loading .btn-spinner {
    opacity: 1;
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text {
    transition: opacity 0.3s ease;
    color: white;
}

.expandable-todos {
    cursor: pointer;
    transition: all 0.2s ease;
}

.expandable-todos:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 4px;
}

.todos-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.todos-content.expanded {
    max-height: 500px;
}

.card td, .card-content td, td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #262626 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    border-right: 1px solid #e5e5e5 !important;
    vertical-align: top;
    line-height: 1.5;
    white-space: nowrap;
    min-width: 120px;
}

.card td:last-child, .card-content td:last-child, td:last-child {
    border-right: none !important;
}

/* Alternating row colors for better readability */
.card tbody tr:nth-child(even), .card-content tbody tr:nth-child(even), tbody tr:nth-child(even) {
    background-color: #fafafa !important;
}

.card tbody tr:nth-child(odd), .card-content tbody tr:nth-child(odd), tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

/* Hover effect for table rows */
.card tbody tr:hover, .card-content tbody tr:hover, tbody tr:hover {
    background-color: #fef2f2 !important;
    transition: background-color 0.2s ease;
}

/* Make table responsive */
@media (max-width: 768px) {
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    border-left: 3px solid var(--color-red);
}

.feature-card h4 {
    color: var(--color-black);
    margin-bottom: 0.5rem;
    font-size: 16px;
}

.feature-card p {
    color: var(--color-dark-grey);
    line-height: 1.5;
    font-size: 1rem; /* 16px */
}

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

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.role-admin, .role-ADMIN {
    background-color: rgba(179, 38, 30, 0.1);
    color: var(--color-red);
}

.role-user, .role-USER {
    background-color: rgba(165, 165, 165, 0.1);
    color: var(--color-light-grey);
}

/* User Management Table Styles */
.user-management-table {
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-x: auto;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) minmax(0, 2fr) 120px 100px 120px 160px;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.header-cell {
    padding: 1rem 0.75rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

.user-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) minmax(0, 2fr) 120px 100px 120px 160px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: var(--background);
    align-items: center;
    min-height: 4rem;
}

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

.user-row:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
}

.user-row.current-user {
    background: rgba(var(--primary-rgb, 202, 75, 59), 0.03);
    border-left: 3px solid var(--primary);
}

.user-row.current-user:hover {
    background: rgba(var(--primary-rgb, 202, 75, 59), 0.08);
}

.user-cell {
    padding: 1rem 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--foreground);
    min-width: 0;
}

.user-id {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-nickname {
    font-weight: 500;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-date {
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

.view-tasks-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-tasks-btn:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--accent-foreground);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.role-form {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.role-select {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border: 1px solid var(--border) !important;
    border-radius: 0.375rem !important;
    background: var(--background) !important;
    color: var(--foreground) !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    min-width: 100px;
    max-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2rem !important;
}

.role-select:hover {
    border-color: var(--primary) !important;
}

.role-select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(202, 75, 59, 0.1) !important;
}

.current-user-indicator {
    display: flex;
    align-items: center;
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: rgba(var(--primary-rgb, 202, 75, 59), 0.05);
    border: 1px solid rgba(var(--primary-rgb, 202, 75, 59), 0.2);
    border-radius: 0.375rem;
    white-space: nowrap;
}

.current-user-indicator em {
    color: var(--primary);
    font-style: normal;
}

/* Mobile responsive design for user management table */
@media (max-width: 1024px) {
    .table-header {
        display: none;
    }
    
    .user-management-table {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .user-row {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--background);
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    }
    
    .user-row:hover {
        transform: none;
        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.12);
    }
    
    .user-cell {
        padding: 0.5rem 0;
        grid-template-columns: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border);
    }
    
    .user-cell:last-child {
        border-bottom: none;
    }
    
    .user-cell::before {
        content: attr(data-label) ":";
        font-weight: 600;
        color: var(--muted-foreground);
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        min-width: 80px;
        margin-right: 1rem;
    }
    
    .user-info {
        margin-left: auto;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main.container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100vh - 200px);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-black);
    font-weight: 600;
}

h1 {
    font-size: 1.875rem; /* 30px - matches your "Ergebnisse" reference */
    line-height: 2.25rem;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.5rem; /* 24px */
    line-height: 2rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem; /* 20px */
    line-height: 1.75rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.125rem; /* 18px */
    line-height: 1.5rem;
    margin-bottom: 0.5rem;
}

p, span, div {
    color: var(--color-dark-grey);
    font-size: 1rem; /* 16px */
    line-height: 1.5;
}

/* Markdown content styling */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin: 0.5rem 0;
    color: var(--color-dark-grey);
}

strong, b {
    font-weight: 600;
    color: var(--color-black);
}

em, i {
    font-style: italic;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-nav form {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.nav-icon-btn {
    background-color: transparent;
    border: none;
    color: var(--color-dark-grey);
    padding: 0.375rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 32px;
    height: 32px;
    margin: 0;
}

.nav-icon-btn:hover {
    background-color: rgba(202, 75, 59, 0.1);
    color: var(--color-red);
    transform: translateY(-1px);
}

.nav-icon-btn.primary {
    background-color: var(--color-red);
    color: var(--color-white);
}

.nav-icon-btn.primary:hover {
    background-color: hsl(8, 54%, 45%);
    color: var(--color-white);
}

.nav-icon-btn.logout {
    background-color: transparent;
    border: none;
    color: var(--color-red);
    padding: 0.375rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 32px;
    height: 32px;
    margin: 0;
    box-shadow: none !important;
    outline: none !important;
}

.nav-icon-btn.logout:hover {
    background-color: rgba(179, 38, 30, 0.1);
    color: hsl(8, 54%, 45%);
    transform: translateY(-1px);
    box-shadow: none !important;
}

.nav-icon-btn.logout:focus {
    box-shadow: none !important;
    outline: none !important;
}

.nav-icon-btn.active {
    color: var(--foreground) !important;
}

@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Authentication Pages Styles */
.auth-body {
    background-color: var(--color-white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    flex: 1;
    max-width: 60%;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.auth-left {
    flex: 1;
    background-color: var(--background);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 450px;
    max-width: 600px;
}

.auth-right {
    flex: 1.2;
    background-color: var(--background);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 350px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.25rem;
    background-color: var(--muted);
    border-radius: var(--radius);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.625rem 0.875rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.auth-form {
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--muted-foreground);
    margin: 0 0 0.875rem 0;
    font-size: 0.8125rem;
    line-height: 1.4;
}

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

/* Dashboard form inputs */
.dashboard-input {
    width: 100% !important;
    padding: 0.4rem 0.6rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    height: 2.2rem !important;
    box-sizing: border-box !important;
    background-color: var(--background) !important;
    color: var(--foreground) !important;
    transition: border-color 0.2s ease !important;
}

.dashboard-input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px hsla(8, 54%, 51%, 0.1) !important;
}

/* Number input spinner buttons styling - hide native spinners completely */
.dashboard-input[type="number"]::-webkit-inner-spin-button,
.dashboard-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    display: none;
}

.dashboard-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.dashboard-textarea {
    width: 100% !important;
    padding: 0.4rem 0.6rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    background-color: var(--background) !important;
    color: var(--foreground) !important;
    transition: border-color 0.2s ease !important;
    font-family: inherit !important;
}

.dashboard-textarea:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px hsla(8, 54%, 51%, 0.1) !important;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.form-errors {
    margin-top: 0.5rem;
}

.form-errors div {
    color: var(--color-red);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100% !important;
    padding: 0.4rem 0.6rem !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 0.85rem !important;
    background-color: var(--background) !important;
    color: var(--foreground) !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    height: auto !important;
    min-height: unset !important;
}

.form-input:hover:not(:focus) {
    border-color: hsl(0, 0%, 70%);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    transform: translateY(-0.5px);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(8, 54%, 51%, 0.1), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    background-color: var(--background);
    transform: translateY(-1px);
}

/* Password input container and toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--foreground);
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.password-toggle i {
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-input-container .form-input {
    padding-right: 2.5rem !important;
}

.auth-submit-btn {
    width: 100%;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.auth-submit-btn:hover {
    background-color: hsl(8, 54%, 45%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.2);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: hsl(8, 54%, 45%);
    text-decoration: underline;
}

.success-message {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.success-icon {
    color: var(--color-green);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.success-message span {
    font-size: 0.875rem;
    color: var(--color-green);
    line-height: 1.4;
}

.smartcampaigner-content {
    max-width: 500px;
}

.smartcampaigner-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.smartcampaigner-subtitle {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
}

.smartcampaigner-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary);
    color: var(--color-white);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-text {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 0.125rem;
}

.form-errors {
    margin-top: 0.5rem;
}

.form-errors div {
    color: #dc2626;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Removed conflicting fixed positioning flash message styles - using the ones defined earlier in the file */

/* Responsive Design for Authentication Pages */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left {
        max-width: none;
        padding: 1.5rem;
        min-width: auto;
    }
    
    .auth-right {
        padding: 1.5rem;
        min-width: auto;
    }
    
    .smartcampaigner-title {
        font-size: 1.875rem;
    }
}

@media (max-width: 640px) {
    .auth-left, .auth-right {
        padding: 1rem;
        min-width: auto;
    }
    
    .auth-form {
        max-width: none;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .smartcampaigner-title {
        font-size: 1.5rem;
    }
    
    .flash-messages {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem;
        max-width: none;
    }
}

/* New navbar styles for redesigned header */
.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--foreground);
    background-color: rgba(202, 75, 59, 0.1);
}

.user-name {
    color: var(--foreground);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.user-name-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.user-name-btn:hover {
    background: var(--muted);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--foreground);
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--muted);
    color: var(--foreground);
}

.modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.settings-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: white !important;
}

.settings-section h4 {
    color: var(--foreground);
    font-size: 1rem;
    font-weight: 600;
}

.form-group label {
    color: var(--foreground);
    font-size: 0.875rem;
}

.form-group select {
    background: white;
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--foreground);
    width: 100%;
    min-height: 2.75rem;
    line-height: 1.4;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234a5568' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group select option {
    background: white;
    color: var(--foreground);
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: normal;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

/* Save button animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.save-btn-success {
    animation: successPulse 0.3s ease-out;
}

.btn-primary.success {
    background: var(--color-green) !important;
}

.btn-primary.success:hover {
    background: var(--color-green) !important;
}

/* Force white background on password reset modal inputs */
.modal-password {
    background: white !important;
    background-color: white !important;
    color: var(--color-dark-grey) !important;
    font-size: 0.875rem !important;
    font-weight: normal !important;
}

.modal-password:focus {
    background: white !important;
    background-color: white !important;
}

/* Comprehensive autofill styling for all browsers and states */
.modal-password:-webkit-autofill,
.modal-password:-webkit-autofill:hover,
.modal-password:-webkit-autofill:focus,
.modal-password:-webkit-autofill:active,
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--color-dark-grey) !important;
    background: white !important;
    background-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox autofill support */
.modal-password:-moz-autofill,
.form-input:-moz-autofill {
    background: white !important;
    background-color: white !important;
    color: var(--color-dark-grey) !important;
}

.navbar-separator {
    color: var(--muted-foreground);
    margin: 0 0.5rem;
    font-weight: 300;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Toast Types */
.toast.success {
    background-color: #3e8e41;
    color: white;
}

.toast.error {
    background-color: #b3261e;
    color: white;
}

.toast.warning {
    background-color: #f59e0b;
    color: white;
}

.toast.info {
    background-color: #6b7280;
    color: white;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    color: white;
}

.toast-message {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
    opacity: 0.9;
    color: white;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

.toast-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* Task buttons */
.stop-task-btn {
    background: none !important;
    border: none !important;
    color: var(--muted-foreground) !important;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop-task-btn:hover {
    color: var(--color-red) !important;
}

/* Modal Save Buttons - ensure white text and icons */
#languageSaveBtn, #languageSaveBtn .save-btn-content, #languageSaveBtn .save-btn-loading, #languageSaveBtn .save-btn-success, #languageSaveBtn .save-btn-error,
#passwordSaveBtn, #passwordSaveBtn .save-btn-content, #passwordSaveBtn .save-btn-loading, #passwordSaveBtn .save-btn-success, #passwordSaveBtn .save-btn-error {
    color: white !important;
}

#languageSaveBtn i, #passwordSaveBtn i {
    color: white !important;
}

/* Toast Animation Keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Responsive adjustments for new navbar */
@media (max-width: 768px) {
    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .user-name {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .toast {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }
}

/* Force white background everywhere to override any framework dark mode */
html, body, main, .container, .content-wrapper {
    background-color: white !important;
}

/* Prevent any dark mode from being applied */
html:not([data-theme="dark"]) body,
html[data-theme="light"] body,
body:not(.dark) {
    background-color: white !important;
}

/* Collapsible card styles */
.collapsible-card {
    position: relative;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    user-select: none;
    transition: all 0.2s ease;
}

.card-header:hover {
    background-color: rgba(202, 75, 59, 0.02);
    margin: -0.5rem -1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.card-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0.25rem;
}

.card-toggle-btn:hover {
    color: var(--foreground);
    background-color: var(--accent);
}

.card-toggle-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background-color: var(--accent);
}

.card-toggle-btn[aria-expanded="false"] svg,
.card-toggle-btn[aria-expanded="false"] i {
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
}

.card-toggle-btn[aria-expanded="true"] svg,
.card-toggle-btn[aria-expanded="true"] i {
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.card-toggle-btn i {
    transition: transform 0.2s ease;
}

.card-toggle-btn.collapsed i {
    transform: rotate(-90deg);
}

.card-content {
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    /* Dynamic max-height is set by JavaScript to avoid content truncation */
}

.card-content.collapsed {
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
/* Tasks column styles */
.task-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.task-count {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--foreground);
    font-weight: 500;
}

.task-count i {
    color: var(--primary);
}

.task-count .count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.task-count .label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.view-tasks-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: rgba(202, 75, 59, 0.05);
    border: 1px solid rgba(202, 75, 59, 0.15);
}

.view-tasks-link:hover {
    background: rgba(202, 75, 59, 0.1);
    border-color: rgba(202, 75, 59, 0.3);
    text-decoration: none;
    color: var(--primary);
}

.no-tasks {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    font-style: italic;
}

/* Actions column styles */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.role-change-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.additional-actions {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid;
    text-decoration: none;
    justify-content: flex-start;
}

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

.action-btn.secondary:hover {
    background: rgba(229, 231, 235, 0.8);
    border-color: var(--muted-foreground);
}

.action-btn.danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #b91c1c;
}

.current-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(202, 75, 59, 0.05) 0%, rgba(202, 75, 59, 0.02) 100%);
    border: 1px solid rgba(202, 75, 59, 0.15);
    border-radius: 0.5rem;
    color: var(--primary);
}

.current-user-badge i {
    color: var(--primary);
    flex-shrink: 0;
}

.badge-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.badge-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
}

.badge-subtitle {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}
