/* MrPulz Owner Dashboard */

/* Auth screens */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: 24px;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 48px;
    width: 100%;
    max-width: 440px;
}
.auth-card .logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    text-align: center;
    margin-bottom: 8px;
}
.auth-card .logo span { color: var(--cyan); }
.auth-card .subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 32px;
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
}
.auth-divider {
    text-align: center;
    margin: 24px 0;
    color: var(--gray-400);
    font-size: 0.85rem;
}
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--gray-500);
}
.auth-switch a { font-weight: 600; }

/* Dashboard Layout */
.dash-layout {
    min-height: 100vh;
}

/* Sidebar */
.dash-sidebar {
    background: var(--navy);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    overflow-y: auto;
    z-index: 100;
}
.dash-sidebar .logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    padding: 0 24px;
    margin-bottom: 32px;
}
.dash-sidebar .logo span { color: var(--cyan); }

.dash-nav { flex: 1; }
.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.dash-nav-item:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.04);
}
.dash-nav-item.active {
    color: var(--white);
    background: rgba(37,99,235,0.15);
    border-left-color: var(--blue);
}
.dash-nav-item .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.dash-nav-section {
    padding: 0 24px;
    margin: 20px 0 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.25);
    font-weight: 600;
}

.dash-user {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}
.dash-user-info .name { color: var(--white); font-size: 0.85rem; font-weight: 600; }
.dash-user-info .email { color: rgba(255,255,255,0.4); font-size: 0.75rem; }

/* Main content */
.dash-main {
    margin-left: 260px;
    padding: 32px;
    background: var(--gray-50);
    min-height: 100vh;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.dash-header h1 { font-size: 1.75rem; letter-spacing: -0.5px; }
.dash-header .trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16,185,129,0.1);
    color: var(--green);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.dash-header .trial-badge.expired {
    background: rgba(239,68,68,0.1);
    color: var(--red);
}

/* Stats cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.dash-stat {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--gray-200);
}
.dash-stat .label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.dash-stat .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
}
.dash-stat .sub {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Cards */
.dash-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 24px;
    margin-bottom: 24px;
}
.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dash-card-header h3 { font-size: 1.1rem; }

/* Store cards */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.store-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
}
.store-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
}
.store-card .store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.store-card .store-name { font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.store-card .store-type {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: capitalize;
}
.type-retail { background: rgba(37,99,235,0.1); color: var(--blue); }
.type-auto_shop { background: rgba(245,158,11,0.1); color: var(--orange); }
.type-restaurant { background: rgba(139,92,246,0.1); color: #8B5CF6; }

.store-card .store-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.store-card .feature-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    color: var(--gray-600);
}
.store-card .store-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}
.store-card .store-cost {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
}
.store-card .store-cost span { font-size: 0.8rem; font-weight: 500; color: var(--gray-400); }
.store-card .store-actions { display: flex; gap: 8px; }
.store-card .store-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    transition: all 0.15s ease;
}
.store-card .store-actions button:hover {
    border-color: var(--blue);
    color: var(--blue);
}
.store-card .store-actions button.delete:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Add store card */
.add-store-card {
    border: 2px dashed var(--gray-300);
    background: transparent;
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 200px;
}
.add-store-card:hover {
    border-color: var(--blue);
    background: rgba(37,99,235,0.02);
}
.add-store-card .plus {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(37,99,235,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--blue);
    margin-bottom: 12px;
}
.add-store-card .label { color: var(--gray-500); font-size: 0.95rem; font-weight: 500; }

/* Billing table */
.billing-table { width: 100%; border-collapse: collapse; }
.billing-table th {
    text-align: left;
    padding: 12px 0;
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
}
.billing-table td {
    padding: 14px 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}
.billing-table .status-paid {
    color: var(--green);
    font-weight: 600;
    font-size: 0.8rem;
}
.billing-table .status-pending {
    color: var(--orange);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal h3 { margin-bottom: 20px; }
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Feature picker */
.feature-picker { display: grid; gap: 8px; }
.feature-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}
.feature-pick:hover { border-color: var(--gray-300); }
.feature-pick.selected {
    border-color: var(--blue);
    background: rgba(37,99,235,0.03);
}
.feature-pick .f-name { font-size: 0.9rem; font-weight: 500; color: var(--navy); flex: 1; }
.feature-pick .f-price { font-size: 0.85rem; font-weight: 600; color: var(--gray-500); }
.feature-pick.included .f-price { color: var(--green); }
.f-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-400);
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    margin: 0 4px;
}
.f-info-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(37,99,235,0.05);
}
.feature-pick.recommended {
    border-color: rgba(37,99,235,0.3);
    background: rgba(37,99,235,0.02);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--gray-400);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--gray-500); margin-bottom: 8px; }

/* Mobile */
.dash-mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--navy);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}
.dash-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-main { margin-left: 0; padding: 16px; padding-top: 64px; }
    .dash-mobile-toggle { display: block; }
    .store-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 24px; }
}

/* Notifications / alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.alert-info { background: rgba(37,99,235,0.1); color: var(--blue); border: 1px solid rgba(37,99,235,0.2); }

/* Mini action buttons on store cards */
.store-actions-mini { display: flex; gap: 4px; }
.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-500);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}
.action-btn:hover { border-color: var(--blue); color: var(--blue); }
.action-btn.delete:hover { border-color: var(--red); color: var(--red); }

/* Store card clickable state */
.store-card { transition: all 0.15s ease; }
.store-card:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(37,99,235,0.1); }

/* User list */
.user-list { display: grid; gap: 8px; }
.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}
.user-row:hover { border-color: var(--gray-300); background: var(--gray-50); }
.user-row-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.user-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #8B5CF6);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
