:root {
    --primary-color: #1e293b;
    /* Modern Blue */
    --primary-hover: #0f172a;
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-light: #f8fafc;
    /* Slate 50 */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #b91c1c;
    --sidebar-width: 260px;
}

.text-danger {
    color: var(--danger-color) !important;
    opacity: 0.85;
    transition: all 0.2s;
}

.text-danger:hover {
    opacity: 1;
    background-color: rgba(185, 28, 28, 0.1);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #991b1b;
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--danger-color);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.logo-text {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item .lucide {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.company-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--white);
    padding-bottom: 0.25rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.logout-btn .lucide {
    width: 16px;
    height: 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    /* padding: 2rem; Moved to content-wrapper */
}

.content-wrapper {
    padding: 2rem;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.top-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(30, 41, 59, 0.2);
}

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

/* Performance Section */
.performance-section {
    margin-bottom: 2.5rem;
}

.date-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.date-presets {
    display: flex;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.date-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.date-btn.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-weight: 600;
}

.date-btn:hover:not(.active) {
    background-color: #f1f5f9;
}

.custom-date-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.custom-date-display:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.custom-date-display .chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.custom-date-display.active .chevron-icon {
    transform: rotate(180deg);
}

/* Date Picker Modal */
.date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.date-picker-modal.active {
    display: flex;
}

.date-picker-content {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 800px;
    /* Increased width */
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    /* Reduced padding */
    border-bottom: 1px solid var(--border-color);
}

.date-picker-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.date-picker-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    /* Side-by-side layout */
    gap: 2rem;
}

/* Quick Presets */
.quick-presets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
    border-right: 1px solid var(--border-color);
    padding-right: 1.5rem;
}

.preset-btn {
    padding: 0.625rem 1rem;
    background: transparent;
    /* Cleaner look for list */
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    text-align: left;
}

