/* StockValue Bot Manager - Modern Dark UI with Azure/Electric Blue Theme */

:root {
    /* Dark backgrounds - pure dark without color tints */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;

    /* Text colors */
    --text-primary: #e8e8ec;
    --text-secondary: #a0a0a8;
    --text-muted: #68687a;

    /* Azure / Electric Blue accent colors */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099ff;
    --accent-dark: #0066ff;
    --accent-light: #66e0ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);

    /* Status colors */
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);

    /* Border and shadows */
    --border-color: rgba(0, 212, 255, 0.15);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);

    /* Radius and transitions */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(at 40% 20%, rgba(0, 212, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(0, 153, 255, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(0, 102, 255, 0.05) 0px, transparent 50%);
}

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

.login-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-header .logo svg {
    width: 36px;
    height: 36px;
    color: #0a0a0f;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.2);
}

input::placeholder {
    color: var(--text-muted);
}

input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0a0a0f;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.btn-success {
    background: var(--success);
    color: #0a0a0f;
}

.btn-success:hover {
    background: #22c55e;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #ef4444;
}

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

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 32px;
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo-icon svg {
    width: 24px;
    height: 24px;
    color: #0a0a0f;
}

.sidebar-logo h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-light);
}

.sidebar-nav {
    list-style: none;
    flex: 1;
}

.sidebar-nav > li {
    margin-bottom: 4px;
}

.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav > li > a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-nav > li > a.active {
    background: var(--accent-gradient);
    color: #0a0a0f;
}

.sidebar-nav svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Dropdown Menu */
.nav-dropdown .dropdown-toggle {
    position: relative;
}

.nav-dropdown .dropdown-arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown .dropdown-menu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 16px;
}

.nav-dropdown.open .dropdown-menu {
    max-height: 500px;
}

.nav-dropdown .dropdown-menu li {
    margin-bottom: 2px;
}

.nav-dropdown .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    border-left: 2px solid transparent;
}

.nav-dropdown .dropdown-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.nav-dropdown .dropdown-menu a.active {
    background: rgba(125, 211, 252, 0.1);
    color: var(--accent-light);
    border-left-color: var(--accent-primary);
}

.nav-dropdown .dropdown-menu svg {
    width: 16px;
    height: 16px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0a0a0f;
    font-size: 14px;
}

