/* =============================================
   GRAM SAHAYTA — Design System
   Village Problem Reporting Platform
   Mobile-First, Layman-Friendly UI
   ============================================= */

/* --- CSS Variables --- */
:root {
    /* Primary - Earth Green */
    --primary: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --primary-glow: rgba(46, 125, 50, 0.3);

    /* Accent - Warm Orange */
    --accent: #e65100;
    --accent-light: #ff6d00;
    --accent-soft: rgba(230, 81, 0, 0.1);

    /* Surface Colors */
    --bg: #f5f0e8;
    --bg-card: #ffffff;
    --bg-card-hover: #fafaf5;
    --bg-input: #faf8f4;
    --bg-overlay: rgba(0,0,0,0.5);

    /* Text */
    --text: #1a1a1a;
    --text-secondary: #5d5347;
    --text-muted: #8c7e72;
    --text-on-primary: #ffffff;

    /* Status */
    --success: #2e7d32;
    --warning: #e65100;
    --error: #c62828;
    --info: #1565c0;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.15);

    /* Font */
    --font-hindi: 'Noto Sans Devanagari', 'Inter', sans-serif;
    --font-english: 'Inter', 'Noto Sans Devanagari', sans-serif;

    /* Bottom nav height */
    --nav-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-hindi);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }

/* =============================================
   LANDING / LOGIN PAGE
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #43a047 100%);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
    animation: loginFloat 15s ease-in-out infinite;
}

@keyframes loginFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: cardSlideUp 0.6s ease-out;
}

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

.login-logo {
    font-size: 3.5rem;
    margin-bottom: var(--space-sm);
    animation: logoPulse 2s ease-in-out infinite;
}

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

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--space-xs);
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    padding: 16px 24px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-hindi);
    text-decoration: none;
}

.google-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.google-btn:active {
    transform: translateY(0);
}

.google-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.login-features {
    margin-top: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.login-feature {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
}

.login-feature-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.login-feature-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.login-footer {
    margin-top: var(--space-xl);
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.login-footer a {
    color: rgba(255,255,255,0.95);
    text-decoration: underline;
}

/* =============================================
   DASHBOARD & PAGES
   ============================================= */
.page {
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 20px);
    background: var(--bg);
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.top-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-full);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.header-greeting {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-name {
    font-size: 1.35rem;
    font-weight: 700;
}

.header-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover;
}

.header-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 2px solid rgba(255,255,255,0.4);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
    margin-top: -20px;
    position: relative;
    z-index: 2;
}

.quick-action-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quick-action-card:active {
    transform: translateY(-1px);
}

.quick-action-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.quick-action-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.quick-action-sublabel {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Section */
.section {
    padding: var(--space-md) var(--space-lg);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* =============================================
   POST CARDS
   ============================================= */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: block;
}

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

.post-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg);
}

.post-card-body {
    padding: var(--space-md);
}

.post-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md) 0;
}

.post-card-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.post-card-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* =============================================
   FORMS
   ============================================= */
.form-page {
    padding: var(--space-lg);
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.page-title .back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.form-label-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-hindi);
    color: var(--text);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Image Upload */
.image-upload {
    position: relative;
    border: 2px dashed #c5bfb6;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-input);
}

.image-upload:hover {
    border-color: var(--primary);
    background: rgba(46,125,50,0.03);
}

.image-upload.has-image {
    padding: 0;
    border-style: solid;
    border-color: var(--primary);
}

.image-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.image-upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.image-upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.image-upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.image-preview {
    width: 100%;
    border-radius: var(--radius-lg);
    max-height: 250px;
    object-fit: cover;
}

/* Location Button */
.location-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-hindi);
    transition: all 0.3s ease;
    margin-top: var(--space-sm);
    width: 100%;
    justify-content: center;
}

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

.location-btn:active {
    transform: translateY(0);
}

.location-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.location-info {
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(46,125,50,0.08);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--primary-dark);
    display: none;
}

.location-info.show {
    display: block;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-hindi);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: var(--space-md);
}

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

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =============================================
   VIEW POST DETAIL
   ============================================= */
