/* ----------------------------------------------------
 * KOPERASI DIGITAL MERAH PUTIH 2026 - DESIGN SYSTEM
 * ---------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Colors as requested */
    --primary: #E11D48;      /* Rose Red */
    --primary-glow: rgba(225, 29, 72, 0.25);
    --secondary: #DC2626;    /* Red Accent */
    --dark: #1E293B;         /* Slate Dark */
    --light: #F8FAFC;        /* Slate Light */

    /* Dashboard UI Elements */
    --bg-main: #0B0F19;      /* Dark Deep Space background */
    --bg-surface: rgba(30, 41, 59, 0.65); /* Glassmorphism */
    --bg-surface-solid: #151F32;
    --bg-card: rgba(51, 65, 85, 0.35);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(225, 29, 72, 0.15);

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.8);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    background-image: 
        radial-gradient(at 5% 5%, rgba(225, 29, 72, 0.15) 0px, transparent 50%),
        radial-gradient(at 95% 85%, rgba(220, 38, 38, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Application Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-surface-solid);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
}

.logo-text span {
    font-size: 0.65rem;
    color: #FCA5A5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 1.25rem 0 0.5rem 0;
    font-weight: 700;
}

/* Menu items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.2rem;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.15), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(225, 29, 72, 0.25);
    box-shadow: inset 0 0 12px rgba(225, 29, 72, 0.05);
}

.menu-item .material-symbols-outlined {
    font-size: 1.2rem;
}

.role-badge {
    margin-left: auto;
    font-size: 0.6rem;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: 100%;
}

.content-panel {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 4px 12px var(--primary-glow); }
.stat-icon.accent { background: linear-gradient(135deg, #475569, #1E293B); box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3); }
.stat-icon.success { background: linear-gradient(135deg, #10B981, #047857); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.stat-icon.warning { background: linear-gradient(135deg, #F59E0B, #B45309); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.75rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge.aktif, .badge.approved { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge.nonaktif, .badge.rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge.lvl1 { background: rgba(225, 29, 72, 0.15); color: var(--primary); border: 1px solid rgba(225, 29, 72, 0.2); }

/* Forms & Buttons */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.4);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, #334155, #1E293B);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-accent:hover {
    background: #1E293B;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    border-radius: 6px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* Developer Console logs */