.preset-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.preset-btn.active {
    background-color: rgba(30, 41, 59, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Calendar */
.calendar-container {
    margin-bottom: 1rem;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.current-month {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.5rem 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    border: 2px solid transparent;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    background-color: #f1f5f9;
}

.calendar-day.other-month {
    color: #cbd5e1;
    cursor: default;
}

.calendar-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.calendar-day.today {
    border-color: var(--primary-color);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: var(--white);
}

.calendar-day.in-range {
    background-color: rgba(30, 41, 59, 0.175);
    color: var(--primary-color);
}

.calendar-day.range-start,
.calendar-day.range-end {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Selected Range Display */
.selected-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.range-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.range-input label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.range-input input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    background: var(--white);
    color: var(--text-dark);
    cursor: default;
    width: 140px;
}

.range-separator {
    font-size: 1rem;
    color: var(--text-light);
    padding-top: 1rem;
}

.date-picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

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

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    color: var(--text-light);
    width: 20px;
    height: 20px;
}

.stat-value-container {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

.stat-context {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Campaigns Section */
.campaigns-section {
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    /* overflow: visible !important; - Moved to desktop only media query below */
}

@media (min-width: 769px) {
    .campaigns-section {
        overflow: visible !important;
    }
}

.filters-bar {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-wrapper {
    position: relative;
    width: 300px;
}

.search-wrapper .lucide {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px;
    height: 18px;
}

.search-wrapper input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-wrapper input:focus {
    border-color: var(--primary-color);
}

.filter-wrapper select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    background-color: var(--white);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.table-container {
    width: 100%;
    /* overflow: visible !important; - Moved to desktop only media query below */
}

@media (min-width: 769px) {
    .table-container {
        overflow: visible !important;
    }
}

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

.campaigns-table th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    /* Increased z-index */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.campaigns-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

.th-sub {
    font-weight: 400;
    text-transform: none;
    color: #94a3b8;
}

.campaigns-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.875rem;
    white-space: nowrap;
}

.campaigns-table tr:last-child td {
    border-bottom: none;
}

.campaigns-table tr:hover {
    background-color: #f8fafc;
}

.campaign-name-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.campaign-title {
    font-weight: 600;
    color: var(--primary-color);
}

.campaign-brand {
    font-size: 0.75rem;
    color: var(--text-light);
}

.secondary-text {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.campaign-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.campaign-link:hover .campaign-title {
    color: var(--primary-hover);
    text-decoration: underline;
}

.badge-gray {
    background-color: #f1f5f9;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.75em;
    font-weight: 500;
    display: inline-block;
    line-height: 1.4;
}

.label-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .label-with-badge {
        flex-direction: column;
        align-items: flex-start;
    }
}

.edit-icon {
    width: 14px;
    height: 14px;
    color: var(--text-light);
    opacity: 0;
    transition: all 0.2s;
}

.campaign-link:hover .edit-icon {
    opacity: 1;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1rem;
    }

    .logo-text,
    .nav-item span,
    .logout-btn span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 0.75rem;
    }

    .company-name {
        text-align: center;
        font-size: 0.8125rem;
    }

    .logout-btn {
        padding: 0.625rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* Mobile Scrolling Fixes */
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .app-container {
        height: auto;
        overflow: visible;
    }

    .edit-layout {
        height: auto;
        display: block;
        overflow: visible;
    }

    .edit-content {
        height: auto;
        overflow: visible;
        padding-bottom: 100px;
    }

    /* Ensure sidebars don't block scrolling */
    .sidebar,
    .sub-sidebar {
        height: auto;
        min-height: 0;
    }

    .date-filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .date-presets {
        display: none;
    }

    .filters-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
    }

    .quick-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .selected-range {
        flex-direction: column;
        gap: 0.75rem;
    }

    .range-separator {
        display: none;
    }

    .date-picker-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Sorting Styles */
th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 24px;
    /* Space for the icon */
    user-select: none;
    transition: background-color 0.2s ease;
}

th.sortable:hover {
    background-color: #f1f5f9;
    /* Using hex directly as var(--bg-secondary) might not be defined */
}

th.sortable::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

th.sortable.asc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3C/svg%3E");
    opacity: 1;
}

th.sortable.desc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Edit Page Layout */
.edit-layout {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* Secondary Sidebar */
.sub-sidebar {
    width: 240px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sub-sidebar-header {
    margin-bottom: 2rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

.back-link .lucide {
    width: 16px;
    height: 16px;
}

.sub-sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sub-nav-item {
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    /* Removed uppercase and letter-spacing */
}

.sub-nav-item:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.sub-nav-item.active {
    background-color: #eff6ff;
    /* Light blue bg */
    color: var(--primary-color);
}

/* Dashboard Item Group */
.sub-nav-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.sub-nav-group .sub-nav-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-nav-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    height: 100%;
}

.sub-nav-action-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-color: rgba(30, 41, 59, 0.1);
}

.sub-nav-action-btn .lucide {
    width: 16px;
    height: 16px;
}

/* Elegant Tooltip */
.has-tooltip {
    position: relative;
}

.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.5rem;
}

.has-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -5px;
    /* Adjust for arrow positioning */
    pointer-events: none;
    z-index: 1000;
}

.has-tooltip:hover::before,
.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Edit Content Area */
.edit-content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    background-color: var(--white);
    /* The design seems to have white bg for content */
}

.edit-section {
    display: none;
    max-width: 800px;
    animation: fadeIn 0.3s ease;
}

.edit-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid transparent;
    /* For spacing consistency if needed */
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.mt-large {
    margin-top: 3rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    /* Standard Primary Blue */
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: all 0.2s;
}

.btn-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Icon Edit Buttons - Modern Elegant Style */
.btn-icon-edit {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-icon-edit .lucide {
    width: 16px;
    height: 16px;
}

.btn-icon-edit span {
    white-space: nowrap;
}

.btn-icon-edit:hover {
    background-color: rgba(30, 41, 59, 0.08);
    border-color: rgba(30, 41, 59, 0.2);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 41, 59, 0.1);
}

