:root {
    --primary: #b0190e;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --bg: #f3f4f6;
    --white: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-main);
}

/* --- HEADER & NAVIGATION --- */
.top-nav {
    background: var(--white);
    height: 60px;
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    z-index: 1000;
}

.nav-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
}

.logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    transition: 0.3s;
    padding: 25px 20px;
}

    .drawer.open {
        left: 0;
    }

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
}

.menu-item {
    padding: 16px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

/* --- CONTENT VIEWS --- */
.main-view {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.step {
    display: none;
}

    .step.active {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CART & FORM ELEMENTS --- */
input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
}

.btn-main {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.freq-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 15px 0;
}

.freq-card {
    border: 1.5px solid var(--border);
    padding: 12px 5px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

    .freq-card.selected {
        border-color: var(--primary);
        background: #eff6ff;
        color: var(--primary);
    }

.day-picker {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.day-circle {
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

    .day-circle.selected {
        background: var(--primary);
        color: white;
    }

/* --- SUBSCRIPTION DETAIL & TRACKER --- */
.sub-card {
    border-left: 5px solid var(--primary);
    cursor: pointer;
    position: relative;
}

.detail-view {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}

    .detail-view.open {
        display: block;
    }

.tracker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 10px 0;
}

.dot {
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

    .dot.done {
        background: #dcfce7;
        color: #15803d;
        border: 1px solid #bbf7d0;
    }

    .dot.miss {
        background: #f3f4f6;
        color: #9ca3af;
        border: 1px solid var(--border);
    }

.revenue-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
}

.badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active {
    background: #dcfce7;
    color: #15803d;
}
.ml_logo {
    -ms-align-content: inherit;
    -webkit-align-content: inherit;
    align-content: center;
    width: auto;
    height: 150px;
}
.favicon {
    width: 20px;
    max-width: 20px;
    padding-right:5px;
}

