/* ============================================
   Admin Dashboard Styles
   ============================================ */

/* ---- LOGIN PAGE ---- */

.admin-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-darkest) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(230, 57, 70, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--text-white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-btn {
    width: 100%;
}

.login-notice {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.login-notice p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.login-notice code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-family: monospace;
    color: var(--accent-1);
}

/* ---- DASHBOARD LAYOUT ---- */

.admin-dashboard {
    min-height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
}

.admin-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(11, 11, 15, 0.95);
    border-bottom: 1px solid rgba(230, 57, 70, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.top-bar-left h2 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-white);
}

.logout-btn {
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* ---- ADMIN CONTAINER ---- */

.admin-container {
    display: flex;
    margin-top: 70px;
    height: calc(100vh - 70px);
}

/* ---- SIDEBAR ---- */

.admin-sidebar {
    width: 250px;
    background: rgba(11, 11, 15, 0.8);
    border-right: 1px solid rgba(230, 57, 70, 0.1);
    padding: 2rem 0;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 70px;
    height: calc(100vh - 70px);
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-item:hover {
    color: var(--text-white);
    background: rgba(230, 57, 70, 0.1);
    border-left-color: var(--primary);
}

.sidebar-nav .nav-item.active {
    color: var(--text-white);
    background: rgba(230, 57, 70, 0.15);
    border-left-color: var(--primary);
}

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

/* ---- ADMIN CONTENT ---- */

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-section {
    animation: fadeIn 0.3s ease-out;
}

.dashboard-section h1 {
    color: var(--text-white);
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* ---- STATS CARDS ---- */

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-md);
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.2), rgba(114, 9, 183, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.stat-info h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
}

/* ---- CHARTS ---- */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.chart-container h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.chart-canvas {
    min-height: 300px;
}

/* ---- TABLES ---- */

.table-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.admin-table thead {
    background: rgba(230, 57, 70, 0.1);
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
}

.admin-table th {
    color: var(--text-white);
    padding: 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    color: var(--text-muted);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(230, 57, 70, 0.05);
}

.admin-table tbody tr {
    transition: var(--transition-fast);
}

.admin-table tbody tr:hover {
    background: rgba(230, 57, 70, 0.05);
}

.no-data {
    text-align: center;
    padding: 3rem !important;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: rgba(81, 207, 102, 0.15);
    color: #51cf66;
}

.status-inactive {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.status-new {
    background: rgba(230, 57, 70, 0.15);
    color: var(--primary);
}

.status-contacted {
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent-1);
}

.status-converted {
    background: rgba(114, 9, 183, 0.15);
    color: #b366ff;
}

/* ---- SECTION HEADER ---- */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h1 {
    color: var(--text-white);
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-white);
    font-family: var(--font-body);
}

.search-box::placeholder {
    color: var(--text-muted);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.3);
}

/* ---- RECENT ACTIVITY ---- */

.recent-activity {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.recent-activity h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

/* ---- SETTINGS ---- */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.settings-card h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.settings-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.settings-card.danger-zone {
    border-color: rgba(255, 107, 107, 0.3);
}

/* ---- MODAL ---- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(11, 11, 15, 0.95);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(230, 57, 70, 0.1);
}

.modal-header h2 {
    color: var(--text-white);
    margin: 0;
}

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

.modal-close:hover {
    color: var(--primary);
}

.modal-body {
    padding: 2rem;
}

.modal-body h3 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Status Select in Modal */
.modal-body select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
}

.modal-body button {
    margin-top: 1rem;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(230, 57, 70, 0.1);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
