:root {
    /* Core Brand Colors - Modern Fintech Palette */
    --brand-dark: #18181b;    /* Sharp, near-black Graphite */
    --brand-primary: #6366f1; /* Vibrant Tech Indigo */
    --brand-success: #10b981; /* Crisp Emerald Green */
    --brand-gray: #71717a;    /* Neutral Zinc */
    
    /* Backgrounds & Surfaces */
    --bg-main: #fafafa;       /* Cleaner, brighter background */
    --card-bg: #ffffff;
    
    /* Text */
    --text-main: var(--brand-dark);
    --text-muted: var(--brand-gray);
    
    /* Borders & UI */
    --border-color: rgba(24, 24, 27, 0.1); 
    --radius-main: 12px; 
    --shadow-main: 0 4px 15px rgba(0, 0, 0, 0.03); 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Top Navigation Bar */
.top-navbar {
    background-color: var(--brand-dark);
    color: white;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand { 
    font-weight: 700; 
    font-size: 1.25rem; 
    letter-spacing: -0.5px;
}

.nav-actions { display: flex; align-items: center; gap: 15px; }

.modifier-label { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modifier-input { 
    width: 65px; 
    padding: 6px 10px; 
    border-radius: 6px; 
    border: 1px solid rgba(255,255,255,0.15); 
    background: rgba(255,255,255,0.05);
    color: white;
    text-align: center; 
    font-weight: 600; 
}

.modifier-input:focus { outline: none; border-color: var(--brand-primary); }

.nav-actions select { 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-weight: 600; 
    border: 1px solid rgba(255,255,255,0.1); 
    background-color: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
}

.nav-actions select option { color: var(--brand-dark); }

.dashboard-container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-main);
}


.report-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.report-actions-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 24px;
}

.status-inline {
    color: var(--brand-primary);
    font-weight: 700;
    min-height: 20px;
}

/* Centered Profile Banner */
.profile-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 35px 20px !important; 
    background-color: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: -10px;
}

