/* =========================
   BASE RESET
   ========================= */
body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 20px;
}

/* =========================
   LAYOUT
   ========================= */
.container {
    max-width: 1100px;
    margin: auto;
    padding:20px;
}

/* =========================
   TYPOGRAPHY & LINKS
   ========================= */
a {
    text-decoration: none;
    color: inherit;
}

a[href*="approve"] { color: green; }
a[href*="reject"] { color: red; }

/* =========================
   INPUTS & BUTTONS
   ========================= */
input, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    font-size: 14px;
}

textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79,70,229,0.1);
    outline: none;
}

button, .btn {
    background: #4f46e5;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

button:hover, .btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* =========================
   CARD SYSTEM
   ========================= */
.card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;

    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #4f46e5;
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.hero p {
    color: #666;
    max-width: 600px;
    margin: auto;
}

.hero-right img {
    margin-top: 8px;
    width: 100%;
    max-width: 420px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.hero-right {
    text-align:center;
}


.premium-hero {
    flex-direction:column;
}



/* =========================
   AUTH TABS
   ========================= */
.auth-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.auth-tabs span {
    cursor: pointer;
    font-weight: bold;
    padding-bottom: 5px;
}

.auth-tabs span.active {
    border-bottom: 2px solid #4f46e5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =========================
   ERROR TEXT
   ========================= */
.error {
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
}

/* =========================
   USER PANEL
   ========================= */
.user-panel a {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #333;
}

.user-panel a:hover {
    background: #e5e7eb;
}

/* =========================
   POSTS (UNIFIED)
   ========================= */
.post {
    border-radius: 14px;
    padding: 18px;
    margin: 20px 0;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-header {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

/*.post:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
*/
.post p {
    font-size: 16px;
    line-height: 1.5;
}

/* ACTIONS */
.actions {
    margin-top: 12px;
    display: flex;
    gap: 15px;
    font-size: 14px;
}

/* COMMENTS */
.comment {
    margin-top: 12px;
    padding-left: 12px;
    border-left: 3px solid #eee;
}

.comment strong {
    font-size: 13px;
    color: #333;
}

.comment p {
    margin: 5px 0;
}

/* LIKE BUTTON */
.like-btn {
    font-size: 14px;
    cursor: pointer;
    color: #999;
    transition: transform 0.1s ease;
}

.like-btn.liked {
    color: red;
}

.like-btn:active {
    transform: scale(1.2);
}

.like-btn.not-liked {
    color: #666;
}



/* =========================
   TABLE
   ========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #eee;
    padding: 8px;
}

th {
    background: #f4f4f4;
}

/* =========================
   ADMIN PANEL
   ========================= */
.admin-container {
    max-width: 1400px;
    margin: 10px auto;
    padding: 10px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.admin-stats {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.stat-box {
    flex: 1;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* TABS CONTAINER */
.tabs {
    display:flex;
    gap:10px;
    margin-bottom:15px;
}


/* DEFAULT BUTTON */
.tabs button {
    padding:8px 14px;
    border:none;
    border-radius:8px;
    background:#1f2937;   /* DARK */
    color:#1f2937;           /* WHITE TEXT */
    cursor:pointer;
    font-weight:500;
}

/* ACTIVE TAB */
.tabs button.active {
    background:#facc15;   /* YELLOW */
    color:#111;
}

.tab-content {
    background:white;
    padding:10px;
    border-radius:8px;
}

/* HOVER */
.tabs button:hover {
    background:#111827;
}


.admin-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-form input,
.admin-form select {
    padding: 8px;
    flex: 1;
    min-width: 150px;
}

.admin-container {
    max-width:1200px;
    margin:auto;
}

.stat-box {
    background:#111827;
    color:white;
    padding:10px;
    border-radius:8px;
}

.tabs button {
    background:#f3f4f6;
    border:none;
    border-radius:6px;
}

.tabs button:hover {
    background:#111827;
    color:white;
}



/*comments toggle*/

.comment-toggle {
    cursor: pointer;
    color: #555;
    font-size: 14px;
    transition: color 0.2s ease;
}

.comment-toggle:hover {
    color: #4f46e5;
}


/* HEADER LINE (LIKE DISCUSS) */
.profile-line {
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}

/* RIGHT SIDE INLINE */
.profile-right {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

/* TAG STYLE */
/*.tag {
    background:#eef2ff;
    padding:3px 8px;
    border-radius:6px;
    font-size:12px;
}*/


/* FORM GRID */
.profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.profile-form .full {
    grid-column: span 2;
}

/* FORCE SIDE BY SIDE EVEN ON TABLET */
@media (max-width: 768px) {
    .profile-form {
        grid-template-columns: 1fr 1fr;
    }
}

/* ONLY collapse on very small screens */
@media (max-width: 480px) {
    .profile-form {
        grid-template-columns: 1fr;
    }

    .profile-form .full {
        grid-column: span 1;
    }
}

/* FULL WIDTH FIELD */
.full {
    grid-column: span 2;
}

/* INPUT GROUP */
.form-group {
    display:flex;
    flex-direction:column;
}

/* LOCKED */
.locked {
    background:#f3f4f6;
    color:#555;
}

/* MOBILE */
@media (max-width: 600px) {
    .profile-form {
        grid-template-columns: 1fr;
    }

    .full {
        grid-column: span 1;
    }
}


/* =========================
   CONTACT BUTTONS (CLEAN UI)
   ========================= */

.contact-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* PRIMARY REQUEST */
.contact-btn.request {
    background: #4f46e5;
    color: #fff;
    border: none;
}

.contact-btn.request:hover {
    background: #4338ca;
}

/* PENDING STATE */
.contact-btn.pending {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* APPROVED STATE */
.contact-btn.approved {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* PHONE TEXT */
.contact-phone {
    font-size: 13px;
    color: #111827;
    font-weight: 500;
}


.status-vote button {
    padding:6px 10px;
    border-radius:6px;
    border:none;
    cursor:pointer;
    color:white;
}

.status-vote button:first-child {
    background:#16a34a; /* GREEN = close */
}

.status-vote button:last-child {
    background:#dc2626; /* RED = open */
}

/*adding color to the post of differnt type*/
.post-type {
    font-size:12px;
    font-weight:bold;
    margin-bottom:6px;
}

.type-issue { color:#dc2626; }
.type-help { color:#2563eb; }
.type-sell { color:#16a34a; }


.post {
    border-left:4px solid #ddd !important;
}

/* FORCE COLORS */
.post.type-issue {
    border-left:4px solid #dc2626 !important;
}

.post.type-help {
    border-left:4px solid #2563eb !important;
}

.post.type-sell {
    border-left:4px solid #16a34a !important;
}

.type-tabs {
    display:flex;
    gap:8px;
    margin-bottom:10px;
}

.type-tabs button {
    padding:6px 10px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    color:white;
    opacity:0.7;
}

/* DEFAULT */
#tab-normal {
    background:#4f46e5; /* same as brand */
}

/* ISSUE */
#tab-issue {
    background:#dc2626;
}

/* SELL */
#tab-sell {
    background:#16a34a;
}

/* HELP */
#tab-help {
    background:#2563eb;
}

/* ACTIVE TAB */
.type-tabs button.active {
    opacity:1;
    transform:scale(1.05);
}

/* textarea highlight */
textarea.issue { border-left:4px solid #dc2626; }
textarea.sell { border-left:4px solid #16a34a; }
textarea.help { border-left:4px solid #2563eb; }

/* =========================
   FORCE TYPE COLORS (ALL DEVICES)
========================= */

.post.type-issue {
    border-left:5px solid #dc2626 !important;
    background:#fff5f5;
}

.post.type-help {
    border-left:5px solid #2563eb !important;
    background:#eff6ff;
}

.post.type-sell {
    border-left:5px solid #16a34a !important;
    background:#f0fdf4;
}

/*color choice for sell items closure*/
.reserve-btn {
    background:#facc15;
    border:none;
    padding:6px 10px;
    border-radius:6px;
}

.sold-btn {
    background:#16a34a;
    color:white;
    border:none;
    padding:6px 10px;
    border-radius:6px;
}

@media (max-width:768px){

    .post button {
        display:inline-block !important;
        width:auto !important;
    }

}

/* SELL = same structure as status-vote */
.sell-vote {
    margin-top:10px;
    display:flex;
    gap:10px;
}

.sell-vote button:first-child {
    background:#111827;   /* dark */
    color:#facc15;        /* yellow text */
    border:1px solid #facc15;
}

.sell-vote button:last-child {
    background:#111827;   /* dark */
    color:#22c55e;        /* bright green */
    border:1px solid #22c55e;
}

.sell-vote button:disabled {
    cursor:not-allowed;
}

.disabled-btn {
    opacity:0.4;
    cursor:not-allowed;
}

.sale-status {
    margin-top:6px;
    font-size:13px;
    font-weight:bold;
}

.status-open { color:#16a34a; }
.status-reserved { color:#eab308; }
.status-sold { color:#059669; }

.post.type-sell.status-sold {
    opacity:0.7;
}

/*admin approve remove button */
.btn-approve {
    background:#16a34a;
    color:#fff;
    border:none;
    padding:4px 8px;
    border-radius:4px;
    cursor:pointer;
}

.btn-reject {
    background:#dc2626;
    color:#fff;
    border:none;
    padding:4px 8px;
    border-radius:4px;
    cursor:pointer;
}


.rwa-status-card {
    padding:12px;
    border-radius:10px;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    margin-bottom:10px;
}

.alert {
    padding:10px;
    border-radius:6px;
    margin-bottom:10px;
    font-size:13px;
}

.alert.warning {
    background:#fef3c7;
    color:#92400e;
}

.input-mobile {
    width:100%;
    padding:10px;
    border-radius:8px;
    border:1px solid #d1d5db;
    font-size:14px;
}

#removalForm {
    transition: all 0.2s ease;
}

/* =========================
   📱 MOBILE UX POLISH
========================= */

.btn-mobile {
    width:100%;
    padding:10px;
    font-size:14px;
    border-radius:8px;
    border:none;
    cursor:pointer;
}

.btn-mobile.warning {
    background:#f59e0b;
    color:#fff;
}

.btn-mobile.danger {
    background:#dc2626;
    color:#fff;
}

.input-mobile {
    width:100%;
    padding:10px;
    border-radius:8px;
    border:1px solid #d1d5db;
    font-size:14px;
    margin-bottom:8px;
}

.mobile-card {
    padding:14px;
    border-radius:12px;
    margin-bottom:12px;
}

.mobile-stack > * {
    margin-bottom:10px;
}

.badge-mobile {
    display:inline-block;
    padding:6px 10px;
    border-radius:6px;
    font-size:12px;
    margin-bottom:8px;
}

.badge-mobile.success {
    background:#d1fae5;
    color:#065f46;
}

.badge-mobile.warning {
    background:#fef3c7;
    color:#92400e;
}


/* =========================
   🧑‍💼 ADMIN TABLE POLISH
========================= */

.admin-table {
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.admin-table th {
    text-align:left;
    padding:10px;
    background:#f3f4f6;
    font-weight:600;
}

.admin-table td {
    padding:10px;
    border-bottom:1px solid #e5e7eb;
}

.admin-row:hover {
    background:#f9fafb;
}

.btn-admin {
    padding:6px 10px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-size:12px;
}

.btn-admin.approve {
    background:#16a34a;
    color:#fff;
}

.btn-admin.reject {
    background:#dc2626;
    color:#fff;
}



/* 🔥 GRID LAYOUT */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}


/*CSS for Pincode*/
/* 🔹 USER CARD */
.user-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

/* 🔹 HEADER */
.user-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
}



/* 🔹 ADDRESS */
.addr {
    font-size:13px;
    color:#555;
}

/* 🔥 TABLE DIRECTORY */
.directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.directory-table th {
    text-align: left;
    padding: 10px;
    background: #f9fafb;
    border-bottom: 1px solid #ddd;
}

.directory-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* 🔹 ROW HOVER */
.directory-table tr:hover {
    background: #f3f4f6;
}

/* 🔹 TAG */
.tag {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #f3f4f6;
}

/* 🔹 SEARCH */
.search-box {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

/* 🔹 BUTTON */
.btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-muted {
    background: #e5e7eb;
}

/* 📱 MOBILE FIX */
@media (max-width: 768px) {

    .directory-table {
        font-size: 12px;
    }

    .directory-table th,
    .directory-table td {
        padding: 6px;
    }

    /* 🔥 Make table scroll instead of breaking */
    .card {
        overflow-x: auto;
    }

    /* prevent wrapping of buttons */
    .btn {
        white-space: nowrap;
    }
}

.rwa-card {
    display: block;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fff;
    text-decoration: none;
    color: #111;

    /* 🔥 KEY FIXES */
    margin-bottom: 8px;        /* creates vertical gap */
    box-shadow: 0 1px 2px rgba(0,0,0,0.04); /* subtle depth */
}

/* hover */
.rwa-card:hover {
    background: #f9fafb;
    border-color: #ddd;
}

.rwa-meta {
    font-size: 12px;
    color: #666;
    margin-top: 6px;  /* ⬅️ THIS creates gap inside card */
}

.rwa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/*images on post rwa-view and comment*/
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.upload-btn {
    font-size: 18px;
    cursor: pointer;
}


.clickable-img {
    max-width: 180px;
    max-height: 140px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    object-fit: cover;
}

.clickable-img:hover {
    transform: scale(1.05);
}

/* MODAL */
.img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.img-modal.show {
    display: flex;
}

.img-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.image-preview-container {
    margin-top: 10px;
    margin-bottom: 12px; /* 🔥 ADD THIS */
    position: relative;
}

.image-preview {
    max-width: 200px;
    border-radius: 8px;
    display: block;
}

.remove-image {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;              /* 🔥 white instead of black */
    color: #333;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.remove-image:hover {
    background: #f5f5f5;
}

button[type="submit"] {
    margin-top: 4px;
}

.upload-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.status-vote button.vote-selected{
    opacity:0.65;
    border:2px solid #111;
    cursor:not-allowed;
}

.legal-links{
    margin-top:40px;
    text-align:center;
    font-size:14px;
    opacity:0.7;
}

.legal-links a{
    margin:0 10px;
    color:#666;
    text-decoration:none;
}

.legal-page{
    max-width:1000px;
    margin:auto;
    padding:40px 20px;
    line-height:1.7;
}

.flash{
    padding:12px;
    border-radius:8px;
    margin-top:15px;
    margin-bottom:15px;
}

.flash.success{
    background:#dcfce7;
    color:#166534;
}

.flash.error{
    background:#fee2e2;
    color:#991b1b;
}


.support-tab-btn{

    padding:8px 16px;

    border:none;

    border-radius:8px;

    cursor:pointer;

    background:#eee;
}

.active-support-tab{

    background:#111;

    color:#fff;
}

/* =========================
   ⭐ TRUSTED SERVICES
========================= */

.trusted-services-card{

    border:1px solid #f3e8ff;

    background:#fcfaff;
}

.trusted-grid{

    display:grid;

    grid-template-columns:1fr;

    gap:12px;
}

@media (min-width:768px){

    .trusted-grid{

        grid-template-columns:1fr 1fr;
    }
}

.trusted-item{

    padding:12px;

    border:1px solid #eee;

    border-radius:10px;

    background:#fafafa;
}

.trusted-meta{

    color:#666;

    font-size:13px;

    margin-top:5px;

    display:block;
}

.trusted-phone{

    display:block;

    margin-top:8px;

    font-weight:600;

    color:#111827;
}