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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #e8f1f8;
    color: #050505;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: #e8f1f8;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* Header Section */
.header {
    background: white;
    padding: 16px 16px 12px;
}

.header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #525457;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

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

.settings-btn {
    background: white;
    border: 1px solid #dfe1e5;
    width: 45px;
    height: 45px;
    padding: 0;
}

.settings-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.account-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.account-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 4px;
}

.account-name {
    font-size: 24px;
    color: #1c1e21;
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
}

.account-dropdown svg {
    color: #1c1e21;
    flex-shrink: 0;
}

.payment-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    margin-top: 4px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #248b23;
    border-radius: 50%;
}

.status-text {
    color: #453e3e;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.notification-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.add-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #00796b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.add-btn:hover {
    background: #00695c;
}

.add-btn svg {
    width: 28px;
    height: 28px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    background: white;
    border: 1px solid #dfe1e5;
    border-radius: 5px;
padding: 7px 8px !important;
    cursor: pointer;
    font-size: 16px;
    color: #1c1e21;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: background-color 0.2s;
    font-weight: 400;
}

.filter-btn:hover {
    background-color: #f0f2f5;
}

.hamburger-btn {
    padding: 14px;
    min-width: 56px;
    border-radius: 5px;
}

.hamburger-btn svg {
    width: 22px;
    height: 22px;
}

.dropdown-btn svg {
    width: 18px;
    height: 18px;
}

.dropdown-btn {
    border-radius: 5px;
}

/* Spending Overview */
.spending-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 16px;
    background: white;
    margin: 8px 16px;
    gap: 8px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
}

.spending-left {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spending-label {
    font-size: 12px;
    color: #65676b;
    font-weight: 400;
    line-height: 1.3;
}

.spending-amount {
    font-size: 24px;
    font-weight: 500;
    color: #1c1e21;
    line-height: 1.2;
}

.spending-right {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-right: 32px;
}

.spending-limit-label {
    font-size: 12px;
    color: #65676b;
    font-weight: 400;
    line-height: 1.3;
}

.progress-bar-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e4e6eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #0a7cff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.arrow-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #65676b;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Campaigns Section */
.campaigns-section {
    padding: 20px 16px 16px;
    background: transparent;
    margin-top: 8px;
}

.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.campaigns-title {
    font-size: 24px;
    font-weight: 700;
    color: #050505;
}

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

.search-icon-btn,
.grid-icon-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #1c1e21;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.grid-btn svg {
    width: 26px;
    height: 26px;
}

/* Campaign Cards */
.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campaign-card {
    background: white;
    border-radius: 5px;
    box-shadow:0 4px 5px rgba(0, 0, 0, 0.14), 0 1px 2px rgba(0, 0, 0, 0.010);
    border: none;
}

.campaign-content {
    padding: 14px 16px;
}

.campaign-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.campaign-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 5px;
    overflow: visible;
    flex-shrink: 0;
    background: #f0f2f5;
    position: relative;
}

.campaign-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.status-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 9px 0px 0px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #d0d3d6;
    border-radius: 50%;
}

.status-badge.active::before {
    background: #00a82d;
}

.status-badge.inactive::before {
    background: #d0d3d6;
}

.campaign-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.campaign-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.campaign-title-text {
    flex: 1;
    font-size: 16px;
    color: #1c1e21;
    min-width: 0;
    line-height: 1.3;
}

.post-label {
    color: #65676b;
    font-weight: 400;
}

.post-title {
    color: #1c1e21;
    font-weight: 600;
}

.more-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1c1e21;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: -4px;
}

.more-btn svg {
    width: 20px;
    height: 20px;
}

.campaign-status {
    font-size: 13px;
    color: #65676b;
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding-bottom: 4px;
}

.metric-item {
    padding: 14px 12px 10px;
    border-right: 1px solid #e4e6eb;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-item:first-child {
    padding-left: 16px;
}

.metric-item:last-child {
    border-right: none;
    padding-right: 16px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.3;
}

.metric-label {
    font-size: 12px;
    color: #65676b;
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccd0d5;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0a7cff;
}

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

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 100%;
    display: flex;
    justify-content: space-around;
    background: white;
    border-top: 1px solid #e4e6eb;
    padding: 8px 0;
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: #414141;
    cursor: pointer;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.nav-btn svg {
    width: 30px;
    height: 30px;
}

.nav-btn.active {
    color: #515151;
}

.nav-btn.active svg {
    fill: #515151;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-container {
        max-width: 100%;
    }
    
    .spending-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .spending-right {
        width: 100%;
    }
    
    .bottom-nav {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .spending-amount {
        font-size: 20px;
    }
    
    .campaigns-title {
        font-size: 20px;
    }
    
    .campaign-metrics {
        gap: 12px;
    }
}

/* Account Selection Popup */
.account-selection-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f6f7;
    z-index: 1000;
    overflow-y: auto;
}

.account-selection-popup.active {
    display: block;
}

.account-popup-header {
    background: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e4e6eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.popup-close-btn,
.popup-settings-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.popup-close-btn:hover,
.popup-settings-btn:hover {
    background-color: #f0f2f5;
}

.popup-title {
    font-size: 20px;
    font-weight: 600;
    color: #050505;
    margin: 0;
}

.account-popup-search {
    background: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e4e6eb;
    position: sticky;
    top: 57px;
    z-index: 9;
}

.account-popup-search svg {
    color: #65676b;
    flex-shrink: 0;
}

.account-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: #050505;
    background: transparent;
}

.account-search-input::placeholder {
    color: #65676b;
}

.account-popup-list {
    padding: 8px 0;
}

.account-item {
    background: white;
    padding: 16px;
    margin: 0 0 1px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    width: 100%;
    text-align: left;
}

.account-item:hover {
    background-color: #f5f6f7;
}

.account-item.selected {
    background-color: #e7f3ff;
}

.account-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ccd0d5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.account-item.selected .account-radio {
    border-color: #0a7cff;
}

.account-radio-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0a7cff;
    display: none;
}

.account-item.selected .account-radio-inner {
    display: block;
}

.account-item-info {
    flex: 1;
    min-width: 0;
}

.account-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 4px;
}

.account-item-details {
    font-size: 14px;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.account-item-id {
    color: #65676b;
}

.account-item-currency {
    color: #65676b;
}

.account-item-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.account-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.account-status-dot.red {
    background: #d32f2f;
}

.account-status-dot.green {
    background: #00a82d;
}

.account-status-dot.grey {
    background: #65676b;
}

.account-status-text {
    color: inherit;
}

.account-status-text.red {
    color: #d32f2f;
}

.account-status-text.green {
    color: #00a82d;
}

.account-status-text.grey {
    color: #65676b;
}

.account-item-action {
    padding: 8px 16px;
    background: #e4e6eb;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #050505;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-item-action:hover {
    background-color: #d8dadf;
}

.account-item-action svg {
    width: 16px;
    height: 16px;
}

