/* ===========================
   Purchase Offer System - Styles
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #0f172a;
    --accent-color: #06b6d4;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding-top: 70px;
}

/* ===========================
   Navbar
   =========================== */
.custom-navbar {
    background: var(--gradient-dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--accent-color);
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
    background: var(--gradient);
    padding: 2.5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 2rem;
}

/* ===========================
   Form Card
   =========================== */
.form-card {
    border: none;
    border-radius: 20px;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-2px);
}

.card-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.card-title i {
    color: var(--primary-color);
}

/* ===========================
   Form Elements
   =========================== */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-label i {
    color: var(--primary-color);
}

.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.input-group-text {
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    background-color: var(--bg-light);
    font-weight: 700;
    color: var(--primary-color);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* ===========================
   CAPTCHA Box
   =========================== */
.captcha-box {
    background: var(--gradient-dark);
    color: #fff;
    font-size: 1.15rem;
    text-align: center;
    border: 2px solid var(--secondary-color);
}

.captcha-box span {
    letter-spacing: 1px;
}

/* ===========================
   Buttons
   =========================== */
.btn-primary {
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: var(--gradient);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--gradient-dark);
    color: #cbd5e1;
}

.footer p {
    font-size: 0.9rem;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #fff;
}

/* ===========================
   Alerts
   =========================== */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===========================
   Admin Panel
   =========================== */
.admin-navbar {
    background: var(--gradient-dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.admin-body {
    padding-top: 0;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    padding: 2rem 1rem;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
}

.login-card .card-body {
    padding: 2.5rem;
}

.login-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.15;
    position: absolute;
    top: 15px;
    right: 20px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.stat-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
}

.stat-card.stat-green {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
}

.stat-card.stat-purple {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #5b21b6;
}

.stat-card.stat-orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
}

/* Table */
.offers-table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.offers-table thead {
    background: var(--gradient-dark);
    color: #fff;
}

.offers-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.offers-table tbody tr {
    transition: background-color 0.2s ease;
}

.offers-table tbody tr:hover {
    background-color: #f1f5f9;
}

.offers-table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 15px;
}

.modal-header {
    background: var(--gradient-dark);
    color: #fff;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.detail-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .lead {
        font-size: 0.95rem;
    }

    .form-card .card-body {
        padding: 1.5rem;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 1s infinite;
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}