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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #44d62c, #00b4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-top: 5px;
    font-size: 1.1em;
}

.back-link {
    color: #44d62c;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}

.alerts {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
}

.alert-success {
    background: rgba(68, 214, 44, 0.15);
    border: 1px solid #44d62c;
    color: #44d62c;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    color: #ffc107;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #dc3545;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #2a2a2a;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    color: #888;
    margin-top: 5px;
    font-size: 0.9em;
}

.stat-card.pending .stat-number { color: #ffc107; }
.stat-card.processing .stat-number { color: #00b4ff; }
.stat-card.completed .stat-number { color: #44d62c; }
.stat-card.failed .stat-number { color: #dc3545; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.card h2 {
    color: #44d62c;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.card h3 {
    margin: 15px 0 10px;
    color: #ccc;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #44d62c;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #44d62c, #2ab517);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(68, 214, 44, 0.3);
}

.btn-success {
    background: #44d62c;
    color: #000;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.85em;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.bot-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
}

.status-badge.active, .status-badge.completed {
    background: rgba(68, 214, 44, 0.15);
    color: #44d62c;
}

.status-badge.inactive, .status-badge.failed {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.status-badge.processing {
    background: rgba(0, 180, 255, 0.15);
    color: #00b4ff;
}

.api-key-row {
    display: flex;
    gap: 10px;
}

.api-key-row input {
    flex: 1;
    font-family: monospace;
}

.api-docs {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.api-docs pre {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 10px;
    border: 1px solid #333;
}

.api-docs code {
    color: #44d62c;
    font-size: 0.85em;
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: end;
}

.table-wrapper {
    overflow-x: auto;
}

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

table th {
    background: #111;
    padding: 12px 15px;
    text-align: right;
    color: #888;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #222;
}

table tr:hover td {
    background: #1e1e1e;
}

.empty {
    text-align: center;
    color: #666;
    padding: 40px !important;
}

.order-details p {
    margin-bottom: 8px;
}

.error-text {
    color: #dc3545;
}

.logs-timeline {
    position: relative;
}

.log-entry {
    padding: 12px 15px;
    border-right: 3px solid #44d62c;
    margin-bottom: 10px;
    background: #111;
    border-radius: 0 8px 8px 0;
}

.log-time {
    color: #888;
    font-size: 0.8em;
    font-family: monospace;
}

.log-action {
    color: #00b4ff;
    font-weight: 600;
    margin: 3px 0;
}

.log-details {
    color: #aaa;
    font-size: 0.9em;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
}

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

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .inline-form {
        grid-template-columns: 1fr;
    }
}
