/* ============================================================
   Aurelia Estates – Black & Gold Glassmorphism Theme
   World-class UI | PHP 7.4 Portal
   ============================================================ */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.65);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --gold: #d4af37;
    --gold-light: #f0d77b;
    --gold-dark: #b8962e;
    --text: #f5f5f5;
    --text-muted: #a0a0a0;
    --border-glass: rgba(212, 175, 55, 0.25);
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, .logo-text, .footer-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--gold-light);
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--gold-light);
}

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

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== GLASS UTILITIES ========== */
.glass, .glass-nav, .glass-footer, .glass-sidebar, .glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow);
}

.glass-card {
    border-radius: var(--radius);
    padding: 24px;
}

/* ========== BUTTONS ========== */
.btn, .btn-nav, .btn-gold, .btn-outline, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-gold, .btn-nav.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #111;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    color: #000;
}

.btn-outline, .btn-nav.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}
.btn-outline:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-warning {
    background: var(--warning);
    color: #111;
}

/* ========== NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img {
    height: 42px;
    width: auto;
}
.logo-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-menu a {
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--text);
    font-weight: 450;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.user-greeting {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 8px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 40px 0;
}

/* ========== HERO ========== */
.hero {
    text-align: center;
    padding: 80px 20px;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ========== PROPERTY CARDS / GRID ========== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.property-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.property-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.15);
}

.property-card .card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}
.property-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.property-card:hover .card-img img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text);
}
.card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.card-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
}
.card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== FILTERS ========== */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    border-radius: var(--radius);
    align-items: flex-end;
}
.filters-bar .form-group {
    flex: 1;
    min-width: 140px;
}
.filters-bar label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.filters-bar select,
.filters-bar input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
}
.filters-bar select:focus,
.filters-bar input:focus {
    outline: none;
    border-color: var(--gold);
}

/* ========== FORMS ========== */
.form-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gold-light);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* PIN Input Boxes */
.pin-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.pin-container input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    color: var(--gold);
}
.pin-container input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}
.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}
.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.alert-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold-light);
}

/* ========== FOOTER ========== */
.footer {
    padding: 60px 0 30px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--gold);
}
.footer-links, .footer-contact {
    list-style: none;
}
.footer-links li, .footer-contact li {
    margin-bottom: 8px;
}
.footer-links a {
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--gold);
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-note {
    margin-top: 6px;
    font-size: 0.8rem;
    opacity: 0.7;
}
.footer-banner {
    width: 100%;
    overflow: hidden;
}
.footer-banner-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

/* ========== ADMIN LAYOUT ========== */
.admin-body {
    background: #080808;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    padding: 10px 0;
}
.admin-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 100%;
}
.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img-sm {
    height: 32px;
}
.admin-badge {
    background: var(--gold);
    color: #111;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}
.admin-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-user {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 20px 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: var(--transition);
}
.sidebar-nav ul {
    list-style: none;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    border-left-color: var(--gold);
}
.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}
.nav-section {
    padding: 20px 24px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-dark);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}
.admin-content-inner {
    max-width: 1400px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header h1 {
    font-size: 1.8rem;
}

/* Admin Tables */
.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-glass);
}
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}
table.admin-table th,
table.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
table.admin-table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table.admin-table tr:hover td {
    background: rgba(255,255,255,0.03);
}
table.admin-table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: rgba(243,156,18,0.2); color: var(--warning); }
.badge-approved { background: rgba(46,204,113,0.2); color: var(--success); }
.badge-rejected { background: rgba(231,76,60,0.2); color: var(--danger); }
.badge-closed { background: rgba(46,204,113,0.2); color: var(--success); }
.badge-review { background: rgba(52,152,219,0.2); color: #3498db; }
.badge-hidden { background: rgba(149,165,166,0.2); color: #95a5a6; }

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
}
.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Earnings tree */
.tree ul {
    list-style: none;
    padding-left: 24px;
    border-left: 1px dashed var(--border-glass);
}
.tree li {
    margin: 12px 0;
    position: relative;
}
.tree-node {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
}
.tree-node .earnings {
    color: var(--gold);
    font-weight: 600;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        z-index: 800;
        height: 100vh;
        top: 0;
        padding-top: 70px;
    }
    .admin-sidebar.open {
        left: 0;
    }
    .sidebar-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
    }
    .sidebar-toggle span {
        width: 22px;
        height: 2px;
        background: var(--gold);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10,10,10,0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        transform: translateY(-120%);
        transition: var(--transition);
        border-bottom: 1px solid var(--border-glass);
    }
    .nav-menu.open {
        transform: translateY(0);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .property-grid {
        grid-template-columns: 1fr;
    }
    .filters-bar {
        flex-direction: column;
    }
    .admin-content {
        padding: 20px 12px;
    }
}

/* Utility */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }