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

body {
    background-color: #0f0f0f;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    color: #00a86b;
    font-size: 28px;
}

h2, h3 {
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 15px;
}

.nav-tabs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    color: #aaa;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #00a86b;
}

.nav-link.active {
    color: #00a86b;
    border-bottom-color: #00a86b;
}

.proxy-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #1a1a1a;
    border-radius: 4px;
    border-left: 4px solid #00a86b;
}

.proxy-status.disabled {
    border-left-color: #c0392b;
    background-color: #1a0f0f;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #00a86b;
    animation: pulse 2s infinite;
}

.status-indicator.disabled {
    background-color: #c0392b;
    animation: none;
}

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

.card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-left: 4px solid #00a86b;
}

.card.warning {
    border-left-color: #ff9800;
    background-color: #1a1410;
}

.card.error {
    border-left-color: #c0392b;
    background-color: #1a0f0f;
}

.card.success {
    border-left-color: #00a86b;
    background-color: #0f1a14;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #0f3d1f;
    color: #00ff00;
    border-left: 4px solid #00a86b;
}

.alert-error {
    background-color: #3d0f0f;
    color: #ff6b6b;
    border-left: 4px solid #c0392b;
}

.alert-warning {
    background-color: #3d2a0f;
    color: #ffb84d;
    border-left: 4px solid #ff9800;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-primary {
    background-color: #00a86b;
    color: white;
}

.btn-primary:hover {
    background-color: #008c57;
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #444;
}

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

.btn-danger:hover {
    background-color: #a02c23;
}

.btn-warning {
    background-color: #ff9800;
    color: white;
}

.btn-warning:hover {
    background-color: #e68900;
}

.btn-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #333;
}

th {
    background-color: #252525;
    color: #00a86b;
    font-weight: bold;
}

tr:hover {
    background-color: #222;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00a86b;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    background-color: #252525;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #00a86b;
    box-shadow: 0 0 5px rgba(0, 168, 107, 0.3);
}

.log-container {
    background-color: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 15px;
    height: 500px;
    overflow-y: auto;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid #333;
}

.log-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #00a86b;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    color: #00a86b;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    color: #aaa;
    font-size: 12px;
    text-transform: uppercase;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-completed {
    background-color: #0f3d1f;
    color: #00ff00;
}

.status-unpaid {
    background-color: #3d2a0f;
    color: #ffb84d;
}

.status-canceled {
    background-color: #3d0f0f;
    color: #ff6b6b;
}

.status-pending {
    background-color: #0f2a3d;
    color: #87ceeb;
}

.method-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.method-item {
    background-color: #252525;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #00a86b;
}

.method-item.disabled {
    border-left-color: #666;
    opacity: 0.6;
}

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

.method-name {
    font-weight: bold;
    color: #ffffff;
}

.method-details {
    font-size: 12px;
    color: #aaa;
    margin-top: 10px;
}

.bank-selector {
    margin-top: 10px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
}

.bank-selector select {
    width: 100%;
    padding: 8px;
    background-color: #252525;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

.commission-display {
    background-color: #252525;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.commission-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.commission-row:last-child {
    border-bottom: none;
}

.commission-label {
    color: #aaa;
}

.commission-value {
    color: #00a86b;
    font-weight: bold;
}

.order-history-table {
    margin-top: 20px;
}

.order-history-table table {
    font-size: 13px;
}

.order-history-table td {
    padding: 8px;
}

.hr {
    border: 0;
    border-top: 1px solid #333;
    margin: 20px 0;
}

.text-center {
    text-align: center;
}

.text-success {
    color: #00ff00;
}

.text-error {
    color: #ff6b6b;
}

.text-warning {
    color: #ffb84d;
}

.spinner {
    border: 3px solid #333;
    border-top: 3px solid #00a86b;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.commission-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.commission-input-group input {
    flex: 1;
}

.commission-input-group select {
    width: 100px;
}

.bank-config {
    background-color: #1a1a1a;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 2px solid #444;
}

.bank-config.disabled {
    opacity: 0.5;
    border-left-color: #666;
}

.bank-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bank-config-name {
    font-weight: bold;
    color: #fff;
}

.bank-config-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.bank-config-fields input {
    padding: 6px;
    background-color: #252525;
    border: 1px solid #444;
    color: white;
    border-radius: 3px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

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

    .method-list {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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