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

:root {
    --primary-red: #E53935;
    --primary-red-dark: #C62828;
    --primary-red-light: #EF5350;
    --accent-red: #FF5252;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --bg-white: #FFFFFF;
    --bg-light: #FAFAFA;
    --bg-gray: #F5F5F5;
    --border-light: #E0E0E0;
    --shadow-sm: 0 2px 8px rgba(229, 57, 53, 0.08);
    --shadow-md: 0 4px 16px rgba(229, 57, 53, 0.12);
    --shadow-lg: 0 8px 32px rgba(229, 57, 53, 0.16);
    --glow-red: 0 0 20px rgba(229, 57, 53, 0.3);
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-dark: #E0E0E0;
    --text-medium: #B0B0B0;
    --text-light: #808080;
    --bg-white: #1E1E1E;
    --bg-light: #252525;
    --bg-gray: #2A2A2A;
    --border-light: #404040;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* Header */
.header {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
}

/* Logo */
.logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
    filter: drop-shadow(var(--shadow-md));
}

/* Cards with Glossy Effect */
.welcome-card,
.feature-card,
.auth-container,
.dashboard-sidebar,
.dashboard-content {
    background: var(--bg-white);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.welcome-card::before,
.feature-card::before,
.auth-container::before,
.dashboard-sidebar::before,
.dashboard-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229, 57, 53, 0.3), transparent);
}

.welcome-card h2,
.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-red);
    font-weight: 700;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Buttons with Glossy Effect */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    box-shadow: var(--shadow-md), var(--glow-red);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-red-light), var(--primary-red));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(229, 57, 53, 0.4);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-red);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-gray);
    border-color: var(--border-light);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-red);
}

.btn-block {
    width: 100%;
}

/* Auth */
.auth-container {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
}

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

.auth-header img.logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-gray);
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: var(--text-medium);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    color: var(--text-dark);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.status-message {
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

.status-message.success {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
    border: 1px solid #81C784;
    display: block;
}

.status-message.error {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: var(--primary-red-dark);
    border: 1px solid var(--accent-red);
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

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

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-light);
}

.dashboard-header {
    background: var(--bg-white);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-content {
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: var(--primary-red);
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content h1 .logo-text {
    display: none; /* Dölj text när logotypen finns */
}

.header-content img.logo {
    max-width: 180px;
    height: auto;
    margin: 0;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.stats span {
    padding: 0.625rem 1.25rem;
    background: var(--bg-gray);
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.stats .today {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Navigation Menu */
.main-nav {
    background: var(--bg-white) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-light) !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    transition: background 0.3s ease, border-color 0.3s ease !important;
    min-height: 55px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    width: 100%;
}

.nav-menu {
    display: flex !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
    width: 100%;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-red);
    background: rgba(229, 57, 53, 0.05);
}

.nav-link.active {
    color: var(--primary-red);
    background: var(--bg-gray);
    border-bottom-color: var(--primary-red);
    border-radius: 8px 8px 0 0;
    transition: background 0.3s ease;
}

.nav-arrow {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-item--dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.nav-item--dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-dropdown-link:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--primary-red);
}

.dashboard-main {
    width: 100%;
    margin: 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.dashboard-sidebar {
    padding: 1.25rem;
    height: fit-content;
    min-width: 250px;
}

.user-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.user-info h3 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.user-info p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
    color: var(--text-medium);
    transition: color 0.3s ease;
}

.search-box {
    margin-bottom: 2rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Filter Box */
.filter-box {
    margin-bottom: 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    border: 2px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.filter-box:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

.filter-header {
    background: linear-gradient(135deg, var(--primary-red), var(--accent-red));
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.2);
}

.filter-icon {
    font-size: 1.25rem;
}

.filter-dropdown {
    padding: 0.75rem 0;
    max-height: 350px;
    overflow-y: auto;
    background: var(--bg-white);
}

.filter-dropdown::-webkit-scrollbar {
    width: 8px;
}

.filter-dropdown::-webkit-scrollbar-track {
    background: var(--bg-gray);
}

.filter-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

.filter-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red-dark);
}

.filter-option {
    padding: 0.75rem 1.25rem;
    position: relative;
    transition: background 0.2s ease;
}

.filter-option:hover {
    background: rgba(229, 57, 53, 0.05);
}

.filter-option.select-all-option {
    background: rgba(229, 57, 53, 0.08);
    border-bottom: 2px solid var(--border-light);
    font-weight: 600;
}

.filter-option.has-indent {
    padding-left: 2.5rem;
    position: relative;
}

.filter-option.has-indent::before {
    content: "";
    position: absolute;
    left: 1.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary-red);
    opacity: 0;
    position: absolute;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.filter-checkbox:hover .checkbox-custom {
    border-color: var(--primary-red);
    transform: scale(1.1);
}

.checkbox-label {
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.filter-checkbox:hover .checkbox-label {
    color: var(--primary-red);
}

.filter-options-list {
    min-height: 50px;
}

/* Theme Toggle */
.theme-toggle-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-light);
}

.theme-toggle-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.theme-icon {
    font-size: 1.25rem;
}

.theme-text {
    font-weight: 600;
}

