:root {
    --primary-color: #00a8ff;
    --sidebar-bg: #1a1a1a;
    --main-bg: #0a0a0a;
    --card-bg: #1f1f1f;
    --text-color: #ffffff;
    --border-color: #2d2d2d;
    --hover-bg: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: var(--main-bg);
    color: var(--text-color);
}

.dashboard {
    display: flex;
    min-height: 100vh;
    transition: filter 0.3s ease;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 20px;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    margin-bottom: 30px;
}

.sidebar-header img {
    width: 40px;
    height: 40px;
}

.sidebar-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--primary-color);
    color: white;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 20px;
    background: var(--main-bg);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 8px;
    width: 300px;
    border: 1px solid var(--border-color);
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    color: var(--text-color);
}

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

.admin-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

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

.stat-icon i {
    font-size: 24px;
}

.stat-details h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-details p {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive {
    color: #43a047;
}

.trend.negative {
    color: #e53935;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #666;
}

/* Users Table */
.users-table-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

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

.export-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.users-table th {
    font-weight: 600;
    color: #666;
}

.user-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-premium {
    background: #e8f5e9;
    color: #43a047;
}

.status-free {
    background: #e3f2fd;
    color: #1e88e5;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background: #e3f2fd;
    color: #1e88e5;
}

.delete-btn {
    background: #ffebee;
    color: #e53935;
    margin-left: 8px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.user-info {
    margin-bottom: 24px;
}

.user-info p {
    margin-bottom: 12px;
    color: var(--text-color);
}

.status-select {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.status-select select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    width: 150px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-buttons .action-btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Analytics Styles */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.date-range {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-range input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.apply-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

/* Settings Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.setting-item input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.api-key-input {
    display: flex;
    gap: 8px;
}

.show-key-btn {
    padding: 8px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.save-settings-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 6px;
    color: white;
    z-index: 1000;
}

.notification.success {
    background: #43a047;
}

/* Plan Settings Styles */
.plan-settings {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.plan-settings h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 18px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

/* Update users table status badges */
.status-starter {
    background: #e3f2fd;
    color: #1e88e5;
}

.status-pro {
    background: #e8f5e9;
    color: #43a047;
}

.status-enterprise {
    background: #fff3e0;
    color: #fb8c00;
}

/* Add these new styles for login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--main-bg);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.login-card h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.input-group input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 16px;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.login-card button:hover {
    background: #0088cc;
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 15px;
    display: none;
}

/* Add logout button styles */
.logout-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--hover-bg);
}

/* Auth Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.auth-modal-content h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.auth-modal .input-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-modal .input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.auth-modal .input-group input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.auth-modal .input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-modal button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.auth-modal button:hover {
    background: #0088cc;
}

.auth-modal .error-message {
    color: #ff4444;
    text-align: center;
    margin: 10px 0;
    display: none;
    font-size: 14px;
}

/* Add this to the Auth Modal Styles section */
.login-hint {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 20px;
    font-size: 14px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Add transition for smooth blur effect */
.dashboard {
    transition: filter 0.3s ease;
}

/* Add class for when modal is active */
.modal-open {
    filter: blur(4px);
    pointer-events: none;
}
