/*
|--------------------------------------------------------------------------
| Phase J.18 — Marketplace Final UI Polish, Public Trust Layer
| & Production Hardening Stylesheet
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| 1. Root Variables
|--------------------------------------------------------------------------
*/

:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, .12);

    --green: #16a34a;
    --green-dark: #047857;
    --gold: #f59e0b;
    --red: #dc2626;
    --blue: #2563eb;

    --shadow: 0 16px 36px rgba(15, 23, 42, .14);
    --radius: 20px;
}


/*
|--------------------------------------------------------------------------
| 2. Base Styles
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    line-height: 1.65;
    color: var(--ink);
}

a {
    text-decoration: none;
    color: var(--green-dark);
    font-weight: 800;
}

button,
.button-link {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #047857, #16a34a);
    color: #fff !important;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
}

button:hover,
.button-link:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

textarea {
    resize: vertical;
}


/*
|--------------------------------------------------------------------------
| 3. Typography & Utility Text
|--------------------------------------------------------------------------
*/

.kicker {
    margin: 0 0 6px;
    color: #fde68a;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 900;
    font-size: .8rem;
}

.kicker.dark {
    color: #047857;
}

.muted {
    color: var(--muted);
    margin: 0 0 14px;
}


/*
|--------------------------------------------------------------------------
| 4. Admin / Public Body Layout
|--------------------------------------------------------------------------
*/

.admin-body {
    background:
        radial-gradient(circle at top left, rgba(22, 163, 74, .18), transparent 30%),
        radial-gradient(circle at top right, rgba(245, 158, 11, .16), transparent 32%),
        #f1f5f9;
}

.public-body {
    background: #f1f5f9;
}

.admin-wrap,
.public-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px;
}


/*
|--------------------------------------------------------------------------
| 5. Hero Sections
|--------------------------------------------------------------------------
*/

.admin-hero,
.trust-hero {
    border-radius: 28px;
    background: linear-gradient(135deg, #07111f, #14532d 60%, #92400e);
    color: #fff;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.admin-hero h1,
.trust-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 4vw, 3rem);
    line-height: 1.1;
}

.admin-hero p,
.trust-hero p {
    margin: 0;
    color: #e2e8f0;
}


/*
|--------------------------------------------------------------------------
| 6. Header / Brand / Navigation
|--------------------------------------------------------------------------
*/

.public-header {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
}

.public-header nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.public-header nav a {
    color: #0f172a;
    background: #fff;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}


/*
|--------------------------------------------------------------------------
| 7. Admin / Hero Actions
|--------------------------------------------------------------------------
*/

.admin-actions,
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 20px;
}

.admin-actions a,
.hero-actions a {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
}

.admin-actions a:hover,
.hero-actions a:hover {
    background: #fff;
    color: #14532d;
}


/*
|--------------------------------------------------------------------------
| 8. Alerts
|--------------------------------------------------------------------------
*/

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 800;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/*
|--------------------------------------------------------------------------
| 9. Statistics
|--------------------------------------------------------------------------
*/

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.public-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
    font-size: .78rem;
}

.stat-card strong {
    font-size: 1.55rem;
    color: #14532d;
}


/*
|--------------------------------------------------------------------------
| 10. Cards / Panels
|--------------------------------------------------------------------------
*/

.stat-card,
.panel-card,
.notice-card,
.trust-card,
.process-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-card,
.process-card {
    padding: 22px;
    margin-bottom: 20px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}


/*
|--------------------------------------------------------------------------
| 11. Forms
|--------------------------------------------------------------------------
*/

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group label {
    display: block;
    font-weight: 900;
    color: #334155;
    margin-bottom: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}


/*
|--------------------------------------------------------------------------
| 12. Badges
|--------------------------------------------------------------------------
*/

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}


/*
|--------------------------------------------------------------------------
| 13. Tables
|--------------------------------------------------------------------------
*/

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: #334155;
    font-size: .8rem;
    text-transform: uppercase;
}


/*
|--------------------------------------------------------------------------
| 14. Empty State / Lists
|--------------------------------------------------------------------------
*/

.empty-box {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin: 14px 0;
    color: #334155;
}

.list-stack {
    display: grid;
    gap: 10px;
}

.list-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
}

.list-item span,
.list-item small {
    display: block;
    color: #64748b;
}


/*
|--------------------------------------------------------------------------
| 15. Public Notices
|--------------------------------------------------------------------------
*/

.notice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.notice-card {
    padding: 20px;
    border-left: 5px solid #f59e0b;
}

.notice-card span {
    font-weight: 900;
    color: #92400e;
    text-transform: uppercase;
    font-size: .78rem;
}

.notice-card h2 {
    margin: .25rem 0;
}


/*
|--------------------------------------------------------------------------
| 16. Section Header
|--------------------------------------------------------------------------
*/

.section-head {
    text-align: center;
    margin: 30px auto 18px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}


/*
|--------------------------------------------------------------------------
| 17. Trust Layer
|--------------------------------------------------------------------------
*/

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.trust-card {
    padding: 22px;
}

.trust-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #047857, #f59e0b);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    margin-bottom: 12px;
}

.trust-card h3 {
    margin: 0 0 6px;
}

.trust-card .subtitle {
    font-weight: 900;
    color: #047857;
}


/*
|--------------------------------------------------------------------------
| 18. Process / Workflow Cards
|--------------------------------------------------------------------------
*/

.process-card {
    background: linear-gradient(135deg, #fff, #ecfdf5);
}

.process-card h2 {
    margin: 0 0 16px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.process-steps div {
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 14px;
}

.process-steps strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #047857;
    color: #fff;
    margin-bottom: 8px;
}


/*
|--------------------------------------------------------------------------
| 19. Responsive Styles
|--------------------------------------------------------------------------
*/

@media (max-width: 1120px) {
    .stats-grid,
    .public-stats,
    .trust-grid,
    .process-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column,
    .notice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-wrap,
    .public-main {
        padding: 14px;
    }

    .admin-hero {
        display: block;
    }

    .admin-actions {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .form-grid.two,
    .stats-grid,
    .public-stats,
    .trust-grid,
    .process-steps {
        grid-template-columns: 1fr;
    }

    .card-top {
        display: block;
    }

    .public-header {
        display: block;
    }

    .public-header nav {
        margin-top: 12px;
    }
}