.post-detail {
    padding: var(--space-lg);
}

.post-detail-image {
    width: 100%;
    border-radius: var(--radius-lg);
    max-height: 300px;
    object-fit: cover;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.post-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.post-detail-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.post-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.post-detail-info-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.post-detail-info-row .icon {
    font-size: 1.1rem;
}

.map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    background: linear-gradient(135deg, #1565c0, #1976d2);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-hindi);
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: var(--space-lg);
}

.map-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Updates Timeline */
.updates-section {
    margin-top: var(--space-lg);
}

.updates-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.update-card {
    background: var(--bg-card);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.update-card-message {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.update-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    margin: var(--space-lg);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-md);
    border: 3px solid var(--primary);
    object-fit: cover;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--bg);
}

.profile-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.logout-btn {
    display: block;
    width: calc(100% - 48px);
    margin: var(--space-lg) auto;
    padding: 14px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-hindi);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    color: white;
}

/* =============================================
   BOTTOM NAVIGATION
   ============================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
    z-index: 100;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.3s ease;
    position: relative;
    min-width: 50px;
}

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

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 3px;
}

.bottom-nav-label {
    white-space: nowrap;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: rgba(230,81,0,0.1);
    color: var(--warning);
}

.badge-published {
    background: rgba(46,125,50,0.1);
    color: var(--success);
}

.badge-rejected {
    background: rgba(198,40,40,0.1);
    color: var(--error);
}

.badge-banned {
    background: rgba(198,40,40,0.1);
    color: var(--error);
}

.badge-active {
    background: rgba(46,125,50,0.1);
    color: var(--success);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-hindi);
    z-index: 10000;
    transition: transform 0.3s ease;
    max-width: 90vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: var(--success);
    color: white;
}

.toast-error {
    background: var(--error);
    color: white;
}

.toast-info {
    background: var(--info);
    color: white;
}

.toast-warning {
    background: var(--warning);
    color: white;
}

/* =============================================
   PWA FLOATING INSTALL BUTTON
   ============================================= */
.pwa-install-btn {
    position: fixed;
    bottom: 90px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(230,81,0,0.4);
    cursor: pointer;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    animation: installPulse 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.pwa-install-btn:hover {
    transform: scale(1.1);
}

.pwa-install-btn.show {
    display: flex;
}

@keyframes installPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(230,81,0,0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(230,81,0,0.6), 0 0 0 8px rgba(230,81,0,0.1);
    }
}

.pwa-install-tooltip {
    position: fixed;
    bottom: 155px;
    right: 16px;
    background: var(--text);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 200;
    display: none;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.pwa-install-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: var(--text);
    transform: rotate(45deg);
}

.pwa-install-tooltip.show {
    display: block;
    animation: tooltipFade 0.3s ease-out;
}

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

/* iOS Install Instructions */
.ios-install-modal {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.ios-install-modal.show {
    display: flex;
}

.ios-install-content {
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ios-install-content h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.ios-install-steps {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.ios-install-close {
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-hindi);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.empty-state-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* =============================================
   ADMIN PANEL
   ============================================= */

/* Admin uses a different color scheme */
.admin-page {
    min-height: 100vh;
    background: #0f1117;
    color: #e0e0e0;
    font-family: var(--font-english);
}

/* Admin Login */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 100%);
    padding: var(--space-lg);
}

.admin-login-card {
    background: rgba(26,29,46,0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.admin-login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-xs);
}

.admin-login-card p {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
}

.admin-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: #ffffff;
    font-family: var(--font-english);
    outline: none;
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.admin-input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.2);
}

.admin-input::placeholder {
    color: #5a6178;
}

.admin-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6c63ff, #4f46e5);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-english);
    transition: all 0.3s ease;
    margin-top: var(--space-sm);
}

.admin-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,99,255,0.3);
}

