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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f8fafc;
    font-size: 12px;
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header h1 {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 45px;
}

.status-active {
    background: #10b981;
}

.status-inactive {
    background: #ef4444;
}

.content {
    max-height: 550px;
    overflow-y: auto;
}

.loading {
    padding: 40px;
    text-align: center;
    color: #64748b;
}

.error {
    padding: 20px;
    text-align: center;
    color: #ef4444;
}

.direction-header {
    padding: 12px 15px;
    background: #f1f5f9;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.direction-header:hover {
    background: #e2e8f0;
}

.direction-header .left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.direction-body {
    padding: 12px 15px;
    background: #fafbfc;
    display: none;
}

.direction-body.active {
    display: block;
}

.subsection {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.subsection-title {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.toggle-label {
    font-size: 12px;
    color: #334155;
}

.switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 22px;
}

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

input:checked + .slider {
    background-color: #10b981;
}

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

.input-group {
    margin-bottom: 8px;
}

.input-group label {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 3px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 5px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 11px;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.token-filter {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.filter-btn {
    flex: 1;
    padding: 5px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-btn:hover:not(.active) {
    background: #f1f5f9;
}

.token-manager {
    display: none;
    margin-top: 8px;
}

.token-manager.active {
    display: block;
}

.token-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.token-list {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 8px;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.token-search {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 10px;
    margin-bottom: 5px;
    background: white;
}

.token-search:focus {
    outline: none;
    border-color: #667eea;
}

.token-search::placeholder {
    color: #94a3b8;
}

.token-items {
    flex: 1;
    overflow-y: auto;
}

.token-list-title {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-align: center;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: white;
    border-radius: 4px;
    margin-bottom: 3px;
    font-size: 11px;
}

.token-symbol {
    font-weight: 600;
    color: #1e293b;
}

.token-btn {
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.token-btn.add {
    background: #10b981;
    color: white;
}

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

.token-btn:hover {
    opacity: 0.8;
}

.general-section {
    border-bottom: 1px solid #e2e8f0;
}

.general-header {
    padding: 10px 15px;
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.general-header:hover {
    background: #f1f5f9;
}

.general-body {
    padding: 10px 15px;
    display: none;
}

.general-body.active {
    display: block;
}

.actions {
    padding: 10px 15px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 6px;
}

.btn {
    flex: 1;
    padding: 7px;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

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

.btn-secondary:hover {
    background: #475569;
}

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

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

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    font-size: 11px;
    z-index: 10002;
    animation: slideInBottom 0.3s ease;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes slideInBottom {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.chevron {
    transition: transform 0.3s;
    font-size: 10px;
}

.chevron.rotated {
    transform: rotate(180deg);
}

.info-box {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 10px;
    border-radius: 5px;
    margin-top: 8px;
    font-size: 10px;
    color: #1e40af;
}

.content::-webkit-scrollbar,
.token-list::-webkit-scrollbar {
    width: 5px;
}

.content::-webkit-scrollbar-track,
.token-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.content::-webkit-scrollbar-thumb,
.token-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}