/* ═══════════════════════════════════════════════════════
   Astro Near You - Astrologer Portal Custom CSS
   Mobile-first, high contrast, large touch targets
   ═══════════════════════════════════════════════════════ */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary: #6c3fc5;
    --secondary-dark: #5a33a8;
    --success-green: #28a745;
    --online-green: #00c853;
    --busy-yellow: #ffc107;
    --offline-red: #dc3545;
    --bg-light: #f8f5ff;
    --card-bg: #ffffff;
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
}

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    color: var(--text-dark);
}

.text-primary { color: var(--primary) !important; }
.text-secondary-custom { color: var(--secondary) !important; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: #ffd700;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.2s;
    border: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.15rem;
    border-radius: var(--radius);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

.btn-secondary-custom {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary-custom:hover {
    background: var(--secondary-dark);
    color: #fff;
}

.btn-success {
    background: var(--success-green);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-chat {
    background: #25d366;
    color: #fff;
}

.btn-chat:hover {
    background: #1da851;
    color: #fff;
}

.btn-call {
    background: var(--primary);
    color: #fff;
}

.btn-call:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ─── Cards ──────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-body {
    padding: 20px;
}

/* ─── Astrologer Card ────────────────────────────────── */
.astrologer-card {
    text-align: center;
    position: relative;
}

.astrologer-card .avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.astrologer-card .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.status-dot.online { background: var(--online-green); }
.status-dot.busy { background: var(--busy-yellow); }
.status-dot.offline { background: var(--offline-red); }

.astrologer-card h5 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.astrologer-card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.astrologer-card .price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.astrologer-card .rating {
    color: #ffc107;
    font-size: 0.95rem;
}

.astrologer-card .btn-group-custom {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.astrologer-card .btn-group-custom .btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* ─── Hero Section ───────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,53,0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.15rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* ─── Service Buttons (Home) ─────────────────────────── */
.service-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-dark);
    min-height: 120px;
    justify-content: center;
}

.service-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--text-dark);
}

.service-btn .icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.service-btn .label {
    font-weight: 700;
    font-size: 1rem;
}

/* ─── Status Badge ───────────────────────────────────── */
.badge-status {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ─── Chat UI ────────────────────────────────────────── */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ece5dd;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.message-bubble .time {
    font-size: 0.7rem;
    color: rgba(0,0,0,0.4);
    margin-top: 4px;
    text-align: right;
}

.message-sent {
    background: #dcf8c6;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-received {
    background: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f0f0;
    border-top: 1px solid var(--border-color);
}

.chat-input-area input {
    flex: 1;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 1rem;
    background: #fff;
    outline: none;
}

.chat-input-area .btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── Call UI ────────────────────────────────────────── */
.call-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius);
    color: #fff;
    padding: 40px;
}

.call-container .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    margin-bottom: 20px;
}

.call-timer {
    font-size: 3rem;
    font-weight: 300;
    margin: 20px 0;
    font-variant-numeric: tabular-nums;
}

.call-status {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.btn-end-call {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-end-call:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ─── Dashboard Stat Card ────────────────────────────── */
.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 800;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stat-card.bg-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card.bg-gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card.bg-gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card.bg-gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stat-card.bg-gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-card.bg-gradient-6 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

/* ─── Wallet ─────────────────────────────────────────── */
.wallet-card {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
}

.wallet-card .balance {
    font-size: 2.5rem;
    font-weight: 800;
}

.wallet-card .balance-label {
    font-size: 1rem;
    opacity: 0.85;
}

.recharge-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.recharge-amounts .btn {
    border-radius: 12px;
    padding: 12px 8px;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 80px;
}

/* ─── Toggle Switch ──────────────────────────────────── */
.online-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.online-toggle .form-check-input {
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.online-toggle .form-check-input:checked {
    background-color: var(--online-green);
    border-color: var(--online-green);
}

/* ─── Section Headers ────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

/* ─── Filter Bar ─────────────────────────────────────── */
.filter-bar {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.filter-bar select, .filter-bar input {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    font-size: 0.95rem;
}

/* ─── Table ──────────────────────────────────────────── */
.table {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.table td {
    vertical-align: middle;
    font-size: 0.95rem;
}

/* ─── Admin Sidebar ──────────────────────────────────── */
.admin-sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px 0;
    color: #fff;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 12px 24px !important;
    font-size: 0.95rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

.admin-sidebar .sidebar-brand {
    padding: 0 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

/* ─── Registration Steps ─────────────────────────────── */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s;
}

.step-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.step-dot.completed {
    background: var(--success-green);
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* ─── Review Stars ───────────────────────────────────── */
.star-rating {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.star-rating .star {
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--border-color);
    transition: all 0.2s;
}

.star-rating .star.active,
.star-rating .star:hover {
    color: #ffc107;
    transform: scale(1.1);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .wallet-card .balance {
        font-size: 2rem;
    }

    .call-timer {
        font-size: 2.5rem;
    }

    .astrologer-card .avatar {
        width: 70px;
        height: 70px;
    }

    .btn {
        padding: 10px 20px;
    }

    .stat-card .number {
        font-size: 1.5rem;
    }

    .chat-container {
        border-radius: 0;
        height: calc(100vh - 60px);
    }
}

/* ─── Alerts ─────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 500;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 40px 0 20px;
    margin-top: 0;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary);
}

/* ─── Empty State ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* ─── Animations ─────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.4s ease-in;
}

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

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ─── Pagination Fix ────────────────────────────────────── */
nav[role="navigation"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

nav[role="navigation"] svg {
    width: 20px;
    height: 20px;
}

nav[role="navigation"] > div:first-child {
    order: 2;
}

nav[role="navigation"] > div:last-child {
    order: 1;
}

nav[role="navigation"] > div:last-child > div:first-child {
    display: none;
}

nav[role="navigation"] span[aria-current="page"] > span {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 8px 14px;
}

nav[role="navigation"] a {
    border-radius: 8px !important;
    padding: 8px 14px;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    display: inline-block;
}

nav[role="navigation"] a:hover {
    background: var(--primary);
    color: #fff;
}