.btn-icon-edit:active {
    transform: translateY(0);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 400;
}

.form-group label .optional {
    color: #cbd5e1;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #94a3b8;
    /* Light text for readonly look */
    background-color: var(--white);
    outline: none;
    font-family: inherit;
}

.form-group input:read-only,
.form-group textarea:read-only {
    background-color: var(--white);
    /* Keep it white as per design */
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #cbd5e1;
}

.form-group input:not(:read-only),
.form-group textarea:not(:read-only) {
    color: var(--text-dark);
    border-color: #cbd5e1;
}

.form-group input:not(:read-only):focus,
.form-group textarea:not(:read-only):focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

/* Select Wrapper for custom arrow */
.select-wrapper {
    position: relative;
}

.select-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
}

.select-wrapper .lucide {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* Input with Symbol Wrapper */
.input-symbol-wrapper {
    position: relative;
    width: 100%;
}

.input-symbol-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
    /* Space for the symbol */
}

.input-symbol-wrapper.symbol-euro::after {
    content: '€';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-weight: 500;
    pointer-events: none;
    font-size: 0.95rem;
}

/* Inner Controls */
.inner-controls {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    background: var(--white);
    /* Cover background if needed */
}

/* Show controls when input is editable */
.input-symbol-wrapper:has(input:not(:read-only)) .inner-controls {
    opacity: 1;
    pointer-events: auto;
}

.btn-inner-control {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 0.25rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-inner-control:hover {
    background-color: #e2e8f0;
    color: var(--primary-color);
}

.btn-inner-control .lucide {
    width: 14px;
    height: 14px;
}

/* Adjust padding and symbol position when controls are present */
.input-symbol-wrapper.with-controls input {
    padding-right: 6rem;
    /* Space for symbol + buttons */
}

/* Default (Edit Mode) - Space for buttons */
.input-symbol-wrapper.symbol-euro.with-controls::after {
    right: 5rem;
    transition: right 0.2s;
}

/* Readonly Mode - Normal position */
.input-symbol-wrapper.symbol-euro.with-controls:has(input:read-only)::after {
    right: 1rem;
}

/* Links Section */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.link-item input {
    flex: 1;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.5rem;
    color: #94a3b8;
    background: var(--white);
}

.btn-icon-danger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff1f2;
    color: #f43f5e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-danger:hover {
    background-color: #ffe4e6;
}

