/* Technocean Admin Panel Styles */
:root {
    --sidebar-bg: #1e293b;
    --sidebar-width: 260px;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg-light); color: var(--text-primary); }

/* Layout */
.admin-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.brand-icon {
    font-size: 24px;
    color: var(--accent);
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-link.active {
    background: var(--accent);
    color: #fff;
}

.sidebar-link i { width: 20px; text-align: center; font-size: 16px; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.logout-link { color: rgba(255,255,255,0.5); }
.logout-link:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.topbar-user i { font-size: 20px; }

.content-area { padding: 32px; }

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-header h3 { font-size: 16px; font-weight: 600; }

.card-body { padding: 24px; }
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon-blue { background: #eff6ff; color: #2563eb; }
.stat-icon-amber { background: #fffbeb; color: #f59e0b; }
.stat-icon-purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon-green { background: #f0fdf4; color: #22c55e; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.data-table tbody tr:hover { background: var(--bg-light); }
.table-responsive { overflow-x: auto; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-yellow { background: #fffbeb; color: #d97706; }
.badge-green { background: #f0fdf4; color: #16a34a; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }
.badge-light { background: #f8fafc; color: var(--text-secondary); border: 1px solid var(--border); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-light); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: border-color 0.15s;
    outline: none;
}
.form-control:focus { border-color: var(--accent); }

select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group { flex: 1; }

.checkbox-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400 !important;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 { font-size: 24px; font-weight: 700; }

/* Filter Bar */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group { flex: 0 0 auto; min-width: 140px; }
.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group .form-control { font-size: 13px; padding: 8px 12px; }
.filter-search { flex: 1; min-width: 200px; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 16px; }
.page-link {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}
.page-link:hover:not(:disabled) { background: var(--bg-light); border-color: #cbd5e1; }
.page-link:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-secondary); }
.pagination-info { font-size: 13px; color: var(--text-secondary); }

/* Bar Chart */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 140px; font-size: 13px; font-weight: 500; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width 0.3s; min-width: 4px; }
.bar-value { width: 32px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* Status Breakdown */
.status-breakdown { display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-new { background: #2563eb; }
.status-contacted { background: #f59e0b; }
.status-converted { background: #22c55e; }
.status-closed { background: #94a3b8; }
.status-name { font-size: 14px; text-transform: capitalize; flex: 1; }
.status-count { font-size: 14px; font-weight: 600; }

/* Enquiry Details */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.detail-value { font-size: 14px; color: var(--text-primary); }

.message-text { font-size: 14px; line-height: 1.7; color: var(--text-primary); white-space: pre-wrap; }

.full-width { grid-column: 1 / -1; }

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Package Grid */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 20px;
}

.package-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.package-card:hover { box-shadow: var(--shadow-md); }

.package-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.package-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.package-price { font-size: 18px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.package-card-body { padding: 14px 20px; }

.package-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.package-meta span { display: inline-flex; align-items: center; gap: 5px; }

.package-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

/* Site Sections */
.site-section-header { cursor: pointer; }
.site-section-header h3 {
    display: flex;
    align-items: center;
    font-size: 16px;
}
.section-toggle {
    font-size: 12px;
    margin-right: 10px;
    transition: transform 0.2s;
}

/* Color Picker Inline */
.color-picker-inline { display: flex; align-items: center; }

/* Responsive */
@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .details-grid { grid-template-columns: 1fr; }
    .filter-row { flex-direction: column; }
    .filter-group { width: 100%; }
}

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .sidebar-link span,
    .sidebar .brand-text { display: none; }
    .sidebar-brand { padding: 16px 8px; justify-content: center; }
    .sidebar-link { justify-content: center; padding: 12px; }
    .sidebar-footer { padding: 8px; }
    .main-content { margin-left: 60px; }
    .content-area { padding: 16px; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 22px; }
    .topbar { padding: 16px; }
}