.console-log {
    background: #070a13;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: #F87171;
    height: 150px;
    overflow-y: auto;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* SMARTPHONE SIMULATOR */
.simulator-panel {
    width: 420px;
    border-left: 1px solid var(--border-color);
    background: #090d16;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Smartphone frame mock */
.smartphone-frame {
    width: 350px;
    height: 700px;
    background: #000;
    border-radius: 40px;
    border: 12px solid #1e293b;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.9),
        0 0 0 2px rgba(255,255,255,0.05),
        0 0 20px var(--primary-glow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Phone notch/island */
.smartphone-frame::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 22px;
    background: #000;
    border-radius: 15px;
    z-index: 100;
}

/* Phone inner screen */
.phone-screen {
    flex: 1;
    background: #F8FAFC; /* Clean Light mode internally for customer shopping app */
    color: #1E293B;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Status Bar */
.phone-status-bar {
    height: 38px;
    background: var(--primary); /* National Red */
    padding: 14px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 90;
}

.status-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Phone Header */
.phone-header {
    background: var(--primary);
    padding: 0.5rem 0.85rem 0.85rem 0.85rem;
    color: white;
    z-index: 80;
}

.search-bar-row {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    gap: 0.4rem;
}

.search-bar-row input {
    border: none;
    outline: none;
    font-size: 0.75rem;
    width: 100%;
    color: #334155;
}

.search-bar-row .material-symbols-outlined {
    color: #94A3B8;
    font-size: 1rem;
}

.cart-icon-btn {
    color: white;
    margin-left: 0.5rem;
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Mobile Scroll Body */
.phone-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 60px;
}

/* National Banner */
.banner-slider {
    height: 105px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin: 0.75rem;
    border-radius: 12px;
    color: white;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.banner-slider h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
}

.banner-slider p {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* Phone Section Titles */
.phone-sec-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.75rem;
    margin: 0.85rem 0 0.4rem 0;
}

.phone-sec-title h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1E293B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phone-sec-title a {
    font-size: 0.65rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Scroll row of items */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 0.75rem;
    gap: 0.65rem;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* Mobile Product Cards */
.mini-product-card {
    min-width: 110px;
    max-width: 110px;
    background: white;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.mini-product-card:hover {
    transform: translateY(-2px);
}

.mini-img-box {
    height: 80px;
    width: 100%;
    background-size: cover;
    background-position: center;
}

.mini-details {
    padding: 0.4rem;
}

.mini-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-price {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 1px;
}

/* Phone bottom nav bar */
.phone-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: white;
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 95;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748B;
    cursor: pointer;
    font-size: 0.55rem;
    font-weight: 500;
    flex: 1;
    padding: 4px 0;
    transition: var(--transition);
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab .material-symbols-outlined {
    font-size: 1.15rem;
    margin-bottom: 1px;
}

/* Grid Layout for Cooperatives / Stores Selector */
.coop-grid-phone {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
}

.coop-card-phone {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.coop-card-phone:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.coop-logo-phone {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid #F1F5F9;
    flex-shrink: 0;
}

.coop-info-phone {
    flex: 1;
}

.coop-name-phone {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.3;
}

.coop-loc-phone {
    font-size: 0.6rem;
    color: #64748B;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Category Slider inside Store View */
.cat-slider-phone {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    scrollbar-width: none;
    background: white;
    border-bottom: 1px solid #E2E8F0;
}

.cat-slider-phone::-webkit-scrollbar {
    display: none;
}

.cat-pill-phone {
    padding: 4px 12px;
    background: #F1F5F9;
    color: #475569;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
}

.cat-pill-phone.active {
    background: var(--primary);
    color: white;
}

/* Product list inside Store View */
.prod-grid-phone {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    padding: 0.75rem;
}

.phone-prod-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.phone-prod-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
}

.phone-prod-img {
    height: 100px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.phone-prod-rating {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.65);
    color: #FBBF24;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.phone-prod-details {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.phone-prod-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.phone-prod-price {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Detail Store Header */
.store-header-phone {
    background: white;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #E2E8F0;
}

.store-logo-phone {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid #E2E8F0;
}

.store-name-phone {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1E293B;
}

.store-meta-phone {
    font-size: 0.6rem;
    color: #64748B;
    margin-top: 2px;
}

/* Cart Items & Lists */
.cart-item-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    padding: 0.6rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin: 0.5rem 0.75rem;
}

.cart-item-img {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155;
}

.cart-item-price {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 2px;
}

.cart-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

/* visual timeline tracking stepper */
.timeline-stepper {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    margin: 0.75rem;
}

.timeline-step {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-step::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: #E2E8F0;
}

.timeline-step:last-child::after {
    display: none;
}

.timeline-step.active::after {
    background: var(--primary);
}

.timeline-bullet {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #E2E8F0;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #CBD5E1;
    z-index: 10;
    flex-shrink: 0;
}

.timeline-step.active .timeline-bullet {
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.timeline-info h4 {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
}

.timeline-step.active .timeline-info h4 {
    color: var(--primary);
}

.timeline-info p {
    font-size: 0.6rem;
    color: #94A3B8;
    margin-top: 2px;
}

/* QRIS Payment screen mock */
.qris-box {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #E2E8F0;
    margin: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.qris-code {
    width: 150px;
    height: 150px;
    background: url('https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=KopDigiMerahPutihPayment') no-repeat center;
    background-size: contain;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
}

/* Dashboard sidebar separator line */
.sidebar-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 1rem 0;
}

/* Glasscard pulse animation for active elements */
@keyframes pulseGlow {
    0%, 100% { border-color: rgba(225, 29, 72, 0.25); box-shadow: 0 4px 20px rgba(225, 29, 72, 0.1); }
    50% { border-color: rgba(225, 29, 72, 0.6); box-shadow: 0 4px 20px rgba(225, 29, 72, 0.25); }
}

.pulse-card {
    animation: pulseGlow 3s infinite ease-in-out;
}