[data-theme="dark"] .theme-toggle-btn {
    background: var(--bg-gray);
    border-color: var(--border-light);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.filter-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.dashboard-content {
    padding: 2rem;
    overflow: visible;
    min-width: 0;
    width: 100%;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.content-header h2 {
    color: var(--text-dark);
    font-weight: 700;
}

.leads-table {
    min-height: 400px;
    width: 100%;
    overflow: visible;
}

.leads-table table {
    width: auto;
    border-collapse: collapse;
    table-layout: auto;
}

.leads-table th,
.leads-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.leads-table thead th {
    background: var(--bg-gray);
    font-weight: 700;
    color: var(--text-dark);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-light);
}

.leads-table tbody tr {
    background: var(--bg-white);
    transition: background 0.2s ease;
}

.leads-table tbody tr:hover {
    background: rgba(229, 57, 53, 0.05);
}

.leads-table th {
    white-space: nowrap;
}

.leads-table td {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Specifika kolumner som inte ska brytas */
.leads-table td:first-child {
    white-space: nowrap;
    min-width: 150px;
}

/* Radbryt operatör, företag och uppdrag - men låt dem expandera om det behövs */
.leads-table td:nth-child(3),
.leads-table td:nth-child(4),
.leads-table td:nth-child(5) {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 150px;
}

/* Se till att "Skapad" kolumnen syns korrekt (näst sista kolumnen) */
.leads-table td:nth-last-child(2) {
    white-space: nowrap;
    min-width: 120px;
}

/* Status cell styling */
.leads-table .status-cell {
    white-space: nowrap;
    min-width: 180px;
}

.leads-table .status-select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.leads-table .status-select:hover {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.leads-table .status-select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2);
}

.leads-table .link-cell {
    white-space: nowrap;
    min-width: 80px;
}

.leads-table .link-cell a {
    white-space: nowrap;
    display: inline-block;
}

.leads-table th {
    background: var(--bg-gray);
    font-weight: 700;
    color: var(--primary-red);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leads-table tr:hover {
    background: var(--bg-light);
}

.leads-table .link-cell a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.leads-table .link-cell a:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.pagination-info {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.btn-toggle-phones {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    display: block;
    margin-top: 0.25rem;
    font-weight: 600;
}

.btn-toggle-phones:hover {
    color: var(--primary-red-dark);
}

.phones-dropdown {
    margin-top: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    position: absolute;
    z-index: 10;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.phones-dropdown.hidden {
    display: none;
}

.phones-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phones-dropdown li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.phones-dropdown li::before {
    content: counter(phone-counter);
    counter-increment: phone-counter;
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: 700;
}

.phones-dropdown {
    counter-reset: phone-counter;
}

.phones-dropdown li:last-child {
    margin-bottom: 0;
}

.phones-dropdown li a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.phones-dropdown li a:hover {
    text-decoration: underline;
}

.phone-container {
    position: relative;
}

/* Tags */
.tag {
    display: inline-block;
    background: rgba(229, 57, 53, 0.1);
    color: var(--primary-red);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.tags-cell {
    position: relative;
}

.btn-tag-edit, .btn-comment-edit {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-tag-edit:hover, .btn-comment-edit:hover {
    opacity: 1;
}

.comment-cell {
    position: relative;
    max-width: 200px;
}

.comment-preview {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sortable columns */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: rgba(229, 57, 53, 0.05);
}

.sort-icon {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.5;
}

.sortable:hover .sort-icon {
    opacity: 1;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.bulk-actions-info {
    font-weight: 600;
    font-size: 1rem;
}

.bulk-actions-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.bulk-status-select {
    padding: 0.625rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.bulk-status-select:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.bulk-status-select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.bulk-actions-bar .btn {
    margin: 0;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

.bulk-actions-bar .btn-primary {
    background: white;
    color: var(--primary-red);
    border: 2px solid white;
}

.bulk-actions-bar .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.bulk-actions-bar .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.bulk-actions-bar .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Checkbox styling */
.checkbox-header {
    width: 150px;
    padding: 1rem;
    text-align: left;
}

.checkbox-cell {
    width: 50px;
    padding: 1rem;
    text-align: center;
}

.select-all-checkbox,
.lead-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0.5rem;
}

.select-all-checkbox input[type="checkbox"],
.lead-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary-red);
}

.select-all-checkbox span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.select-all-checkbox:hover span {
    color: var(--primary-red);
}

/* Selected row styling */
.leads-table tr.row-selected {
    background: rgba(229, 57, 53, 0.08);
}

.leads-table tr.row-selected:hover {
    background: rgba(229, 57, 53, 0.12);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .main-nav {
    background: var(--bg-white) !important;
    border-bottom-color: var(--border-light) !important;
}

[data-theme="dark"] .nav-link {
    color: var(--text-dark);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(229, 57, 53, 0.1);
}

[data-theme="dark"] .nav-link.active {
    background: var(--bg-gray);
    color: var(--primary-red);
}

[data-theme="dark"] .nav-dropdown {
    background: var(--bg-white);
    border-color: var(--border-light);
}

[data-theme="dark"] .nav-dropdown-link {
    color: var(--text-dark);
}

[data-theme="dark"] .nav-dropdown-link:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--primary-red);
}

[data-theme="dark"] .user-info {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .content-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .leads-table tr:hover {
    background: var(--bg-gray);
}

[data-theme="dark"] .leads-table tr.row-selected {
    background: rgba(229, 57, 53, 0.15);
}

/* Stats section */
.stats-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.stats-section h3,
.stats-section h4 {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.stats-section .stat-card {
    background: rgba(229, 57, 53, 0.1);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .stats-section .stat-card {
    background: rgba(229, 57, 53, 0.15);
    border-color: var(--border-light);
}

/* License key section */
.license-key-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.license-key-section h4 {
    color: var(--primary-red);
}

.license-key-section p {
    color: var(--text-dark);
}

.license-key-display {
    color: var(--primary-red);
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.pagination-info {
    color: var(--text-medium);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Header actions */
.header-actions-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-actions-group .btn {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.header-actions-group .btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

[data-theme="dark"] .header-actions-group .btn {
    background: var(--bg-gray);
    border-color: var(--border-light);
}

/* Content header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.content-header h2 {
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.3s ease;
}

@media (max-width: 968px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}
