:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0a192f;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #e2e8f0;
    --border: #cbd5e1;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* --- DRM OVERLAY --- */
.drm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.drm-modal {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.drm-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.drm-modal h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.drm-modal p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.price-tag {
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    color: var(--primary);
}
.price-tag .currency { font-weight: 600; font-size: 1.2rem; }
.price-tag .amount { font-weight: 800; font-size: 2.5rem; margin-right: 10px; }
.price-tag .period { font-size: 0.9rem; font-weight: 500; color: #3b82f6; text-transform: uppercase;}

.drm-instructions {
    text-align: left;
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.device-id-box {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    margin-bottom: 25px;
    border: 1px dashed var(--border);
}

.device-id-box span {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-primary:hover { background: var(--primary-hover); }

.wave-btn {
    background: #00c3ff; /* Wave Color approx */
    color: white;
}
.wave-btn:hover { background: #00a4d6; }

.pin-entry {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.pin-entry input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.pin-entry input:focus { border-color: var(--primary); }

.btn-secondary {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-secondary:hover { background: #0f172a; }

.error-msg {
    color: #ef4444 !important;
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 500;
}

/* --- MAIN APP --- */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.main-header {
    text-align: center;
    padding: 20px 0 40px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

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

.header-flyer img {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Search bar */
.search-bar {
    position: relative;
    margin-bottom: 30px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    box-shadow: var(--shadow);
}
.search-bar input:focus { border-color: var(--primary); }

/* Upsell Banner */
.upsell-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 20px 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
    gap: 20px;
    flex-wrap: wrap;
}

.upsell-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-content p {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.btn-upsell {
    background: #fbbf24;
    color: #78350f;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-upsell:hover {
    background: #f59e0b;
}

/* Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-color: #93c5fd;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge {
    background: #ecfdf5;
    color: var(--success);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card-meta i {
    width: 20px;
    color: var(--primary);
}

.card-action {
    margin-top: auto;
    width: 100%;
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.card-action:hover { background: var(--primary-hover); }
.card-action.tel { background: #10b981; }
.card-action.tel:hover { background: #059669; }

/* Ecosystem Promo */
.ecosystem-promo {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px dashed var(--border);
    text-align: center;
}

.ecosystem-promo h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.ecosystem-promo > p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    text-align: left;
}

.promo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.promo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-color: var(--primary);
}

.promo-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.promo-content h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

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

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}
