/*
 * LinkVerse Dashboard Styles
 * Dedicated stylesheet for the user dashboard page
 */

/* ========================================
   TAB CONTENT STYLES
======================================== */

.tab-content {
    display: none;
}

.tab-content.hidden {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content.block {
    display: block;
}

/* Tab switching transitions */
.tab-content {
    transition: opacity 0.2s ease-in-out;
}

.tab-content.hidden {
    opacity: 0;
    pointer-events: none;
}

.tab-content.block {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   ACTION BUTTON STYLES
======================================== */

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 60px;
}

.action-btn.blue {
    background-color: #3b82f6;
    color: white;
}

.action-btn.blue:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.action-btn.red {
    background-color: #ef4444;
    color: white;
}

.action-btn.red:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ========================================
   STATUS BADGE STYLES
======================================== */

.status-active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-inactive {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-pending {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========================================
   NEW LINK ROW HIGHLIGHT
======================================== */

.new-link-row {
    background-color: #f0f9ff;
    transition: background-color 0.3s ease;
}

/* ========================================
   DASHBOARD LAYOUT
======================================== */

.dashboard-container {
    min-height: 100vh;
    background-color: #f9fafb;
}

.dashboard-layout {
    display: flex;
}

.dashboard-sidebar {
    width: 16rem;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
}

.dashboard-main-content {
    flex: 1;
    padding: 2rem;
}

/* ========================================
   SIDEBAR STYLES
======================================== */

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.sidebar-navigation {
    margin-top: 1.5rem;
}

.navigation-container {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-tab {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: #6b7280;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-tab:hover {
    background-color: #f9fafb;
    color: #111827;
}

.nav-tab--active {
    color: #1d4ed8;
    background-color: #eff6ff;
    border-right: 2px solid #3b82f6;
    border-radius: 0.5rem 0 0 0.5rem;
}

.nav-tab-icon {
    margin-right: 0.75rem;
}

.nav-tab-text {
    font-weight: 500;
}

/* ========================================
   TAB CONTENT
======================================== */

.tab-content {
    display: none;
}

.tab-content.hidden {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   DASHBOARD HEADER
======================================== */

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: #6b7280;
}

/* ========================================
   STATS CARDS
======================================== */

/* Override TailwindCSS classes with higher specificity */
.dashboard-stats-grid.grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .dashboard-stats-grid.grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stats-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stats-card-content {
    display: flex;
    align-items: center;
}

.stats-card-icon-container {
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.stats-card--links .stats-card-icon-container {
    background-color: #dbeafe;
}

.stats-card--clicks .stats-card-icon-container {
    background-color: #dcfce7;
}

.stats-card--earnings .stats-card-icon-container {
    background-color: #fef3c7;
}

.stats-card--ctr .stats-card-icon-container {
    background-color: #e9d5ff;
}

.stats-card-icon {
    font-size: 1.25rem;
}

.stats-card--links .stats-card-icon {
    color: #3b82f6;
}

.stats-card--clicks .stats-card-icon {
    color: #16a34a;
}

.stats-card--earnings .stats-card-icon {
    color: #d97706;
}

.stats-card--ctr .stats-card-icon {
    color: #9333ea;
}

.stats-card-info {
    margin-left: 1rem;
}

.stats-card-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stats-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* ========================================
   LINK CREATION SECTION
======================================== */

.link-creation-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.link-creation-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.link-creation-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .link-creation-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.form-field-group {
    display: flex;
    flex-direction: column;
}

.form-field-group.flex.items-end {
    justify-content: flex-end;
    align-items: stretch;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #374151;
}

.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: transparent;
    background-color: #ffffff;
    color: #374151;
}

.form-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-input--readonly {
    background-color: #f9fafb;
    color: #374151;
    cursor: not-allowed;
}

.form-submit-button {
    width: 100%;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-submit-button:hover {
    background-color: #1d4ed8;
}

.form-result-area {
    margin-top: 1rem;
}

/* ========================================
   DASHBOARD WIDGETS
======================================== */

.dashboard-widgets-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

@media (min-width: 768px) {
    .dashboard-widgets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.earnings-widget,
.activity-widget {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.earnings-widget-title,
.activity-widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.earnings-widget-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.earnings-item-label {
    color: #6b7280;
}

.earnings-item-value {
    font-weight: 600;
}

.earnings-total {
    color: #059669;
    font-weight: 700;
}

.earnings-withdrawal-button {
    width: 100%;
    margin-top: 1.5rem;
    background-color: #16a34a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.earnings-withdrawal-button:hover {
    background-color: #15803d;
}

.activity-widget-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-indicator {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #3b82f6;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.activity-text {
    color: #6b7280;
    flex: 1;
    margin-right: 0.75rem;
}

.activity-timestamp {
    color: #9ca3af;
    font-size: 0.8rem;
    flex-shrink: 0;
    text-align: right;
}

/* ========================================
   LINKS TABLE
======================================== */

.links-tab-header {
    margin-bottom: 2rem;
}

.links-tab-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.links-tab-subtitle {
    color: #6b7280;
}

.links-table-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.links-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.links-table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.links-table-wrapper {
    overflow-x: auto;
}

.links-table {
    width: 100%;
}

.links-table-head {
    background-color: #f9fafb;
}

.links-table-header-cell {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.links-table-body {
    background-color: white;
    border-top: 1px solid #e5e7eb;
}

.link-table-row {
    border-bottom: 1px solid #e5e7eb;
}

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

.link-cell,
.clicks-cell,
.earnings-cell,
.status-cell,
.actions-cell {
    padding: 1rem 1.5rem;
    white-space: nowrap;
}

.link-info {
    font-size: 0.875rem;
    color: #111827;
}

.clicks-value,
.earnings-value {
    font-size: 0.875rem;
    color: #111827;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-indicator--active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    box-shadow: 0 1px 2px rgba(34, 197, 94, 0.1);
}

.status-indicator--active::before {
    content: "●";
    margin-right: 0.25rem;
    font-size: 0.5rem;
    color: #16a34a;
}

.status-indicator--inactive {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-indicator--inactive::before {
    content: "●";
    margin-right: 0.25rem;
    font-size: 0.5rem;
    color: #9ca3af;
}

.link-actions-container {
    display: flex;
    gap: 0.5rem;
}

.link-edit-button,
.link-delete-button {
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 2rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.link-edit-button {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.link-edit-button:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.link-edit-button::before {
    content: "✏️";
    font-size: 0.875rem;
}

.link-delete-button {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.link-delete-button:hover {
    background-color: #fecaca;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.link-delete-button::before {
    content: "🗑️";
    font-size: 0.875rem;
}

/* ========================================
   STATS TAB
======================================== */

.stats-tab-header {
    margin-bottom: 2rem;
}

.stats-tab-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stats-tab-subtitle {
    color: #6b7280;
}

.stats-content-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.performance-metrics-widget,
.geographic-data-widget {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.performance-metrics-title,
.geographic-data-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.performance-metrics-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.geographic-data-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.metric-label,
.country-label {
    color: #6b7280;
}

.metric-value,
.country-percentage {
    font-weight: 600;
}

.country-item {
    font-size: 0.875rem;
}

/* ========================================
   WITHDRAWALS TAB
======================================== */

.withdrawals-tab-header {
    margin-bottom: 2rem;
}

.withdrawals-tab-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.withdrawals-tab-subtitle {
    color: #6b7280;
}

.balance-widget,
.earnings-summary-widget,
.withdrawal-form-widget {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.balance-widget-title,
.earnings-summary-title,
.withdrawal-form-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.balance-display {
    text-align: center;
    padding: 1rem 0;
}

.balance-amount {
    font-size: 1.875rem;
    font-weight: 700;
    color: #16a34a;
}

.balance-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.earnings-summary-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .earnings-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.earnings-period-card {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
}

.earnings-period--today {
    background-color: #eff6ff;
}

.earnings-period--week {
    background-color: #f0fdf4;
}

.earnings-period--month {
    background-color: #faf5ff;
}

.earnings-period-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.earnings-period-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.earnings-period--today .earnings-period-value {
    color: #2563eb;
}

.earnings-period--week .earnings-period-value {
    color: #16a34a;
}

.earnings-period--month .earnings-period-value {
    color: #9333ea;
}

.earnings-no-data {
    text-align: center;
    padding: 1rem 0;
}

.earnings-no-data-text {
    color: #6b7280;
}

.withdrawal-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .withdrawal-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-input-wrapper {
    position: relative;
}

.form-currency-symbol {
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    color: #6b7280;
}

.form-input--amount {
    padding-left: 2rem;
    background-color: #ffffff;
    color: #374151;
}

.form-help-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Withdrawal form specific input styling */
.withdrawal-form .form-input {
    background-color: #ffffff;
    color: #374151;
}

.withdrawal-form .form-input:focus {
    background-color: #ffffff;
    color: #374151;
}

.withdrawal-form .form-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Fix withdrawal form button styling */
.withdrawal-form .form-submit-button {
    background-color: #2563eb;
    color: white;
}

.withdrawal-form .form-submit-button:hover {
    background-color: #1d4ed8;
    color: white;
}

.form-submit-section {
    margin-top: 1.5rem;
}

/* ========================================
   SETTINGS TAB
======================================== */

.settings-tab-header {
    margin-bottom: 2rem;
}

.settings-tab-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.settings-tab-subtitle {
    color: #6b7280;
}

.settings-widget {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.settings-placeholder-text {
    color: #6b7280;
    text-align: center;
    padding: 2rem 0;
}

/* ========================================
   ANALYTICS SECTION (Plugin Integration)
======================================== */

/* Analytics container styling - using semantic classes */
.analytics-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Analytics title styling */
.analytics-title {
    color: #1e40af;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* Analytics grid styling */
.analytics-grid {
    gap: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .analytics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.analytics-grid > div {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
}

.analytics-grid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analytics-grid > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, currentColor 50%, transparent 100%);
    opacity: 0.3;
}

/* Analytics metric values */
.analytics-metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #1f2937;
    display: block;
}

/* Analytics metric labels */
.analytics-metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

/* Color-specific enhancements for analytics metrics */
.analytics-metric--clicks .analytics-metric-value {
    color: #1d4ed8;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    .analytics-metric--clicks .analytics-metric-value {
        color: #1d4ed8;
        background: none;
    }
}

.analytics-metric--visitors .analytics-metric-value {
    color: #16a34a;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@supports not (-webkit-background-clip: text) {
    .analytics-metric--visitors .analytics-metric-value {
        color: #16a34a;
        background: none;
    }
}

.analytics-metric--country .analytics-metric-value {
    color: #9333ea;
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@supports not (-webkit-background-clip: text) {
    .analytics-metric--country .analytics-metric-value {
        color: #9333ea;
        background: none;
    }
}

.analytics-metric--ctr .analytics-metric-value {
    color: #ea580c;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@supports not (-webkit-background-clip: text) {
    .analytics-metric--ctr .analytics-metric-value {
        color: #ea580c;
        background: none;
    }
}

/* Add subtle icons to each metric */
.analytics-metric--clicks::after {
    content: "👆";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
    z-index: 1;
}

.analytics-metric--visitors::after {
    content: "👥";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
    z-index: 1;
}

.analytics-metric--country::after {
    content: "🌍";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
    z-index: 1;
}

.analytics-metric--ctr::after {
    content: "📊";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
    z-index: 1;
}

/* ========================================
   BALANCE SECTION
======================================== */

/* Balance container */
.balance-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.balance-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
    border-radius: 1rem 1rem 0 0;
}

/* Balance title */
.balance-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Balance content */
.balance-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Balance card */
.balance-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

/* Balance amount section */
.balance-amount-section {
    text-align: center;
}

.balance-amount-bar {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 0.75rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.balance-amount-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #065f46;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: block;
    letter-spacing: -0.025em;
}

.balance-status {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

/* Balance pending section */
.balance-pending-section {
    margin-top: 1rem;
}

.balance-pending-bar {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.1);
    transition: all 0.3s ease;
}

.balance-pending-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
}

.balance-pending-amount {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a16207;
    display: block;
    text-align: center;
}

/* Balance animations */
@keyframes balancePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.balance-amount-bar:hover .balance-amount {
    animation: balancePulse 2s ease-in-out infinite;
}

/* ========================================
   WITHDRAWALS SECTION
======================================== */

/* Withdrawals container */
.withdrawals-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* Withdrawals title */
.withdrawals-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

/* Withdrawals table */
.withdrawals-table {
    width: 100%;
}

.withdrawals-table-header {
    background-color: #f9fafb;
}

.withdrawals-table-header-cell {
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.withdrawals-table-body {
    background-color: white;
}

.withdrawals-table-row {
    border-bottom: 1px solid #e5e7eb;
}

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

.withdrawals-table-cell {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #111827;
}

/* Withdrawal status indicators */
.withdrawal-status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    position: relative;
}

.withdrawal-status-indicator--approved {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    box-shadow: 0 1px 2px rgba(34, 197, 94, 0.1);
}

.withdrawal-status-indicator--approved::before {
    content: "✓";
    margin-right: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.withdrawal-status-indicator--pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1);
}

.withdrawal-status-indicator--pending::before {
    content: "⏳";
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.withdrawal-status-indicator--processing {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

.withdrawal-status-indicator--processing::before {
    content: "⚙️";
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.withdrawal-status-indicator--rejected {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.withdrawal-status-indicator--rejected::before {
    content: "✗";
    margin-right: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.withdrawal-status-indicator--default {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.withdrawal-status-indicator--default::before {
    content: "●";
    margin-right: 0.25rem;
    font-size: 0.5rem;
}

/* Withdrawals empty state */
.withdrawals-empty-text {
    color: #6b7280;
    text-align: center;
    padding: 2rem 0;
}

/* ========================================
   MOBILE FOOTER NAVIGATION
======================================== */

.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    display: none; /* Hidden by default, shown on mobile */
}

.mobile-nav-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    max-width: 100%;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    min-width: 60px;
    position: relative;
    flex: 1;
}

.mobile-nav-item:hover {
    color: #1f2937;
    background-color: #f9fafb;
}

.mobile-nav-item--active {
    color: #2563eb;
    background-color: #eff6ff;
}

.mobile-nav-item--active::before {
    content: '';
    position: absolute;
    top: -0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #2563eb;
    border-radius: 50%;
}

.mobile-nav-icon {
    font-size: 1.125rem;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.mobile-nav-item:hover .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-item--active .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    /* Hide desktop sidebar on mobile */
    .dashboard-sidebar {
        display: none;
    }
    
    /* Ensure sidebar is completely hidden */
    .dashboard-layout {
        flex-direction: column;
    }
    
    .dashboard-layout > .dashboard-sidebar {
        display: none;
        width: 0;
        min-width: 0;
        overflow: hidden;
    }
    
    /* Show mobile footer navigation */
    .mobile-footer-nav {
        display: block;
    }
    
    /* Ensure mobile navigation uses row direction */
    .mobile-nav-container {
        flex-direction: row;
        display: flex;
    }
    
    .mobile-nav-item {
        flex-direction: row;
        display: flex;
    }
    
    /* Adjust main content for mobile footer */
    .dashboard-main-content {
        padding: 1rem;
        padding-bottom: 5rem; /* Space for mobile footer */
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Ensure main content takes full width */
    .dashboard-layout {
        width: 100%;
        max-width: 100%;
    }
    
    /* Mobile layout adjustments */
    .dashboard-layout {
        flex-direction: column;
    }
    
    /* Override TailwindCSS md:grid-cols-4 on mobile with higher specificity */
    .dashboard-stats-grid.grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .dashboard-stats-grid.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    /* Optimize stats cards for mobile 2-column layout */
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .stats-card-icon-container {
        margin-bottom: 0.75rem;
        margin-right: 0;
    }
    
    .stats-card-info {
        margin-left: 0;
    }
    
    .stats-card-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .stats-card-value {
        font-size: 1.25rem;
    }
    
    .dashboard-widgets-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .stats-content-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .earnings-summary-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .withdrawal-form-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    /* Analytics grid mobile adjustments */
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .analytics-grid > div {
        padding: 1rem 0.75rem;
        min-height: 100px;
    }
    
    .analytics-metric-value {
        font-size: 1.75rem;
    }
    
    .analytics-metric-label {
        font-size: 0.75rem;
    }
    
    /* Balance section mobile adjustments */
    .balance-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    .balance-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .balance-amount-bar {
        padding: 1rem 1.5rem;
    }
    
    /* Links table mobile adjustments */
    .links-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .links-table {
        min-width: 600px;
    }
    
    /* Form adjustments for mobile */
    .link-creation-form-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .form-field-group.flex.items-end {
        justify-content: flex-start;
    }
    
    /* Recent Activity mobile adjustments */
    .activity-widget {
        padding: 1rem;
    }
    
    .activity-widget-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .activity-widget-content {
        gap: 0.5rem;
    }
    
    .activity-item {
        font-size: 0.8rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f3f4f6;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .activity-item:last-child {
        border-bottom: none;
    }
    
    .activity-indicator {
        width: 0.375rem;
        height: 0.375rem;
        flex-shrink: 0;
    }
    
    .activity-text {
        font-size: 0.8rem;
        line-height: 1.4;
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-right: 0.5rem;
    }
    
    .activity-timestamp {
        font-size: 0.75rem;
        flex-shrink: 0;
        text-align: right;
    }
}

@media (max-width: 640px) {
    /* Override TailwindCSS on small mobile with higher specificity */
    .dashboard-stats-grid.grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    .dashboard-stats-grid.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    /* Further optimize for small mobile */
    .stats-card {
        padding: 0.75rem;
    }
    
    .stats-card-icon-container {
        margin-bottom: 0.5rem;
        padding: 0.375rem;
    }
    
    .stats-card-icon {
        font-size: 1rem;
    }
    
    .stats-card-label {
        font-size: 0.7rem;
    }
    
    .stats-card-value {
        font-size: 1.125rem;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .analytics-grid > div {
        padding: 1.25rem 1rem;
        min-height: 90px;
    }
    
    .analytics-metric-value {
        font-size: 1.5rem;
    }
    
    .analytics-metric-label {
        font-size: 0.75rem;
    }
    
    /* Mobile footer adjustments for very small screens */
    .mobile-nav-container {
        padding: 0.25rem 0;
        flex-direction: row;
    }
    
    .mobile-nav-item {
        padding: 0.375rem 0.25rem;
        min-width: 50px;
        flex: 1;
        flex-direction: row;
    }
    
    .mobile-nav-icon {
        font-size: 1rem;
        margin-right: 0.25rem;
    }
    
    .mobile-nav-text {
        font-size: 0.625rem;
    }
    
    /* Recent Activity adjustments for small mobile */
    .activity-widget {
        padding: 0.75rem;
    }
    
    .activity-widget-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .activity-item {
        font-size: 0.75rem;
        padding: 0.375rem 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.375rem;
    }
    
    .activity-indicator {
        width: 0.25rem;
        height: 0.25rem;
        flex-shrink: 0;
    }
    
    .activity-text {
        font-size: 0.75rem;
        line-height: 1.3;
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-right: 0.375rem;
    }
    
    .activity-timestamp {
        font-size: 0.7rem;
        flex-shrink: 0;
        text-align: right;
    }
    
    /* Hide text on very small screens, show only icons */
    @media (max-width: 480px) {
        .mobile-nav-text {
            display: none;
        }
        
        /* Balance text adjustments for very small screens */
        .balance-amount {
            font-size: 1.25rem;
        }
        
        .balance-title {
            font-size: 0.875rem;
        }
        
        .balance-container {
            padding: 0.75rem;
        }
        
        .balance-amount-bar {
            padding: 0.75rem 1rem;
        }
        
        .mobile-nav-item {
            padding: 0.5rem 0.25rem;
            min-width: 40px;
            flex-direction: row;
        }
        
        .mobile-nav-icon {
            margin-right: 0;
            font-size: 1.25rem;
        }
        
        /* Recent Activity for very small screens */
        .activity-widget {
            padding: 0.5rem;
        }
        
        .activity-widget-title {
            font-size: 0.875rem;
        }
        
        .activity-item {
            font-size: 0.7rem;
            padding: 0.25rem 0;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 0.25rem;
        }
        
        .activity-text {
            font-size: 0.7rem;
            line-height: 1.2;
            flex: 1;
            word-wrap: break-word;
            overflow-wrap: break-word;
            margin-right: 0.25rem;
        }
        
        .activity-timestamp {
            font-size: 0.65rem;
            flex-shrink: 0;
            text-align: right;
        }
        
        /* Very small screens - single column for stats */
        .dashboard-stats-grid.grid.md\:grid-cols-4 {
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 0.5rem;
        }
        
        .dashboard-stats-grid.grid {
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 0.5rem;
        }
        
        .dashboard-stats-grid {
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 0.5rem;
        }
    }
}

/* Force hide sidebar on mobile devices */
@media (max-width: 768px) {
    .dashboard-sidebar,
    .dashboard-layout .dashboard-sidebar,
    .sidebar-header,
    .sidebar-navigation,
    .navigation-container,
    .nav-tab {
        display: none;
        visibility: hidden;
        width: 0;
        height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        opacity: 0;
    }
    
    /* Ensure main content takes full width on mobile */
    .dashboard-main-content {
        flex: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide any remaining sidebar elements */
    .dashboard-layout > *:first-child {
        display: none;
    }
}

@media (min-width: 769px) {
    /* Hide mobile footer on desktop */
    .mobile-footer-nav {
        display: none;
    }
    
    /* Show desktop sidebar */
    .dashboard-sidebar {
        display: block;
    }
    
    /* Remove mobile padding from main content */
    .dashboard-main-content {
        padding-bottom: 2rem;
    }
}