.profile-banner img {
    width: 90px; 
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.profile-banner h2 {
    margin: 0;
    font-size: 2.5rem; 
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: -1px; 
}

/* Date Filters Panel */
.date-filter-panel { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
    padding: 16px 24px;
}

.preset-buttons button { 
    background: transparent; 
    color: var(--text-muted); 
    border: 1px solid var(--border-color); 
    padding: 8px 16px; 
    margin-right: 8px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600;
    transition: all 0.2s ease;
}

.preset-buttons button:hover {
    border-color: var(--brand-gray);
    color: var(--brand-dark);
}

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

.custom-range { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 500;
    color: var(--brand-gray);
}

/* Inputs & Admin Panel */
.admin-panel { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.add-client-group, .add-record-group { display: flex; gap: 12px; }

input { 
    padding: 10px 14px; 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    font-family: inherit;
    color: var(--brand-dark);
}

input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

button { 
    padding: 10px 20px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: transform 0.1s, background-color 0.2s;
}

button:active { transform: scale(0.98); }

/* Admin-only visibility safety layer */
.admin-only,
.admin-only-inline {
    display: none !important;
}

body.is-admin .admin-only:not(.hidden) {
    display: block !important;
}

body.is-admin .admin-only-inline:not(.hidden) {
    display: inline-flex !important;
}

body.is-normal-user .admin-only,
body.is-normal-user .admin-only-inline {
    display: none !important;
}

.btn-primary { background-color: var(--brand-primary); color: white; }
.btn-primary:hover { background-color: #4f46e5; }

.btn-secondary { background-color: var(--brand-dark); color: white; }
.btn-secondary:hover { background-color: #27272a; }

/* Summary Grid */
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.stat-card { 
    background: var(--card-bg); 
    padding: 32px 24px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-main); 
    position: relative; 
    text-align: right; 
    box-shadow: var(--shadow-main);
}

.stat-badge { 
    position: absolute; 
    top: 20px; 
    right: 24px; 
    background-color: rgba(99, 102, 241, 0.08); 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    color: var(--brand-primary); 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value { 
    font-size: 3rem; 
    font-weight: 700; 
    margin-top: 20px; 
    color: var(--brand-dark);
    letter-spacing: -1px;
}

/* Chart Controls */
.chart-toggles { 
    display: flex; 
    gap: 24px; 
    margin-bottom: 20px; 
    font-weight: 600; 
    color: var(--brand-dark);
}

.dot { 
    display: inline-block; 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    margin-right: 6px; 
    vertical-align: middle;
}
.views-dot { background-color: var(--brand-primary); }
.clicks-dot { background-color: var(--brand-success); }
.revenue-dot { background-color: #f59e0b; }

/* Table */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { 
    padding: 16px; 
    text-align: left; 
    border-bottom: 1px solid var(--border-color); 
}
th { 
    color: var(--brand-gray); 
    font-weight: 600; 
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
td {
    font-weight: 500;
    color: var(--brand-dark);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: rgba(99, 102, 241, 0.02); }
.hidden { display: none !important; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 390px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-card h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -1px;
}

.login-subtitle {
    margin: 0 0 8px;
    color: var(--text-muted);
}

.error-text {
    min-height: 20px;
    color: #dc2626;
    font-weight: 600;
    margin: 0;
}

.status-text {
    min-height: 20px;
    color: var(--brand-primary);
    font-weight: 600;
    margin: 10px 0 0;
}

.logged-in-user {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-logout {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-logout:hover { background: rgba(255,255,255,0.14); }

.user-admin-panel h3 {
    margin: 0 0 6px;
}

.user-admin-panel p {
    color: var(--text-muted);
    margin: 0 0 16px;
}

.create-user-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.create-user-grid select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    color: var(--brand-dark);
    background: white;
}

.user-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.user-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    align-items: center;
}

.user-row span,
.user-row em {
    color: var(--text-muted);
    font-style: normal;
}

@media (max-width: 900px) {
    .top-navbar,
    .nav-actions,
    .admin-panel,
    .add-client-group,
    .add-record-group,
    .date-filter-panel,
    .custom-range {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .create-user-grid {
        grid-template-columns: 1fr;
    }

    .profile-banner h2 { font-size: 2rem; }
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-section h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.2px;
}

.panel-section p {
    margin: 0;
    color: var(--text-muted);
}

.client-edit-panel .edit-client-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 12px;
}

.btn-light {
    background: #f4f4f5;
    color: var(--brand-dark);
    border: 1px solid var(--border-color);
}

.btn-light:hover { background: #e4e4e7; }

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover { background: #b91c1c; }

.btn-small {
    padding: 7px 10px;
    font-size: 0.8rem;
    background: #f4f4f5;
    color: var(--brand-dark);
    border: 1px solid var(--border-color);
}

.btn-small:hover { background: #e4e4e7; }

.btn-danger-outline {
    color: #dc2626;
    background: #fff;
    border-color: rgba(220, 38, 38, 0.25);
}

.btn-danger-outline:hover {
    background: rgba(220, 38, 38, 0.08);
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.muted-small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .client-edit-panel .edit-client-grid {
        grid-template-columns: 1fr;
    }

    .row-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* CSV Import */
.csv-import-panel p {
    margin: 6px 0 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.csv-import-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 240px) auto auto;
    gap: 12px;
    align-items: center;
}

.csv-import-grid input[type="file"] {
    background: #fff;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--brand-gray);
    white-space: nowrap;
}

.checkbox-inline input {
    box-shadow: none;
}

@media (max-width: 900px) {
    .csv-import-grid {
        grid-template-columns: 1fr;
    }
}


/* Revenue Tools */
.revenue-tools-panel p {
    margin: 6px 0 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.revenue-tools-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
}

.sync-grid select,
.revenue-tools-grid select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    color: var(--brand-dark);
    background: white;
}

@media (max-width: 900px) {
    .revenue-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Website/Subdomain filtering and daily check-in */
.website-status-panel h3 {
    margin: 0 0 6px;
}

.status-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.status-panel-header p {
    margin: 0;
    color: var(--text-muted);
}

.status-legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
}

.website-status-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.website-group {
    border: 1px solid var(--website-border, var(--border-color));
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.website-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--website-bg, #fafafa);
    border-bottom: 1px solid var(--website-border, var(--border-color));
}

.website-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.website-title-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.website-sync-meta {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
    max-width: min(720px, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.website-group-header strong {
    color: var(--brand-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.website-group-header span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.website-visits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(79, 70, 229, 0.24);
    background: rgba(79, 70, 229, 0.10);
    color: #4f46e5 !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
}

.website-visits-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.website-revenue-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(113, 113, 122, 0.22);
    background: rgba(113, 113, 122, 0.08);
    color: var(--text-muted) !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
}

.website-revenue-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.website-revenue-badge.revenue-ok {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.12);
    color: #059669 !important;
}

.website-revenue-badge.revenue-partial {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309 !important;
}

.website-revenue-badge.revenue-missing {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309 !important;
}

.website-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1;
}

.btn-icon:hover:not(:disabled) {
    background: white;
    border-color: var(--brand-primary);
}

.btn-icon:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.website-color-mode {
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.82rem;
}

.website-color-picker {
    width: 36px;
    height: 32px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.website-client-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    padding: 12px;
}

.status-client-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.status-client {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px 10px;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--brand-dark);
    width: 100%;
    min-width: 0;
}

.status-client:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.05);
}

.btn-auto-sync {
    min-width: 118px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(113, 113, 122, 0.25);
    background: rgba(113, 113, 122, 0.10);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.btn-auto-sync.enabled {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.btn-auto-sync:hover {
    background: var(--brand-dark);
    color: #fff;
}

.btn-fast-update {
    align-self: stretch;
    min-width: 104px;
    padding: 8px 10px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.10);
    color: var(--brand-primary);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.btn-fast-update:hover:not(:disabled) {
    background: var(--brand-primary);
    color: #fff;
}

.btn-fast-update:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.status-client strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-client span:not(.status-dot) {
    font-size: 0.8rem;
    font-weight: 800;
}

.status-client em {
    grid-column: 2 / 4;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 600;
}

.visits-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 900;
    font-style: normal;
}

.visits-inline::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.visits-inline.visits-ok {
    color: #4f46e5;
}

.visits-inline.visits-missing {
    color: #b45309;
}

.revenue-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 900;
    font-style: normal;
}

.revenue-inline::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.revenue-inline.revenue-ok {
    color: #059669;
}

.revenue-inline.revenue-missing {
    color: #b45309;
}

.status-client.status-ok {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.04);
}

.status-client.status-missing {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.08);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.status-dot-ok { background: #10b981; }
.status-dot-missing { background: #f59e0b; }

@media (max-width: 900px) {
    .website-group-header,
    .website-title-block,
    .website-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .website-controls {
        justify-content: flex-start;
    }

    .website-sync-meta {
        white-space: normal;
        max-width: 100%;
    }

    .website-client-list {
        grid-template-columns: 1fr;
    }

    .status-client-row {
        grid-template-columns: 1fr;
    }

    .btn-auto-sync {
    min-width: 118px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(113, 113, 122, 0.25);
    background: rgba(113, 113, 122, 0.10);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.btn-auto-sync.enabled {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.btn-auto-sync:hover {
    background: var(--brand-dark);
    color: #fff;
}

.btn-fast-update {
        width: 100%;
    }
}

/* v16: keep the top bar stable when there are many clients/websites */
.top-navbar {
    gap: 16px;
}

.nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

#siteFilterSelect {
    width: 190px;
    max-width: 190px;
}

#clientSelect {
    width: 240px;
    max-width: 240px;
}

.logged-in-user {
    white-space: nowrap;
}


/* v17: make website separators visible in the client dropdown on Chrome/Windows */
.nav-actions select option,
.nav-actions select optgroup {
    background: #ffffff;
    color: var(--brand-dark);
}

.nav-actions select option.client-site-heading {
    color: var(--brand-primary);
    font-weight: 800;
}


.status-row-flash {
    animation: statusRowFlash 1.2s ease;
}

@keyframes statusRowFlash {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); transform: translateY(-1px); }
    45% { box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); transform: translateY(0); }
}

/* v20: floating back-to-writer arrow */
.floating-back-writer {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: var(--brand-primary);
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 35px rgba(99, 102, 241, 0.28);
    z-index: 9999;
    cursor: pointer;
}

.floating-back-writer:hover {
    background: #4f46e5;
    transform: translateY(-50%) scale(1.04);
}

.floating-back-writer:active {
    transform: translateY(-50%) scale(0.98);
}

.floating-back-writer.hidden {
    display: none !important;
}

@media (max-width: 700px) {
    .floating-back-writer {
        right: 14px;
        bottom: 18px;
        top: auto;
        transform: none;
        width: 48px;
        height: 48px;
    }

    .floating-back-writer:hover,
    .floating-back-writer:active {
        transform: none;
    }
}

/* WordPress Auto Sync */
.auto-sync-panel {
    border-color: rgba(99, 102, 241, 0.18);
}

.sync-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(220px, 1.4fr) minmax(180px, 1fr) 100px;
    gap: 12px;
    align-items: center;
}

.sync-grid input,
.sync-grid select {
    width: 100%;
    box-sizing: border-box;
}

.sync-grid .checkbox-inline {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sync-grid {
        grid-template-columns: 1fr;
    }
}

.sync-info-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  font-size: 14px;
}


.btn-revenue-quickfix {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.btn-revenue-quickfix:hover:not(:disabled) {
    background: #f59e0b;
    color: #fff;
}


.telegram-panel .telegram-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr) auto auto auto auto;
    gap: 10px;
    align-items: center;
}

.telegram-panel input {
    min-width: 0;
}

.status-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-telegram-mini {
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-weight: 900;
    white-space: nowrap;
}

.btn-telegram-mini:hover {
    background: #0ea5e9;
    color: #fff;
}

@media (max-width: 1100px) {
    .telegram-panel .telegram-grid {
        grid-template-columns: 1fr;
    }
}
