/* ==========================================================================
   SKY POOL BUILDERS - ADMIN DASHBOARD DESIGN SYSTEM
   ========================================================================== */

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

:root {
    --bg-primary: #040d21;
    --bg-secondary: #0b152d;
    --bg-card: rgba(11, 21, 45, 0.75);
    --bg-hover: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent-cyan: #00d2ff;
    --accent-blue: #0076f7;
    --accent-gold: #c5a059;
    --accent-whatsapp: #25d366;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-success: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow-premium: 0 20px 40px -15px rgba(2, 6, 23, 0.6);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* ==========================================================================
   SIDEBAR & NAVIGATION
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.logo-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.logo-text span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.menu-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 10px 12px 4px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 118, 247, 0.15) 0%, rgba(0, 210, 255, 0.05) 100%);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
    font-weight: 600;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--accent-gold);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-glass);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info h4 {
    font-size: 0.85rem;
    color: #fff;
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-visit-site {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-visit-site:hover {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-cyan);
    border-color: rgba(0, 210, 255, 0.3);
}

/* ==========================================================================
   MAIN CONTENT LAYOUT
   ========================================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Top Header Bar */
.top-bar {
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 21, 45, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    display: flex;
    flex-direction: column;
}

.page-title h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.page-title span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 118, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.btn-whatsapp {
    background: var(--accent-whatsapp);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}

/* Dashboard Body Container */
.content-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ==========================================================================
   METRIC CARDS (KPIs)
   ========================================================================== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 210, 255, 0.2);
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.metric-icon.cyan {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-cyan);
}

.metric-icon.gold {
    background: rgba(197, 160, 89, 0.12);
    color: var(--accent-gold);
}

.metric-icon.green {
    background: rgba(37, 211, 102, 0.12);
    color: var(--accent-whatsapp);
}

.metric-icon.purple {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.metric-info h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-info .value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 4px 0;
}

.metric-info .subtext {
    font-size: 0.78rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   TABLE & DATA SECTION
   ========================================================================== */

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.table-title p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    width: 240px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.08);
}

.filter-select {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-secondary);
    color: #fff;
}

/* Data Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-glass);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-hover);
}

.client-info h4 {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
}

.client-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.model-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 118, 247, 0.12);
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 500;
}

.price-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.in-talks {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.canceled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Actions Column */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-icon.wa {
    background: rgba(37, 211, 102, 0.15);
    color: var(--accent-whatsapp);
    border-color: rgba(37, 211, 102, 0.3);
}

.btn-icon.wa:hover {
    background: var(--accent-whatsapp);
    color: #fff;
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.08);
}

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

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 600px) {
    .content-body {
        padding: 16px;
    }
    .top-bar {
        padding: 0 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   CUSTOM FILE UPLOAD STYLES
   ========================================================================== */
.file-upload-box {
    border: 2px dashed var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    margin-top: 6px;
}

.file-upload-box:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.04);
}

.file-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.2rem;
    color: var(--accent-cyan);
    margin-bottom: 6px;
}

.upload-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.upload-text span {
    color: var(--accent-gold);
    font-weight: 600;
}

.img-preview-thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    margin-top: 10px;
}