/* Invoices Table */
.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table td {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.invoices-table td:first-child {
    color: var(--text-dark);
    font-weight: 600;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background-color: #ecfdf5;
    color: #10b981;
    border: 1px solid #d1fae5;
}

.badge-blue {
    background-color: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
}

.badge-danger {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.badge-neutral {
    background-color: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.badge-payment {
    padding-left: 0;
}

.link-action {
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #0f172a;
    padding-bottom: 1px;
}

/* Contract Viewer */
.contract-viewer-container {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: #f1f5f9;
    /* Light gray background for contrast */
    display: flex;
    flex-direction: column;
    height: 700px;
    overflow: hidden;
}

.contract-toolbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.toolbar-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.toolbar-info .lucide {
    width: 18px;
    height: 18px;
}

.btn-download-pdf {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download-pdf:hover {
    background-color: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-download-pdf .lucide {
    width: 16px;
    height: 16px;
}

.contract-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: block;
    /* Changed from flex to block to allow proper scrolling */
    text-align: center;
    /* Center the inline-block/flex paper */
}

.contract-paper {
    background-color: var(--white);
    width: 100%;
    max-width: 700px;
    /* A4-ish ratio width */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 3rem;
    display: inline-flex;
    /* Allows internal flex but behaves like inline element for centering */
    flex-direction: column;
    position: relative;
    margin-bottom: 2rem;
    text-align: left;
    /* Reset text alignment for content */
    min-height: auto;
    /* Ensure it grows with content */
}

.paper-header {
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 1.5rem;
}

.paper-logo {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.paper-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.05em;
}

.contract-body {
    flex: 1;
    color: #334155;
    line-height: 1.6;
}

.contract-plain-text {
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.8;
}

.contract-plain-text p {
    margin-bottom: 1rem;
}

.contract-parties {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    font-family: 'Inter', sans-serif;
    /* Keep sans-serif for parties info */
}

.party-box {
    flex: 1;
    font-size: 0.875rem;
}

.party-box h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.party-name {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.party-role {
    font-style: italic;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.party-separator {
    padding: 0 2rem;
    font-weight: 700;
    color: var(--text-light);
    align-self: center;
}

.contract-text h5 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.contract-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.intro-text {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contract-signatures {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
}

.signature-box {
    width: 200px;
}

.signature-box p:first-child {
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.signature-img {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5rem;
    color: var(--primary-color);
    transform: rotate(-5deg);
    margin: 1rem 0;
}

.sign-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.paper-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
}

/* Link Management Section */
.link-management-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1090px;
}

.link-block {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Spacing only for link management page */
#links-interface .link-block {
    margin-top: 10px;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.block-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.tooltip-icon {
    width: 20px;
    height: 20px;
    background-color: #e2e8f0;
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
}

.block-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.input-group-copy {
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.input-group-copy input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    outline: none;
    width: 100%;
}

.btn-copy {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.25rem;
}

.btn-copy:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-copy .lucide {
    width: 16px;
    height: 16px;
}

/* Generator Block */
.generated-result {
    margin-top: 1.5rem;
}

.generated-result label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.result-box {
    background-color: #fffbeb;
    /* Light yellow/amber bg */
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.result-box span {
    font-family: monospace;
    color: #b45309;
    font-size: 0.875rem;
    word-break: break-all;
}

.btn-copy-result {
    background: transparent;
    border: none;
    color: #b45309;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.btn-copy-result:hover {
    background-color: rgba(180, 83, 9, 0.1);
}

.btn-copy-result .lucide {
    width: 20px;
    height: 20px;
}

/* History Block */
.history-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
}

.history-toggle-btn .lucide {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.history-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-list.collapsed {
    margin-top: 0;
    height: 0;
    opacity: 0;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.history-url {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 0.375rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-icon-sm .lucide {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .history-info {
        width: 100%;
    }

    .history-url {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
    }

    .history-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
    }
}

/* Invoice Rows Section */
.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.invoice-row {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.invoice-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.invoice-row .invoice-icon-wrapper {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.1) 0%, rgba(30, 41, 59, 0.05) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invoice-row .invoice-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

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

.invoice-details .invoice-number {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.125rem 0;
}

.invoice-details .invoice-date {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
}

.invoice-row .invoice-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 100px;
    text-align: right;
}

.invoice-row .badge {
    min-width: 80px;
    text-align: center;
}

.invoice-consult-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.invoice-consult-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(30, 41, 59, 0.3);
}

.invoice-consult-btn .lucide {
    width: 16px;
    height: 16px;
}

/* Responsive Invoice Rows */
@media (max-width: 768px) {
    .invoice-row {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .invoice-details {
        flex-basis: 100%;
        order: 1;
    }

    .invoice-row .invoice-amount {
        order: 2;
        text-align: left;
        min-width: auto;
    }

    .invoice-row .badge {
        order: 3;
    }

    .invoice-consult-btn {
        order: 4;
        flex: 1;
    }
}

/* Empty State Card */
.empty-state-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: all 0.2s ease;
    max-width: 1090px;
}

.empty-state-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.empty-state-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.empty-state-icon .lucide {
    width: 22px;
    height: 22px;
    color: #64748b;
}

.empty-state-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.empty-state-description {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.btn-empty-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0;
    flex-shrink: 0;
}

.btn-empty-state:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-empty-state:active {
    background: #f1f5f9;
}

.btn-empty-state .lucide {
    width: 16px;
    height: 16px;
}

/* Palier Filled Card */
.palier-filled-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.palier-filled-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.palier-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.palier-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.palier-label .lucide {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.palier-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.palier-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-palier-edit,
.btn-palier-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--white);
}

.btn-palier-edit {
    color: var(--primary-color);
}

.btn-palier-edit:hover {
    background: rgba(30, 41, 59, 0.08);
    border-color: var(--primary-color);
}

.btn-palier-delete {
    color: var(--danger-color);
}

.btn-palier-delete:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger-color);
}

.btn-palier-edit .lucide,
.btn-palier-delete .lucide {
    width: 16px;
    height: 16px;
}

/* Modal Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(30, 41, 59, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-dark);
}

.modal-close-btn .lucide {
    width: 18px;
    height: 18px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Palier Reached Badge */
.palier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #b45309;
    /* Amber 700 */
    background-color: #fffbeb;
    /* Amber 50 */
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #fcd34d;
    /* Amber 300 */
    margin-top: 0.25rem;
    width: fit-content;
}

.palier-badge .lucide {
    width: 12px;
    height: 12px;
}

/* Palier Indicator */
.palier-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.palier-dot {
    width: 8px;
    height: 8px;
    background-color: var(--danger-color);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Tooltip */
.palier-indicator::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.palier-indicator::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border-width: 4px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.palier-indicator:hover::before,
.palier-indicator:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.palier-indicator:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* Payment Mode Slider */
.payment-slider-container {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    padding: 0.25rem;
    position: relative;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 50px;
    /* Match standard input height */
    align-items: center;
}

#statusFilterSlider {
    min-width: 350px;
    height: 38px;
}

#statusFilterSlider .payment-slider-option {
    white-space: nowrap;
    padding: 0 0.5rem;
}

.payment-slider-container.disabled {
    opacity: 0.6;
    pointer-events: none;
    background-color: #f8fafc;
}

.payment-slider-option {
    flex: 1;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    z-index: 2;
    transition: color 0.3s ease;
    border-radius: 0.375rem;
    height: 100%;
}

.payment-slider-option.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-slider-option:hover:not(.active) {
    color: var(--text-dark);
}

/* Toast Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(2rem);
    }
}

/* Invoice ID Link */
.invoice-id-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
    cursor: pointer;
}

.invoice-id-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-hover);
}

/* Invoice Modal */
.invoice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    padding: 2rem;
}

.invoice-modal.active {
    display: flex;
}

.invoice-modal-content {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.invoice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.invoice-status-badge {
    font-size: 0.875rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-modal-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-action:hover {
    background-color: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-modal-action .lucide {
    width: 16px;
    height: 16px;
}

.btn-modal-action span {
    white-space: nowrap;
}


.invoice-modal-body {
    padding: 2rem;
}

.invoice-modal-section {
    margin-bottom: 2rem;
}

.invoice-modal-section:last-child {
    margin-bottom: 0;
}

.invoice-id-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.invoice-campaign-name {
    font-size: 1rem;
    color: var(--text-light);
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* Billing Grid */
.billing-grid {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.billing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.billing-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.billing-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.billing-total {
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

.billing-total .billing-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.billing-value-total {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Invoice Timeline */
.invoice-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item-last::before {
    display: none;
}

.timeline-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--border-color);
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.timeline-content {
    flex: 1;
}

.timeline-event {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .invoice-modal {
        padding: 1rem;
    }

    .invoice-modal-content {
        max-height: 95vh;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .btn-modal-action span {
        display: none;
    }

    .btn-modal-action {
        padding: 0.5rem;
    }
}

/* Print styles for invoice modal */
@media print {
    body * {
        visibility: hidden;
    }

    .invoice-modal.active,
    .invoice-modal.active * {
        visibility: visible;
    }

    .invoice-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: white;
        padding: 0;
        backdrop-filter: none;
    }

    .invoice-modal-content {
        box-shadow: none;
        max-width: 100%;
        max-height: none;
    }

    .modal-actions,
    .close-btn {
        display: none !important;
    }

    .invoice-modal-header {
        border-bottom: 2px solid var(--border-color);
    }
}

/* Mobile Sidebar Styles */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

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

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
        padding: 1.5rem;
        /* Restore padding */
    }

    /* Restore text visibility overridden by tablet media query */
    .logo-text,
    .nav-item span,
    .logout-btn span {
        display: block;
    }

    .nav-item {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        /* Restore padding */
    }

    .logout-btn {
        justify-content: flex-start;
    }

    .company-name {
        text-align: left;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        width: 100%;
        padding-top: 1rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .hamburger-btn {
        display: block;
    }

    /* Adjust header for mobile */
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .header-left {
        display: flex;
        flex-direction: column;
        /* Stack title and subtitle */
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .header-right {
        width: 100%;
    }

    .header-right .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Adjust stats grid */
    .stats-grid,
    .stats-grid-detailed {
        grid-template-columns: 1fr;
    }

    /* Adjust table */
    .table-container {
        overflow-x: auto;
    }

    /* Adjust date filter */
    .date-filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .date-presets {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .custom-date-display {
        justify-content: space-between;
    }

    /* Adjust filters bar */
    .filters-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
    }

    .filter-wrapper {
        width: 100%;
    }

    .filter-wrapper select {
        width: 100%;
    }

    /* Mobile Date Picker Styles */
    .date-picker-modal {
        align-items: flex-end;
        /* Align to bottom for slide-up effect or center for full screen */
        padding: 0;
    }

    .date-picker-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        /* Full screen */
        max-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .date-picker-header {
        flex-shrink: 0;
    }

    .date-picker-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        overflow-y: auto;
    }

    /* Horizontal Presets */
    .quick-presets {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .preset-btn {
        flex: 0 0 auto;
        /* Don't shrink */
        background-color: #f8fafc;
        border: 1px solid var(--border-color);
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        /* Pill shape */
    }

    .preset-btn.active {
        background-color: var(--primary-color);
        color: var(--white);
        border-color: var(--primary-color);
    }

    /* Calendar adjustments */
    .calendar-container {
        width: 100%;
        margin-bottom: 0;
    }

    .calendar-day {
        font-size: 0.9rem;
        /* Slightly larger targets */
    }

    /* Footer adjustments */
    .date-picker-footer {
        flex-direction: column;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        padding: 1rem;
        background: var(--white);
        /* Ensure background is opaque */
        flex-shrink: 0;
    }

    .selected-range {
        width: 100%;
        justify-content: space-between;
    }

    .range-input {
        width: 45%;
    }

    .range-input input {
        width: 100%;
    }

    .footer-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Submenu */
.mobile-submenu-container {
    display: none;
    padding: 1rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-back-link {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.mobile-back-link:hover {
    color: var(--primary-color);
}

.mobile-back-link .lucide {
    width: 20px;
    height: 20px;
}

.mobile-submenu-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--white);
    color: var(--text-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.mobile-submenu-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.1);
}

@media (max-width: 768px) {
    .sub-sidebar {
        display: none;
    }

    .mobile-submenu-container {
        display: block;
    }

    .mobile-back-link {
        display: flex;
    }

    .edit-layout {
        flex-direction: column;
    }

    .edit-content {
        padding: 1rem;
    }

    /* Mobile Optimization for Edit Page Sections */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    /* Contract Mobile Optimization */
    .contract-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .contract-toolbar .toolbar-info {
        margin-bottom: 0.5rem;
    }

    .contract-toolbar>div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-download-pdf {
        width: 100%;
        justify-content: center;
    }

    .contract-scroll-area {
        padding: 1rem;
    }

    .contract-paper {
        padding: 1.5rem;
        width: 100%;
        display: flex;
        /* Ensure it behaves as a flex container */
    }

    .contract-signatures {
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
    }

    .signature-box {
        width: 100%;
        text-align: center;
    }

    .signature-box p:first-child {
        text-align: center;
    }

    .signature-img {
        justify-content: center;
        display: flex;
    }

    /* Adjust Palier Empty State */
    .empty-state-card {
        padding: 1.5rem;
    }
}

/* Mobile fix for section headers */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-header h3 {
        margin-bottom: 0.25rem;
    }

    .section-subtitle {
        margin-left: 0;
        text-align: left;
    }
}

/* Mobile Compact Stats */
.stats-mobile-compact {
    display: none;
}

@media (max-width: 768px) {
    .stats-grid-detailed {
        display: none;
    }

    .stats-mobile-compact {
        display: block;
        margin-bottom: 2rem;
    }

    .stat-card-mobile {
        background: var(--white);
        border-radius: 12px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        padding: 0;
        overflow: hidden;
    }

    .mobile-stat-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.25rem;
    }

    .mobile-label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.875rem;
        color: var(--text-light);
        font-weight: 500;
    }

    .mobile-label i {
        width: 18px;
        height: 18px;
        color: var(--primary-color);
        opacity: 0.7;
    }

    .mobile-value {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--text-dark);
    }

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

/* Info Alert */
.info-alert {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.info-alert i {
    color: #3b82f6;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-alert p {
    margin: 0;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Manual UTM Grid */
.manual-utm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .manual-utm-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* --- Refactored Utilities & Components --- */

/* Flex Utilities */
.flex-align-center-gap-1 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flex-align-center-gap-05 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flex-col-gap-025 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flex-between-center-mb-1-5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Text Utilities */
.text-decoration-none {
    text-decoration: none;
}

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

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Icon Utilities */
.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-xs {
    width: 14px;
    height: 14px;
}

/* Component Specific */
.btn-create-campaign {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.empty-table-cell {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.header-block {
    display: block;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Link Table Specific */
.link-url-text {
    font-weight: 500;
    color: var(--text-dark);
    word-break: break-all;
    white-space: normal;
}

.link-external-icon {
    color: var(--text-light);
    flex-shrink: 0;
    transition: color 0.2s;
}

.link-external-icon:hover {
    color: var(--primary-color);
}

.link-id-text {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: monospace;
}

.progress-bar-bg {
    flex: 1;
    height: 6px;
    background: #f1f5f9;
    /* Fallback for var(--background-color) if not defined */
    border-radius: 3px;
    max-width: 100px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Mobile Empty State Card */
@media (max-width: 768px) {
    .empty-state-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .empty-state-content {
        width: 100%;
        align-items: center;
    }

    .btn-empty-state {
        width: 100%;
        margin-left: 0;
    }
}

/* SEPA Authorization Card */
.sepa-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    gap: 1.5rem;
}

.sepa-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.sepa-content-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.sepa-logo {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sepa-logo .lucide {
    width: 22px;
    height: 22px;
    color: #64748b;
}

.sepa-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sepa-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sepa-iban {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* SEPA Pending Block */
.sepa-pending-block {
    background: #FFFBEB;
    /* Amber 50 */
    border: 1px solid #FCD34D;
    /* Amber 300 */
    border-radius: 0.75rem;
    padding: 1.5rem;
    animation: slideInUp 0.3s ease-out;
    margin-bottom: 1rem;
}

.pending-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #B45309;
    /* Amber 700 */
    font-weight: 600;
    margin-bottom: 1rem;
}

.pending-status .lucide {
    width: 20px;
    height: 20px;
    color: #F59E0B;
    /* Amber 500 */
}

.pending-content p {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .sepa-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .sepa-content-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .sepa-card .btn-empty-state {
        width: 100%;
        margin-left: 0;
    }

    /* Slider mobile fix */
    #statusFilterSlider {
        min-width: unset;
        width: 100%;
        gap: 2px;
    }

    #statusFilterSlider .payment-slider-option {
        font-size: 0.75rem;
        padding: 0 0.25rem;
    }

    .content-wrapper {
        padding: 1rem;
    }
}