/* Admin Top Bar */
.admin-topbar {
    background: rgba(15,17,23,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-topbar-link {
    color: #8892b0;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.admin-topbar-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
}

.admin-topbar-link.active {
    color: #6c63ff;
    background: rgba(108,99,255,0.1);
}

.admin-topbar-logout {
    color: #ef4444;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.admin-topbar-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
}

.admin-stat-card {
    background: rgba(26,29,46,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    border-color: rgba(108,99,255,0.3);
    transform: translateY(-2px);
}

.admin-stat-icon {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: #8892b0;
    margin-top: 2px;
}

/* Admin Content */
.admin-content {
    padding: var(--space-lg);
}

.admin-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Admin Table */
.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(26,29,46,0.6);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    padding: 14px 16px;
    text-align: left;
    color: #8892b0;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #c9d1d9;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.admin-table .user-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-table .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* Admin Buttons */
.admin-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-english);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.admin-btn-primary {
    background: rgba(108,99,255,0.15);
    color: #6c63ff;
}

.admin-btn-primary:hover {
    background: rgba(108,99,255,0.25);
}

.admin-btn-success {
    background: rgba(46,125,50,0.15);
    color: #4caf50;
}

.admin-btn-success:hover {
    background: rgba(46,125,50,0.25);
}

.admin-btn-danger {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.admin-btn-danger:hover {
    background: rgba(239,68,68,0.25);
}

.admin-btn-warning {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}

.admin-btn-warning:hover {
    background: rgba(245,158,11,0.25);
}

/* Admin Filters */
.admin-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.admin-filter-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: transparent;
    color: #8892b0;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-english);
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-filter-btn:hover {
    border-color: rgba(108,99,255,0.3);
    color: #ffffff;
}

.admin-filter-btn.active {
    background: rgba(108,99,255,0.15);
    border-color: #6c63ff;
    color: #6c63ff;
}

/* Admin Post Detail */
.admin-post-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

.admin-post-image {
    width: 100%;
    border-radius: var(--radius-lg);
    max-height: 400px;
    object-fit: cover;
}

.admin-post-info {
    background: rgba(26,29,46,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.admin-post-info h2 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: var(--space-md);
}

.admin-post-info p {
    color: #8892b0;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.admin-info-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 0.85rem;
    color: #8892b0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.admin-info-row .label {
    color: #5a6178;
    min-width: 100px;
}

.admin-actions-bar {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

/* Admin Update Form */
.admin-update-form {
    margin-top: var(--space-lg);
    background: rgba(26,29,46,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.admin-update-form h3 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: var(--space-md);
}

.admin-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.9rem;
    font-family: var(--font-english);
    outline: none;
    resize: vertical;
    transition: border-color 0.3s;
}

.admin-textarea:focus {
    border-color: #6c63ff;
}

/* Admin Modal */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.admin-modal-overlay.show {
    display: flex;
}

.admin-modal {
    background: #1a1d2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 450px;
    width: 100%;
}

.admin-modal h3 {
    color: #ffffff;
    margin-bottom: var(--space-md);
}

/* Admin Search */
.admin-search {
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.85rem;
    font-family: var(--font-english);
    outline: none;
    width: 250px;
    transition: border-color 0.3s;
}

.admin-search:focus {
    border-color: #6c63ff;
}

.admin-search::placeholder {
    color: #5a6178;
}

/* Admin Update History */
.admin-updates-list {
    margin-top: var(--space-lg);
}

.admin-update-item {
    padding: var(--space-md);
    border-left: 3px solid #6c63ff;
    margin-bottom: var(--space-md);
    background: rgba(108,99,255,0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.admin-update-item p {
    color: #c9d1d9;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 4px;
}

.admin-update-item .time {
    font-size: 0.75rem;
    color: #5a6178;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .admin-post-detail {
        grid-template-columns: 1fr;
    }

    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }

    .admin-topbar-actions {
        gap: var(--space-xs);
    }

    .admin-topbar-link {
        font-size: 0.72rem;
        padding: 4px 8px;
    }

    .admin-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .login-features {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   UTILITIES
   ============================================= */
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hide scrollbar on mobile for horizontal scroll */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Standalone PWA mode adjustments */
@media all and (display-mode: standalone) {
    .pwa-install-btn,
    .pwa-install-tooltip {
        display: none !important;
    }
}
