﻿/* ============================================
   NERO - Global Styles
   Premium Luxury B2B Platform
   Reset, Typography, Base Components
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --primary: #0A2E4D;
    --primary-light: #134074;
    --primary-dark: #061E33;
    --accent: #2E86DE;
    --bg: #FFFFFF;
    --bg-alt: #F7F8FA;
    --bg-section: #F2F4F7;
    --text: #1A1A2E;
    --text-light: #5A6678;
    --text-muted: #8E99A8;
    --border: #E2E6EC;
    --border-light: #F0F2F5;
    --white: #FFFFFF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --shadow-sm: 0 2px 8px rgba(10,46,77,0.04);
    --shadow: 0 4px 20px rgba(10,46,77,0.06);
    --shadow-md: 0 8px 40px rgba(10,46,77,0.08);
    --shadow-lg: 0 20px 60px rgba(10,46,77,0.12);
    --shadow-hover: 0 12px 40px rgba(10,46,77,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --header-h: 80px;
    --container: 1280px;
    --section-padding: 100px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ── Container ── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Section ── */
.section {
    padding: var(--section-padding) 0;
}

.section-alt {
    background: var(--bg-section);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    color: var(--white);
}

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

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

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

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

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-lg {
    padding: 18px 42px;
    font-size: 0.88rem;
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.75rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

/* ── Alerts ── */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: alertSlideIn 0.4s ease;
    border: 1px solid transparent;
}

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

.alert-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.alert-error, .alert-danger { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }

/* ── Forms ── */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all var(--transition);
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10,46,77,0.08);
}

.form-control::placeholder { color: var(--text-muted); }

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

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

/* ── Grid System ── */
.grid {
    display: grid;
    gap: 32px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--white);
}

table { width: 100%; border-collapse: collapse; }

table th {
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 14px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #FAFBFC; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 50%;
    transition: all var(--transition);
    color: var(--text-light);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--bg-section);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
    padding: 160px 0 80px;
    background: var(--primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(46,134,222,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.page-hero p {
    color: rgba(255,255,255,0.55);
    margin-top: 14px;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

/* ── Filter Bar ── */
.filter-bar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

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

.empty-state svg { margin: 0 auto 20px; opacity: 0.3; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p { max-width: 400px; margin: 0 auto; }

/* ── About Split ── */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.login-box {
    background: var(--white);
    padding: 56px 48px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 32px;
    text-transform: uppercase;
}

.login-box h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 36px;
    font-size: 0.95rem;
}

/* ── Stat Grid (admin/partner pages) ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

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

.stat-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Utilities ── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 48px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Base Responsive ── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .about-split { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
    :root {
        --header-h: 68px;
        --section-padding: 72px;
    }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-inline { flex-direction: column; }
    .form-inline .form-group { width: 100%; margin-bottom: 12px; }
    .page-hero { padding: 130px 0 60px; }
    .login-box { padding: 36px 28px; margin: 16px; }
    .table-wrap { margin: 0 -20px; border-radius: 0; border-left: none; border-right: none; }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .btn-lg { padding: 15px 32px; font-size: 0.84rem; }
}