.user-info span {
    font-size: 14px;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-info:hover {
    background: rgba(0, 212, 255, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.user-details {
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-username {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
}

/* Profile Dropdown */
.profile-dropdown {
    position: fixed;
    left: 20px;
    bottom: 80px;
    width: 240px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.profile-dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dropdown-avatar svg {
    width: 24px;
    height: 24px;
    color: white;
}

.profile-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-username {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.profile-dropdown-item:hover {
    background: rgba(0, 212, 255, 0.05);
}

.profile-dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.profile-dropdown-logout {
    color: #ef4444;
}

.profile-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.profile-dropdown-logout svg {
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    background: var(--bg-primary);
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.tab {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
}

.tab svg {
    flex-shrink: 0;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

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

.card-body {
    padding: 24px;
}

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

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-card .stat-icon.blue,
.stat-card .stat-icon.green {
    background: rgba(125, 211, 252, 0.1);
    color: var(--accent-primary);
}

.stat-card .stat-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card .stat-icon.purple {
    background: rgba(125, 211, 252, 0.15);
    color: var(--accent-light);
}

.stat-card .stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-card .stat-change.positive {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card .stat-change.negative {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.chart-container h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

/* Bots Grid */
.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.bot-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.bot-card:hover {
    border-color: var(--accent-primary);
}

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

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

.bot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.bot-status.enabled {
    background: var(--success-bg);
    color: var(--success);
}

.bot-status.disabled {
    background: var(--danger-bg);
    color: var(--danger);
}

.bot-status.running {
    background: rgba(125, 211, 252, 0.15);
    color: var(--accent-light);
}

.bot-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.bot-status.enabled .status-dot,
.bot-status.running .status-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Program Status Banner */
.program-status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}
.program-status-banner.online {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}
.program-status-banner.offline {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}
.program-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.program-status-banner.online .program-status-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
.program-status-banner.offline .program-status-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.program-status-icon svg {
    width: 20px;
    height: 20px;
}
.program-status-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.program-status-text strong {
    font-size: 14px;
}
.program-status-banner.online .program-status-text strong {
    color: #22c55e;
}
.program-status-banner.offline .program-status-text strong {
    color: #ef4444;
}
.program-status-text span {
    font-size: 13px;
    color: var(--text-muted);
}
.program-status-hint code {
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.bot-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.bot-info-item {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.bot-info-item .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.bot-info-item .value {
    font-size: 14px;
    font-weight: 600;
}

.bot-card-actions {
    display: flex;
    gap: 8px;
}

.bot-card-actions .btn {
    flex: 1;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

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

.data-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-primary);
}

.data-table td {
    font-size: 14px;
}

.data-table tr:hover td {
    background: var(--bg-card);
}

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

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-primary);
}

td {
    font-size: 14px;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-long, .badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-short, .badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-profit {
    background: var(--success-bg);
    color: var(--success);
}

.badge-loss {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-primary {
    background: rgba(125, 211, 252, 0.15);
    color: var(--accent-light);
}

.badge-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 24px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
}

.form-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    border-radius: 26px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: #0a0a0f;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: var(--transition);
}

.sidebar-mobile-open .mobile-menu-toggle {
    background: var(--accent-gradient);
}

.sidebar-mobile-open .mobile-menu-toggle svg {
    color: #0a0a0f;
    transform: rotate(90deg);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when mobile menu is open */
body.sidebar-mobile-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 24px 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header > div:last-child {
        width: 100%;
    }

    .page-header .btn-primary {
        width: 100%;
    }

    .bots-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .payment-methods-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 70px 16px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row,
    .form-row.three-col {
        grid-template-columns: 1fr;
    }

    .bots-grid {
        grid-template-columns: 1fr;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
    }

    /* Table Responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    th, td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Card adjustments */
    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 16px;
    }

    /* Stat cards */
    .stat-card {
        padding: 20px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    /* Bot cards */
    .bot-card {
        padding: 20px;
    }

    .bot-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Profile dropdown position adjustment for mobile */
    .profile-dropdown {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 70px;
    }

    /* Condition builder responsive */
    .condition-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .btn-remove-condition {
        justify-self: flex-end;
    }

    /* Action buttons */
    .action-buttons {
        flex-wrap: wrap;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        top: 12px;
        left: 12px;
    }

    .main-content {
        padding: 65px 12px 12px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .stat-card .stat-value {
        font-size: 20px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .form-group label {
        font-size: 13px;
    }

    input, select, textarea, .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-header,
    .modal-footer {
        padding: 14px 16px;
    }

    /* Smaller icons for mobile */
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-card .stat-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card-hover);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* Utility Classes */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* Condition Builder Styles */
.condition-row {
    display: grid;
    grid-template-columns: 180px 80px 120px 100px 120px 40px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 12px;
    background: rgba(125, 211, 252, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.condition-row:hover {
    border-color: var(--border-color);
}

.condition-row select, .condition-row input {
    padding: 8px;
    font-size: 13px;
}

.btn-remove-condition {
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.btn-remove-condition:hover {
    background: #ef4444;
}

.btn-add-condition {
    background: rgba(125, 211, 252, 0.1);
    color: var(--accent-light);
    border: 1px dashed var(--accent-primary);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-add-condition:hover {
    background: rgba(125, 211, 252, 0.2);
}

.condition-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logic-selector {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.logic-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.logic-selector input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

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

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-icon.btn-ban {
    color: #f59e0b;
}

.btn-icon.btn-ban:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.btn-icon.btn-warning {
    color: #22c55e;
}

.btn-icon.btn-warning:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

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

.users-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.users-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr.user-banned {
    opacity: 0.6;
    background: rgba(239, 68, 68, 0.05);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

.badge-user {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

.badge-default {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* User Cells */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-small svg {
    width: 16px;
    height: 16px;
    color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* Info & Warning Boxes */
.info-box {
    padding: 16px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.info-box code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}

.warning-box {
    padding: 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid #ef4444;
    border-radius: var(--radius);
    margin-top: 20px;
    font-size: 14px;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.payment-method-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.payment-method-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.payment-method-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-method-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.payment-method-info {
    flex: 1;
}

.payment-method-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.payment-method-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-text:hover {
    background: rgba(0, 212, 255, 0.1);
}

.btn-icon:first-of-type {
    margin-left: auto;
}

/* Color Picker */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-option {
    cursor: pointer;
}

.color-option input[type="radio"] {
    display: none;
}

.color-swatch {
    display: block;
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 3px solid transparent;
    transition: var(--transition);
}

.color-option input[type="radio"]:checked + .color-swatch {
    border-color: white;
    box-shadow: 0 0 0 2px var(--border-color);
}

/* Categories Grid Responsive */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Login/Register Page Responsive */
@media (max-width: 480px) {
    .login-card, .register-card {
        padding: 30px 24px;
    }

    .login-header h1, .register-header h1 {
        font-size: 20px;
    }

    .login-logo, .register-logo {
        width: 56px;
        height: 56px;
    }

    .login-logo svg, .register-logo svg {
        width: 32px;
        height: 32px;
    }
}
